{ "contractName": "ShinobiPool", "abi": [ { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" }, { "internalType": "address", "name": "_rewardsDistribution", "type": "address" }, { "internalType": "address", "name": "_rewardsToken", "type": "address" }, { "internalType": "address", "name": "_stakingToken", "type": "address" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "oldOwner", "type": "address" }, { "indexed": false, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnerChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnerNominated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bool", "name": "isPaused", "type": "bool" } ], "name": "PauseChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Recovered", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "RewardAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "RewardPaid", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "newDuration", "type": "uint256" } ], "name": "RewardsDurationUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Staked", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Withdrawn", "type": "event" }, { "constant": false, "inputs": [], "name": "acceptOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "lastPauseTime", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "lastUpdateTime", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" } ], "name": "nominateNewOwner", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "nominatedOwner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "paused", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "periodFinish", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "rewardPerTokenStored", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "rewardRate", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "rewards", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "rewardsDistribution", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "rewardsDuration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "rewardsToken", "outputs": [ { "internalType": "contract IERC20", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "bool", "name": "_paused", "type": "bool" } ], "name": "setPaused", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "_rewardsDistribution", "type": "address" } ], "name": "setRewardsDistribution", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "stakingToken", "outputs": [ { "internalType": "contract IERC20", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "userRewardPerTokenPaid", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "lastTimeRewardApplicable", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "rewardPerToken", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "earned", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getRewardForDuration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "stake", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "withdraw", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "getReward", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "exit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "notifyRewardAmount", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "tokenAddress", "type": "address" }, { "internalType": "uint256", "name": "tokenAmount", "type": "uint256" } ], "name": "recoverERC20", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "_rewardsDuration", "type": "uint256" } ], "name": "setRewardsDuration", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rewardsDistribution\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rewardsToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_stakingToken\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerNominated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isPaused\",\"type\":\"bool\"}],\"name\":\"PauseChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Recovered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newDuration\",\"type\":\"uint256\"}],\"name\":\"RewardsDurationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"earned\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getReward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getRewardForDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastPauseTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTimeRewardApplicable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastUpdateTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"nominateNewOwner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nominatedOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"notifyRewardAmount\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"periodFinish\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"}],\"name\":\"recoverERC20\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardPerTokenStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardsDistribution\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardsDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardsToken\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardsDistribution\",\"type\":\"address\"}],\"name\":\"setRewardsDistribution\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_rewardsDuration\",\"type\":\"uint256\"}],\"name\":\"setRewardsDuration\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"stake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"stakingToken\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userRewardPerTokenPaid\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"setPaused(bool)\":{\"details\":\"Only the contract owner may call this.\"}}},\"userdoc\":{\"methods\":{\"setPaused(bool)\":{\"notice\":\"Change the paused state of the contract\"}}}},\"settings\":{\"compilationTarget\":{\"/home/user/vcs/int/ubiq-grans-yieldfarm/contracts/ShinobiPool.sol\":\"ShinobiPool\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/user/vcs/int/ubiq-grans-yieldfarm/contracts/Owned.sol\":{\"keccak256\":\"0xce9fb9643bb96ae98377930111438ac7bfb44f8ce0641c3c8d86f56019229535\",\"urls\":[\"bzz-raw://38bd4ad951462320e5e01dd3882f54f30a8e7b14f6a028e53fb7dea280db447f\",\"dweb:/ipfs/QmfGjRNRZB9qhfH24pKGPTf8U3VXfeC55FJbQEhWt3Y7RD\"]},\"/home/user/vcs/int/ubiq-grans-yieldfarm/contracts/Pausable.sol\":{\"keccak256\":\"0x12ff21e092fbe9d2f03078c85ba760f8de66356d6da81dbc7a6b57008d3172c9\",\"urls\":[\"bzz-raw://78068db695aee1c186853d84e097427e731616108c16e3cb7d1628f3dffbf3c6\",\"dweb:/ipfs/QmNjVvrvr4TSQmjwyo5kAbYLpKEQ57MZ51LMudqYYfwS1t\"]},\"/home/user/vcs/int/ubiq-grans-yieldfarm/contracts/RewardsDistributionRecipient.sol\":{\"keccak256\":\"0x78dac6af8d90019dbb528997510220a9bf2ec7d89f462ea621098aeaa7494b60\",\"urls\":[\"bzz-raw://2c340539dd23aecb39e746c3a68641954435c7259c052be4fbf2b097d2dc2dc3\",\"dweb:/ipfs/QmU2Yt7aYjuwYygV7RxA1ozPwkDxXEXWUtnAvbbKC6PzxY\"]},\"/home/user/vcs/int/ubiq-grans-yieldfarm/contracts/ShinobiPool.sol\":{\"keccak256\":\"0xeb43984ea4aa4d3d9da69365b742c991a5993046ce189e694adf9bec6186049d\",\"urls\":[\"bzz-raw://f1dba1cf94aa671e857f2088ebc565f69a277076feb9b0e192eb7f9dc0051293\",\"dweb:/ipfs/QmRXsT7LdkjDX7F9YC6YbFsEeqgCq2ayDuJwNLiRTg2Syd\"]},\"/home/user/vcs/int/ubiq-grans-yieldfarm/contracts/interfaces/IStakingRewards.sol\":{\"keccak256\":\"0xf471d7cdb25a9057761e3474c6e9b466bd40052e00674ec8e1037bda451e83a5\",\"urls\":[\"bzz-raw://70c9d75f94a5a02d77aae40eba439454a9c9313169372484cef81e30d4ca8229\",\"dweb:/ipfs/QmV7WohSaaSepTgco6EJXmGHrG9pAouaNpD2XFBs5za9fh\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061\",\"urls\":[\"bzz-raw://216ef9d6b614db4eb46970b4e84903f2534a45572dd30a79f0041f1a5830f436\",\"dweb:/ipfs/QmNPrJ4MWKUAWzKXpUqeyKRUfosaoANZAqXgvepdrCwZAG\"]},\"@openzeppelin/contracts/math/Math.sol\":{\"keccak256\":\"0x4b5aa451e4e8801478708f94b118a7821c0500d676255eaf89fc78c14856ce4e\",\"urls\":[\"bzz-raw://bed15b3f35ed05505efc8fb5cb01d06c52230fbcaadf4ed24a85b1ac2f15f33c\",\"dweb:/ipfs/QmS6tW81u8E4tvzVfVuqEuMCkdwAozQ6pKJPRBR4JEVmQp\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzz-raw://31113152e1ddb78fe7a4197f247591ca894e93f916867beb708d8e747b6cc74f\",\"dweb:/ipfs/QmbZaJyXdpsYGykVhHH9qpVGQg9DGCxE2QufbCUy3daTgq\"]},\"@openzeppelin/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0x6fb9d7889769d7cc161225f9ef7a90e468ba9788b253816f8d8b6894d3472c24\",\"urls\":[\"bzz-raw://cf4c00fc3c37cc5acf0c82ec6fd97bab67d72c2567fdc0ebf023d9c09b30a08e\",\"dweb:/ipfs/Qmb7TChG6DsEDX7LooJ4vmxot19f7VXX8S1zUGPeJTWbwZ\"]},\"@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0x4a3a810b7ebe742e897e1fd428b3eeed2196d3acea58eaf9c566ed10d545d2ed\",\"urls\":[\"bzz-raw://28d03f328e19e4099d5013de0649afaeaabac1a614e130767ab1cb4aca9775b6\",\"dweb:/ipfs/Qmb9iW7yNuYehB2NfhRMs9TakqbLVQhBhmGMkaDZ5g1Eb4\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzz-raw://59fd025151435da35faa8093a5c7a17de02de9d08ad27275c5cdf05050820d91\",\"dweb:/ipfs/QmQMvwEcPhoRXzbXyrdoeRtvLoifUW9Qh7Luho7bmUPRkc\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x6f2c9955d65c522b80f4b8792f076512d2df947d2112cbc4d98a4781ed42ede2\",\"urls\":[\"bzz-raw://7d8ec81683520c06baeef3f7e06cd82bd6fd5fa611f26857f475f6c829540aff\",\"dweb:/ipfs/QmTDkFzKnrpiV1UKnSoiZAHPuguWzokrr4pFbSPvyaSo56\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x1a8e5072509c5ea7365eb1d48030b9be865140c8fb779968da0a459a0e174a11\",\"urls\":[\"bzz-raw://03335b7b07c7c8c8d613cfdd8ec39a0b5ec133ee510bf2fe6cc5a496767bef4b\",\"dweb:/ipfs/Qmebp4nzPja645c9yXSdJkGq96oU3am3LUnG2K3R7XxyKf\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xb63221b23818d622bfd83d18e0968307e4fcb7a35536bdceded76e1cf8349acd\",\"urls\":[\"bzz-raw://44e1e8c22362c4708a8c3362735f1465f5b05e2f7315e16c7010d694ce019d73\",\"dweb:/ipfs/QmWj9g8X1hxkXRre2kwkEjLBetjuzmSbWHD81bsSojnBkS\"]}},\"version\":1}", "bytecode": "0x6080604052600060065560006007556201518060085534801561002157600080fd5b506040516119ac3803806119ac8339818101604052608081101561004457600080fd5b5080516020820151604083015160609093015191929091836001600160a01b0381166100b7576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a1506002805460ff60a01b1916600160a01b1790556000546001600160a01b0316610174576040805162461bcd60e51b815260206004820152601160248201527013dddb995c881b5d5cdd081899481cd95d607a1b604482015290519081900360640190fd5b600480546001600160a01b0393841661010002610100600160a81b0319909116179055600580549183166001600160a01b031992831617905560028054939092169216919091179055506117df806101cd6000396000f3fe608060405234801561001057600080fd5b50600436106101e45760003560e01c806372f702f31161010f578063a694fc3a116100a2578063d1af0c7d11610071578063d1af0c7d14610448578063df136d6514610450578063e9fad8ee14610458578063ebe2b12b14610460576101e4565b8063a694fc3a146103fe578063c8f33c911461041b578063cc1a378f14610423578063cd3daf9d14610440576101e4565b80638980f11f116100de5780638980f11f1461039c5780638b876347146103c85780638da5cb5b146103ee57806391b4ded9146103f6576101e4565b806372f702f31461037c57806379ba5097146103845780637b0a47ee1461038c57806380faa57d14610394576101e4565b80632e1a7d4d116101875780633fc6df6e116101565780633fc6df6e1461030e57806353a47bb7146103325780635c975abb1461033a57806370a0823114610356576101e4565b80632e1a7d4d146102c4578063386a9525146102e15780633c6b16ab146102e95780633d18b91214610306576101e4565b806316c38b3c116101c357806316c38b3c1461026f57806318160ddd1461028e57806319762143146102965780631c1f78eb146102bc576101e4565b80628cc262146101e95780630700037d146102215780631627540c14610247575b600080fd5b61020f600480360360208110156101ff57600080fd5b50356001600160a01b0316610468565b60408051918252519081900360200190f35b61020f6004803603602081101561023757600080fd5b50356001600160a01b03166104fe565b61026d6004803603602081101561025d57600080fd5b50356001600160a01b0316610510565b005b61026d6004803603602081101561028557600080fd5b5035151561056c565b61020f6105e6565b61026d600480360360208110156102ac57600080fd5b50356001600160a01b03166105ed565b61020f610617565b61026d600480360360208110156102da57600080fd5b5035610635565b61020f6107f3565b61026d600480360360208110156102ff57600080fd5b50356107f9565b61026d610a52565b610316610baf565b604080516001600160a01b039092168252519081900360200190f35b610316610bbe565b610342610bcd565b604080519115158252519081900360200190f35b61020f6004803603602081101561036c57600080fd5b50356001600160a01b0316610bd6565b610316610bf1565b61026d610c00565b61020f610cbc565b61020f610cc2565b61026d600480360360408110156103b257600080fd5b506001600160a01b038135169060200135610cd0565b61020f600480360360208110156103de57600080fd5b50356001600160a01b0316610d8d565b610316610d9f565b61020f610dae565b61026d6004803603602081101561041457600080fd5b5035610db4565b61020f610fb2565b61026d6004803603602081101561043957600080fd5b5035610fb8565b61020f61103b565b610316611095565b61020f6110a9565b61026d6110af565b61020f6110d2565b6001600160a01b0381166000908152600c6020908152604080832054600b9092528220546104f891906104ec90670de0b6b3a7640000906104e0906104bb906104af61103b565b9063ffffffff6110d816565b6001600160a01b0388166000908152600e60205260409020549063ffffffff61112116565b9063ffffffff61117a16565b9063ffffffff6111bc16565b92915050565b600c6020526000908152604090205481565b610518611216565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b610574611216565b60045460ff161515811515141561058a576105e3565b6004805460ff1916821515179081905560ff16156105a757426003555b6004546040805160ff90921615158252517f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59181900360200190a15b50565b600d545b90565b6105f5611216565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600061063060085460075461112190919063ffffffff16565b905090565b600254600160a01b900460ff16610693576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002805460ff60a01b19169055336106a961103b565b600a556106b4610cc2565b6009556001600160a01b038116156106fb576106cf81610468565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b60008211610744576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600d54610757908363ffffffff6110d816565b600d55336000908152600e602052604090205461077a908363ffffffff6110d816565b336000818152600e60205260409020919091556005546107a6916001600160a01b03909116908461125f565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a250506002805460ff60a01b1916600160a01b179055565b60085481565b6002546001600160a01b031633146108425760405162461bcd60e51b815260040180806020018281038252602a815260200180611736602a913960400191505060405180910390fd5b600061084c61103b565b600a55610857610cc2565b6009556001600160a01b0381161561089e5761087281610468565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442106108c3576008546108bb90839063ffffffff61117a16565b600755610912565b6006546000906108d9904263ffffffff6110d816565b905060006108f26007548361112190919063ffffffff16565b60085490915061090c906104e0868463ffffffff6111bc16565b60075550505b60048054604080516370a0823160e01b81523093810193909352516000926101009092046001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561096557600080fd5b505afa158015610979573d6000803e3d6000fd5b505050506040513d602081101561098f57600080fd5b50516008549091506109a890829063ffffffff61117a16565b60075411156109fe576040805162461bcd60e51b815260206004820152601860248201527f50726f76696465642072657761726420746f6f20686967680000000000000000604482015290519081900360640190fd5b426009819055600854610a17919063ffffffff6111bc16565b6006556040805184815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a1505050565b600254600160a01b900460ff16610ab0576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002805460ff60a01b1916905533610ac661103b565b600a55610ad1610cc2565b6009556001600160a01b03811615610b1857610aec81610468565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b336000908152600c60205260409020548015610b9857336000818152600c6020526040812055600454610b61916101009091046001600160a01b0316908363ffffffff61125f16565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b50506002805460ff60a01b1916600160a01b179055565b6002546001600160a01b031681565b6001546001600160a01b031681565b60045460ff1681565b6001600160a01b03166000908152600e602052604090205490565b6005546001600160a01b031681565b6001546001600160a01b03163314610c495760405162461bcd60e51b81526004018080602001828103825260358152602001806116756035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b60075481565b6000610630426006546112b6565b610cd8611216565b6005546001600160a01b0383811691161415610d255760405162461bcd60e51b815260040180806020018281038252602181526020018061178a6021913960400191505060405180910390fd5b600054610d45906001600160a01b0384811691168363ffffffff61125f16565b604080516001600160a01b03841681526020810183905281517f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28929181900390910190a15050565b600b6020526000908152604090205481565b6000546001600160a01b031681565b60035481565b600254600160a01b900460ff16610e12576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002805460ff60a01b1916905560045460ff1615610e615760405162461bcd60e51b815260040180806020018281038252603c8152602001806116fa603c913960400191505060405180910390fd5b33610e6a61103b565b600a55610e75610cc2565b6009556001600160a01b03811615610ebc57610e9081610468565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b60008211610f02576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600d54610f15908363ffffffff6111bc16565b600d55336000908152600e6020526040902054610f38908363ffffffff6111bc16565b336000818152600e6020526040902091909155600554610f65916001600160a01b039091169030856112cc565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a250506002805460ff60a01b1916600160a01b179055565b60095481565b610fc0611216565b60065442116110005760405162461bcd60e51b815260040180806020018281038252605881526020018061161d6058913960600191505060405180910390fd5b60088190556040805182815290517ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d39181900360200190a150565b6000600d54600014156110515750600a546105ea565b610630611086600d546104e0670de0b6b3a764000061107a60075461107a6009546104af610cc2565b9063ffffffff61112116565b600a549063ffffffff6111bc16565b60045461010090046001600160a01b031681565b600a5481565b336000908152600e60205260409020546110c890610635565b6110d0610a52565b565b60065481565b600061111a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061132c565b9392505050565b600082611130575060006104f8565b8282028284828161113d57fe5b041461111a5760405162461bcd60e51b81526004018080602001828103825260218152602001806116d96021913960400191505060405180910390fd5b600061111a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506113c3565b60008282018381101561111a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000546001600160a01b031633146110d05760405162461bcd60e51b815260040180806020018281038252602f8152602001806116aa602f913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526112b1908490611428565b505050565b60008183106112c5578161111a565b5090919050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611326908590611428565b50505050565b600081848411156113bb5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611380578181015183820152602001611368565b50505050905090810190601f1680156113ad5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836114125760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611380578181015183820152602001611368565b50600083858161141e57fe5b0495945050505050565b61143a826001600160a01b03166115e0565b61148b576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106114c95780518252601f1990920191602091820191016114aa565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461152b576040519150601f19603f3d011682016040523d82523d6000602084013e611530565b606091505b509150915081611587576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115611326578080602001905160208110156115a357600080fd5b50516113265760405162461bcd60e51b815260040180806020018281038252602a815260200180611760602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061161457508115155b94935050505056fe50726576696f7573207265776172647320706572696f64206d75737420626520636f6d706c657465206265666f7265206368616e67696e6720746865206475726174696f6e20666f7220746865206e657720706572696f64596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e6572736869704f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775468697320616374696f6e2063616e6e6f7420626520706572666f726d6564207768696c652074686520636f6e74726163742069732070617573656443616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656443616e6e6f7420776974686472617720746865207374616b696e6720746f6b656ea265627a7a72315820c894e941ce162157624ffa81038d823d6808a2ef84b284cee72ffc58b0d2c6ab64736f6c63430005100032", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101e45760003560e01c806372f702f31161010f578063a694fc3a116100a2578063d1af0c7d11610071578063d1af0c7d14610448578063df136d6514610450578063e9fad8ee14610458578063ebe2b12b14610460576101e4565b8063a694fc3a146103fe578063c8f33c911461041b578063cc1a378f14610423578063cd3daf9d14610440576101e4565b80638980f11f116100de5780638980f11f1461039c5780638b876347146103c85780638da5cb5b146103ee57806391b4ded9146103f6576101e4565b806372f702f31461037c57806379ba5097146103845780637b0a47ee1461038c57806380faa57d14610394576101e4565b80632e1a7d4d116101875780633fc6df6e116101565780633fc6df6e1461030e57806353a47bb7146103325780635c975abb1461033a57806370a0823114610356576101e4565b80632e1a7d4d146102c4578063386a9525146102e15780633c6b16ab146102e95780633d18b91214610306576101e4565b806316c38b3c116101c357806316c38b3c1461026f57806318160ddd1461028e57806319762143146102965780631c1f78eb146102bc576101e4565b80628cc262146101e95780630700037d146102215780631627540c14610247575b600080fd5b61020f600480360360208110156101ff57600080fd5b50356001600160a01b0316610468565b60408051918252519081900360200190f35b61020f6004803603602081101561023757600080fd5b50356001600160a01b03166104fe565b61026d6004803603602081101561025d57600080fd5b50356001600160a01b0316610510565b005b61026d6004803603602081101561028557600080fd5b5035151561056c565b61020f6105e6565b61026d600480360360208110156102ac57600080fd5b50356001600160a01b03166105ed565b61020f610617565b61026d600480360360208110156102da57600080fd5b5035610635565b61020f6107f3565b61026d600480360360208110156102ff57600080fd5b50356107f9565b61026d610a52565b610316610baf565b604080516001600160a01b039092168252519081900360200190f35b610316610bbe565b610342610bcd565b604080519115158252519081900360200190f35b61020f6004803603602081101561036c57600080fd5b50356001600160a01b0316610bd6565b610316610bf1565b61026d610c00565b61020f610cbc565b61020f610cc2565b61026d600480360360408110156103b257600080fd5b506001600160a01b038135169060200135610cd0565b61020f600480360360208110156103de57600080fd5b50356001600160a01b0316610d8d565b610316610d9f565b61020f610dae565b61026d6004803603602081101561041457600080fd5b5035610db4565b61020f610fb2565b61026d6004803603602081101561043957600080fd5b5035610fb8565b61020f61103b565b610316611095565b61020f6110a9565b61026d6110af565b61020f6110d2565b6001600160a01b0381166000908152600c6020908152604080832054600b9092528220546104f891906104ec90670de0b6b3a7640000906104e0906104bb906104af61103b565b9063ffffffff6110d816565b6001600160a01b0388166000908152600e60205260409020549063ffffffff61112116565b9063ffffffff61117a16565b9063ffffffff6111bc16565b92915050565b600c6020526000908152604090205481565b610518611216565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b610574611216565b60045460ff161515811515141561058a576105e3565b6004805460ff1916821515179081905560ff16156105a757426003555b6004546040805160ff90921615158252517f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59181900360200190a15b50565b600d545b90565b6105f5611216565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600061063060085460075461112190919063ffffffff16565b905090565b600254600160a01b900460ff16610693576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002805460ff60a01b19169055336106a961103b565b600a556106b4610cc2565b6009556001600160a01b038116156106fb576106cf81610468565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b60008211610744576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600d54610757908363ffffffff6110d816565b600d55336000908152600e602052604090205461077a908363ffffffff6110d816565b336000818152600e60205260409020919091556005546107a6916001600160a01b03909116908461125f565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a250506002805460ff60a01b1916600160a01b179055565b60085481565b6002546001600160a01b031633146108425760405162461bcd60e51b815260040180806020018281038252602a815260200180611736602a913960400191505060405180910390fd5b600061084c61103b565b600a55610857610cc2565b6009556001600160a01b0381161561089e5761087281610468565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b60065442106108c3576008546108bb90839063ffffffff61117a16565b600755610912565b6006546000906108d9904263ffffffff6110d816565b905060006108f26007548361112190919063ffffffff16565b60085490915061090c906104e0868463ffffffff6111bc16565b60075550505b60048054604080516370a0823160e01b81523093810193909352516000926101009092046001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561096557600080fd5b505afa158015610979573d6000803e3d6000fd5b505050506040513d602081101561098f57600080fd5b50516008549091506109a890829063ffffffff61117a16565b60075411156109fe576040805162461bcd60e51b815260206004820152601860248201527f50726f76696465642072657761726420746f6f20686967680000000000000000604482015290519081900360640190fd5b426009819055600854610a17919063ffffffff6111bc16565b6006556040805184815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a1505050565b600254600160a01b900460ff16610ab0576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002805460ff60a01b1916905533610ac661103b565b600a55610ad1610cc2565b6009556001600160a01b03811615610b1857610aec81610468565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b336000908152600c60205260409020548015610b9857336000818152600c6020526040812055600454610b61916101009091046001600160a01b0316908363ffffffff61125f16565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b50506002805460ff60a01b1916600160a01b179055565b6002546001600160a01b031681565b6001546001600160a01b031681565b60045460ff1681565b6001600160a01b03166000908152600e602052604090205490565b6005546001600160a01b031681565b6001546001600160a01b03163314610c495760405162461bcd60e51b81526004018080602001828103825260358152602001806116756035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b60075481565b6000610630426006546112b6565b610cd8611216565b6005546001600160a01b0383811691161415610d255760405162461bcd60e51b815260040180806020018281038252602181526020018061178a6021913960400191505060405180910390fd5b600054610d45906001600160a01b0384811691168363ffffffff61125f16565b604080516001600160a01b03841681526020810183905281517f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28929181900390910190a15050565b600b6020526000908152604090205481565b6000546001600160a01b031681565b60035481565b600254600160a01b900460ff16610e12576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002805460ff60a01b1916905560045460ff1615610e615760405162461bcd60e51b815260040180806020018281038252603c8152602001806116fa603c913960400191505060405180910390fd5b33610e6a61103b565b600a55610e75610cc2565b6009556001600160a01b03811615610ebc57610e9081610468565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b60008211610f02576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600d54610f15908363ffffffff6111bc16565b600d55336000908152600e6020526040902054610f38908363ffffffff6111bc16565b336000818152600e6020526040902091909155600554610f65916001600160a01b039091169030856112cc565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a250506002805460ff60a01b1916600160a01b179055565b60095481565b610fc0611216565b60065442116110005760405162461bcd60e51b815260040180806020018281038252605881526020018061161d6058913960600191505060405180910390fd5b60088190556040805182815290517ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d39181900360200190a150565b6000600d54600014156110515750600a546105ea565b610630611086600d546104e0670de0b6b3a764000061107a60075461107a6009546104af610cc2565b9063ffffffff61112116565b600a549063ffffffff6111bc16565b60045461010090046001600160a01b031681565b600a5481565b336000908152600e60205260409020546110c890610635565b6110d0610a52565b565b60065481565b600061111a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061132c565b9392505050565b600082611130575060006104f8565b8282028284828161113d57fe5b041461111a5760405162461bcd60e51b81526004018080602001828103825260218152602001806116d96021913960400191505060405180910390fd5b600061111a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506113c3565b60008282018381101561111a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000546001600160a01b031633146110d05760405162461bcd60e51b815260040180806020018281038252602f8152602001806116aa602f913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526112b1908490611428565b505050565b60008183106112c5578161111a565b5090919050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611326908590611428565b50505050565b600081848411156113bb5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611380578181015183820152602001611368565b50505050905090810190601f1680156113ad5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836114125760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611380578181015183820152602001611368565b50600083858161141e57fe5b0495945050505050565b61143a826001600160a01b03166115e0565b61148b576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106114c95780518252601f1990920191602091820191016114aa565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461152b576040519150601f19603f3d011682016040523d82523d6000602084013e611530565b606091505b509150915081611587576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115611326578080602001905160208110156115a357600080fd5b50516113265760405162461bcd60e51b815260040180806020018281038252602a815260200180611760602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061161457508115155b94935050505056fe50726576696f7573207265776172647320706572696f64206d75737420626520636f6d706c657465206265666f7265206368616e67696e6720746865206475726174696f6e20666f7220746865206e657720706572696f64596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e6572736869704f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775468697320616374696f6e2063616e6e6f7420626520706572666f726d6564207768696c652074686520636f6e74726163742069732070617573656443616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656443616e6e6f7420776974686472617720746865207374616b696e6720746f6b656ea265627a7a72315820c894e941ce162157624ffa81038d823d6808a2ef84b284cee72ffc58b0d2c6ab64736f6c63430005100032", "sourceMap": "568:5896:4:-;;;879:1;849:31;;914:1;886:29;;954:6;921:39;;1286:314;8:9:-1;5:2;;;30:1;27;20:12;5:2;1286:314:4;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;1286:314:4;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;225:20:1;;217:58;;;;;-1:-1:-1;;;217:58:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;285:5;:14;;-1:-1:-1;;;;;;285:14:1;-1:-1:-1;;;;;285:14:1;;;;;;;314:32;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1421:11:15;:18;;-1:-1:-1;;;;1421:18:15;-1:-1:-1;;;1421:18:15;;;;339:5:2;-1:-1:-1;;;;;339:5:2;331:49;;;;;-1:-1:-1;;;331:49:2;;;;;;;;;;;;-1:-1:-1;;;331:49:2;;;;;;;;;;;;;;;1459:12:4;:36;;-1:-1:-1;;;;;1459:36:4;;;;;-1:-1:-1;;;;;;1459:36:4;;;;;;1505:12;:36;;;;;-1:-1:-1;;;;;;1505:36:4;;;;;;1551:19;:42;;;;;;;;;;;;;;-1:-1:-1;568:5896:4;;;;;;", "deployedSourceMap": "568:5896:4:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;568:5896:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2321:196;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2321:196:4;-1:-1:-1;;;;;2321:196:4;;:::i;:::-;;;;;;;;;;;;;;;;1106:42;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1106:42:4;-1:-1:-1;;;;;1106:42:4;;:::i;359:138:1:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;359:138:1;-1:-1:-1;;;;;359:138:1;;:::i;:::-;;596:472:2;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;596:472:2;;;;:::i;1645:91:4:-;;;:::i;460:140:3:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;460:140:3;-1:-1:-1;;;;;460:140:3;;:::i;2523:119:4:-;;;:::i;3079:351::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3079:351:4;;:::i;921:39::-;;;:::i;3896:1064::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3896:1064:4;;:::i;3436:300::-;;;:::i;203:34:3:-;;;:::i;:::-;;;;-1:-1:-1;;;;;203:34:3;;;;;;;;;;;;;;136:29:1;;;:::i;194:18:2:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;1742:110:4;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1742:110:4;-1:-1:-1;;;;;1742:110:4;;:::i;817:26::-;;;:::i;503:266:1:-;;;:::i;886:29:4:-;;;:::i;1858:129::-;;;:::i;5072:298::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;5072:298:4;;;;;;;;:::i;1043:57::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1043:57:4;-1:-1:-1;;;;;1043:57:4;;:::i;110:20:1:-;;;:::i;163:25:2:-;;;:::i;2700:373:4:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2700:373:4;;:::i;966:29::-;;;:::i;5376:353::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5376:353:4;;:::i;1993:322::-;;;:::i;785:26::-;;;:::i;1001:35::-;;;:::i;3742:94::-;;;:::i;849:31::-;;;:::i;2321:196::-;-1:-1:-1;;;;;2493:16:4;;2375:7;2493:16;;;:7;:16;;;;;;;;;2445:22;:31;;;;;;2401:109;;2493:16;2401:87;;2483:4;;2401:77;;2424:53;;:16;:14;:16::i;:::-;:20;:53;:20;:53;:::i;:::-;-1:-1:-1;;;;;2401:18:4;;;;;;:9;:18;;;;;;;:77;:22;:77;:::i;:::-;:81;:87;:81;:87;:::i;:::-;:91;:109;:91;:109;:::i;:::-;2394:116;2321:196;-1:-1:-1;;2321:196:4:o;1106:42::-;;;;;;;;;;;;;:::o;359:138:1:-;804:12;:10;:12::i;:::-;430:14;:23;;-1:-1:-1;;;;;430:23:1;;-1:-1:-1;;;;;;430:23:1;;;;;;;;468:22;;;;;;;;;;;;;;;;359:138;:::o;596:472:2:-;804:12:1;:10;:12::i;:::-;747:6:2;;;;736:17;;;;;;732:54;;;769:7;;732:54;829:6;:16;;-1:-1:-1;;829:16:2;;;;;;;;;;911:6;907:56;;;949:3;933:13;:19;907:56;1054:6;;1041:20;;;1054:6;;;;1041:20;;;;;;;;;;;;;;826:1:1;596:472:2;:::o;1645:91:4:-;1717:12;;1645:91;;:::o;460:140:3:-;804:12:1;:10;:12::i;:::-;551:19:3;:42;;-1:-1:-1;;;;;;551:42:3;-1:-1:-1;;;;;551:42:3;;;;;;;;;;460:140::o;2523:119:4:-;2578:7;2604:31;2619:15;;2604:10;;:14;;:31;;;;:::i;:::-;2597:38;;2523:119;:::o;3079:351::-;1934:11:15;;-1:-1:-1;;;1934:11:15;;;;1926:55;;;;;-1:-1:-1;;;1926:55:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;;;2056:19:15;;;3146:10:4;5850:16;:14;:16::i;:::-;5827:20;:39;5893:26;:24;:26::i;:::-;5876:14;:43;-1:-1:-1;;;;;5933:21:4;;;5929:154;;5989:15;5996:7;5989:6;:15::i;:::-;-1:-1:-1;;;;;5970:16:4;;;;;;:7;:16;;;;;;;;:34;;;;6052:20;;6018:22;:31;;;;;;:54;5929:154;3185:1;3176:6;:10;3168:40;;;;;-1:-1:-1;;;3168:40:4;;;;;;;;;;;;-1:-1:-1;;;3168:40:4;;;;;;;;;;;;;;;3233:12;;:24;;3250:6;3233:24;:16;:24;:::i;:::-;3218:12;:39;3301:10;3291:21;;;;:9;:21;;;;;;:33;;3317:6;3291:33;:25;:33;:::i;:::-;3277:10;3267:21;;;;:9;:21;;;;;:57;;;;3334:12;;:45;;-1:-1:-1;;;;;3334:12:4;;;;3372:6;3334:25;:45::i;:::-;3394:29;;;;;;;;3404:10;;3394:29;;;;;;;;;;-1:-1:-1;;2230:11:15;:18;;-1:-1:-1;;;;2230:18:15;-1:-1:-1;;;2230:18:15;;;3079:351:4:o;921:39::-;;;;:::o;3896:1064::-;370:19:3;;-1:-1:-1;;;;;370:19:3;356:10;:33;348:88;;;;-1:-1:-1;;;348:88:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3994:1:4;5850:16;:14;:16::i;:::-;5827:20;:39;5893:26;:24;:26::i;:::-;5876:14;:43;-1:-1:-1;;;;;5933:21:4;;;5929:154;;5989:15;5996:7;5989:6;:15::i;:::-;-1:-1:-1;;;;;5970:16:4;;;;;;:7;:16;;;;;;;;:34;;;;6052:20;;6018:22;:31;;;;;;:54;5929:154;4031:12;;4012:15;:31;4008:312;;4083:15;;4072:27;;:6;;:27;:10;:27;:::i;:::-;4059:10;:40;4008:312;;;4150:12;;4130:17;;4150:33;;4167:15;4150:33;:16;:33;:::i;:::-;4130:53;;4197:16;4216:25;4230:10;;4216:9;:13;;:25;;;;:::i;:::-;4293:15;;4197:44;;-1:-1:-1;4268:41:4;;:20;:6;4197:44;4268:20;:10;:20;:::i;:41::-;4255:10;:54;-1:-1:-1;;4008:312:4;4689:12;;;:37;;;-1:-1:-1;;;4689:37:4;;4720:4;4689:37;;;;;;;;-1:-1:-1;;4689:12:4;;;;-1:-1:-1;;;;;4689:12:4;;:22;;:37;;;;;;;;;;;;;;:12;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;4689:37:4;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4689:37:4;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4689:37:4;4770:15;;4689:37;;-1:-1:-1;4758:28:4;;4689:37;;4758:28;:11;:28;:::i;:::-;4744:10;;:42;;4736:79;;;;;-1:-1:-1;;;4736:79:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;4843:15;4826:14;:32;;;4903:15;;4883:36;;4843:15;4883:36;:19;:36;:::i;:::-;4868:12;:51;4934:19;;;;;;;;;;;;;;;;;6092:1;446::3;3896:1064:4;:::o;3436:300::-;1934:11:15;;-1:-1:-1;;;1934:11:15;;;;1926:55;;;;;-1:-1:-1;;;1926:55:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;;;2056:19:15;;;3490:10:4;5850:16;:14;:16::i;:::-;5827:20;:39;5893:26;:24;:26::i;:::-;5876:14;:43;-1:-1:-1;;;;;5933:21:4;;;5929:154;;5989:15;5996:7;5989:6;:15::i;:::-;-1:-1:-1;;;;;5970:16:4;;;;;;:7;:16;;;;;;;;:34;;;;6052:20;;6018:22;:31;;;;;;:54;5929:154;3537:10;3512:14;3529:19;;;:7;:19;;;;;;3562:10;;3558:172;;3596:10;3610:1;3588:19;;;:7;:19;;;;;:23;3625:12;;:45;;:12;;;;-1:-1:-1;;;;;3625:12:4;;3663:6;3625:45;:25;:45;:::i;:::-;3689:30;;;;;;;;3700:10;;3689:30;;;;;;;;;;3558:172;-1:-1:-1;;2230:11:15;:18;;-1:-1:-1;;;;2230:18:15;-1:-1:-1;;;2230:18:15;;;3436:300:4:o;203:34:3:-;;;-1:-1:-1;;;;;203:34:3;;:::o;136:29:1:-;;;-1:-1:-1;;;;;136:29:1;;:::o;194:18:2:-;;;;;;:::o;1742:110:4:-;-1:-1:-1;;;;;1827:18:4;1801:7;1827:18;;;:9;:18;;;;;;;1742:110::o;817:26::-;;;-1:-1:-1;;;;;817:26:4;;:::o;503:266:1:-;571:14;;-1:-1:-1;;;;;571:14:1;557:10;:28;549:94;;;;-1:-1:-1;;;549:94:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;671:5;;;678:14;658:35;;;-1:-1:-1;;;;;671:5:1;;;658:35;;678:14;;;;658:35;;;;;;;;;;;;;;;;711:14;;;;703:22;;-1:-1:-1;;;;;;703:22:1;;;-1:-1:-1;;;;;711:14:1;;703:22;;;;735:27;;;503:266::o;886:29:4:-;;;;:::o;1858:129::-;1915:7;1941:39;1950:15;1967:12;;1941:8;:39::i;5072:298::-;804:12:1;:10;:12::i;:::-;5198::4;;-1:-1:-1;;;;;5174:37:4;;;5198:12;;5174:37;;5166:83;;;;-1:-1:-1;;;5166:83:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5293:5;;5259:53;;-1:-1:-1;;;;;5259:33:4;;;;5293:5;5300:11;5259:53;:33;:53;:::i;:::-;5327:36;;;-1:-1:-1;;;;;5327:36:4;;;;;;;;;;;;;;;;;;;;;;;5072:298;;:::o;1043:57::-;;;;;;;;;;;;;:::o;110:20:1:-;;;-1:-1:-1;;;;;110:20:1;;:::o;163:25:2:-;;;;:::o;2700:373:4:-;1934:11:15;;-1:-1:-1;;;1934:11:15;;;;1926:55;;;;;-1:-1:-1;;;1926:55:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;2056:11;:19;;-1:-1:-1;;;;2056:19:15;;;1152:6:2;;2056:19:15;1152:6:2;1151:7;1143:80;;;;-1:-1:-1;;;1143:80:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2776:10:4;5850:16;:14;:16::i;:::-;5827:20;:39;5893:26;:24;:26::i;:::-;5876:14;:43;-1:-1:-1;;;;;5933:21:4;;;5929:154;;5989:15;5996:7;5989:6;:15::i;:::-;-1:-1:-1;;;;;5970:16:4;;;;;;:7;:16;;;;;;;;:34;;;;6052:20;;6018:22;:31;;;;;;:54;5929:154;2815:1;2806:6;:10;2798:37;;;;;-1:-1:-1;;;2798:37:4;;;;;;;;;;;;-1:-1:-1;;;2798:37:4;;;;;;;;;;;;;;;2860:12;;:24;;2877:6;2860:24;:16;:24;:::i;:::-;2845:12;:39;2928:10;2918:21;;;;:9;:21;;;;;;:33;;2944:6;2918:33;:25;:33;:::i;:::-;2904:10;2894:21;;;;:9;:21;;;;;:57;;;;2961:12;;:64;;-1:-1:-1;;;;;2961:12:4;;;;3011:4;3018:6;2961:29;:64::i;:::-;3040:26;;;;;;;;3047:10;;3040:26;;;;;;;;;;-1:-1:-1;;2230:11:15;:18;;-1:-1:-1;;;;2230:18:15;-1:-1:-1;;;2230:18:15;;;2700:373:4:o;966:29::-;;;;:::o;5376:353::-;804:12:1;:10;:12::i;:::-;5498::4;;5480:15;:30;5459:165;;;;-1:-1:-1;;;5459:165:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5634:15;:34;;;5683:39;;;;;;;;;;;;;;;;;5376:353;:::o;1993:322::-;2040:7;2063:12;;2079:1;2063:17;2059:75;;;-1:-1:-1;2103:20:4;;2096:27;;2059:75;2162:146;2204:90;2281:12;;2204:72;2271:4;2204:62;2255:10;;2204:46;2235:14;;2204:26;:24;:26::i;:46::-;:50;:62;:50;:62;:::i;:90::-;2162:20;;;:146;:24;:146;:::i;785:26::-;;;;;;-1:-1:-1;;;;;785:26:4;;:::o;1001:35::-;;;;:::o;3742:94::-;3796:10;3786:21;;;;:9;:21;;;;;;3777:31;;:8;:31::i;:::-;3818:11;:9;:11::i;:::-;3742:94::o;849:31::-;;;;:::o;1274:134:9:-;1332:7;1358:43;1362:1;1365;1358:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;1351:50;1274:134;-1:-1:-1;;;1274:134:9:o;2159:459::-;2217:7;2458:6;2454:45;;-1:-1:-1;2487:1:9;2480:8;;2454:45;2521:5;;;2525:1;2521;:5;:1;2544:5;;;;;:10;2536:56;;;;-1:-1:-1;;;2536:56:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3073:130;3131:7;3157:39;3161:1;3164;3157:39;;;;;;;;;;;;;;;;;:3;:39::i;834:176::-;892:7;923:5;;;946:6;;;;938:46;;;;;-1:-1:-1;;;938:46:9;;;;;;;;;;;;;;;;;;;;;;;;;;;840:131:1;907:5;;-1:-1:-1;;;;;907:5:1;893:10;:19;885:79;;;;-1:-1:-1;;;885:79:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;662:174:13;770:58;;;-1:-1:-1;;;;;770:58:13;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;770:58:13;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;744:85:13;;763:5;;744:18;:85::i;:::-;662:174;;;:::o;358:104:8:-;416:7;446:1;442;:5;:13;;454:1;442:13;;;-1:-1:-1;450:1:8;;358:104;-1:-1:-1;358:104:8:o;842:202:13:-;968:68;;;-1:-1:-1;;;;;968:68:13;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;968:68:13;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;942:95:13;;961:5;;942:18;:95::i;:::-;842:202;;;;:::o;1732:187:9:-;1818:7;1853:12;1845:6;;;;1837:29;;;;-1:-1:-1;;;1837:29:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1837:29:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1888:5:9;;;1732:187::o;3718:338::-;3804:7;3904:12;3897:5;3889:28;;;;-1:-1:-1;;;3889:28:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;3889:28:9;;3927:9;3943:1;3939;:5;;;;;;;3718:338;-1:-1:-1;;;;;3718:338:9:o;2666:1095:13:-;3261:27;3269:5;-1:-1:-1;;;;;3261:25:13;;:27::i;:::-;3253:71;;;;;-1:-1:-1;;;3253:71:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;3395:12;3409:23;3444:5;-1:-1:-1;;;;;3436:19:13;3456:4;3436:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;3436:25:13;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;3394:67:13;;;;3479:7;3471:52;;;;;-1:-1:-1;;;3471:52:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3538:17;;:21;3534:221;;3678:10;3667:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3667:30:13;3659:85;;;;-1:-1:-1;;;3659:85:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;686:610:14;746:4;1207:20;;1052:66;1246:23;;;;;;:42;;-1:-1:-1;1273:15:14;;;1246:42;1238:51;686:610;-1:-1:-1;;;;686:610:14:o", "source": "pragma solidity ^0.5.16;\n\nimport \"@openzeppelin/contracts/math/Math.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/ownership/Ownable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\n// Inheritance\nimport \"./interfaces/IStakingRewards.sol\";\nimport \"./RewardsDistributionRecipient.sol\";\nimport \"./Pausable.sol\";\n\n\n// https://docs.synthetix.io/contracts/source/contracts/stakingrewards\ncontract ShinobiPool is IStakingRewards, RewardsDistributionRecipient, ReentrancyGuard, Pausable {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n /* ========== STATE VARIABLES ========== */\n\n IERC20 public rewardsToken;\n IERC20 public stakingToken;\n uint256 public periodFinish = 0;\n uint256 public rewardRate = 0;\n uint256 public rewardsDuration = 1 days;\n uint256 public lastUpdateTime;\n uint256 public rewardPerTokenStored;\n\n mapping(address => uint256) public userRewardPerTokenPaid;\n mapping(address => uint256) public rewards;\n\n uint256 private _totalSupply;\n mapping(address => uint256) private _balances;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(\n address _owner,\n address _rewardsDistribution,\n address _rewardsToken,\n address _stakingToken\n ) public Owned(_owner) {\n rewardsToken = IERC20(_rewardsToken);\n stakingToken = IERC20(_stakingToken);\n rewardsDistribution = _rewardsDistribution;\n }\n\n /* ========== VIEWS ========== */\n\n function totalSupply() external view returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) external view returns (uint256) {\n return _balances[account];\n }\n\n function lastTimeRewardApplicable() public view returns (uint256) {\n return Math.min(block.timestamp, periodFinish);\n }\n\n function rewardPerToken() public view returns (uint256) {\n if (_totalSupply == 0) {\n return rewardPerTokenStored;\n }\n return\n rewardPerTokenStored.add(\n lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRate).mul(1e18).div(_totalSupply)\n );\n }\n\n function earned(address account) public view returns (uint256) {\n return _balances[account].mul(rewardPerToken().sub(userRewardPerTokenPaid[account])).div(1e18).add(rewards[account]);\n }\n\n function getRewardForDuration() external view returns (uint256) {\n return rewardRate.mul(rewardsDuration);\n }\n\n /* ========== MUTATIVE FUNCTIONS ========== */\n\n function stake(uint256 amount) external nonReentrant notPaused updateReward(msg.sender) {\n require(amount > 0, \"Cannot stake 0\");\n _totalSupply = _totalSupply.add(amount);\n _balances[msg.sender] = _balances[msg.sender].add(amount);\n stakingToken.safeTransferFrom(msg.sender, address(this), amount);\n emit Staked(msg.sender, amount);\n }\n\n function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {\n require(amount > 0, \"Cannot withdraw 0\");\n _totalSupply = _totalSupply.sub(amount);\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n stakingToken.safeTransfer(msg.sender, amount);\n emit Withdrawn(msg.sender, amount);\n }\n\n function getReward() public nonReentrant updateReward(msg.sender) {\n uint256 reward = rewards[msg.sender];\n if (reward > 0) {\n rewards[msg.sender] = 0;\n rewardsToken.safeTransfer(msg.sender, reward);\n emit RewardPaid(msg.sender, reward);\n }\n }\n\n function exit() external {\n withdraw(_balances[msg.sender]);\n getReward();\n }\n\n /* ========== RESTRICTED FUNCTIONS ========== */\n\n function notifyRewardAmount(uint256 reward) external onlyRewardsDistribution updateReward(address(0)) {\n if (block.timestamp >= periodFinish) {\n rewardRate = reward.div(rewardsDuration);\n } else {\n uint256 remaining = periodFinish.sub(block.timestamp);\n uint256 leftover = remaining.mul(rewardRate);\n rewardRate = reward.add(leftover).div(rewardsDuration);\n }\n\n // Ensure the provided reward amount is not more than the balance in the contract.\n // This keeps the reward rate in the right range, preventing overflows due to\n // very high values of rewardRate in the earned and rewardsPerToken functions;\n // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow.\n uint balance = rewardsToken.balanceOf(address(this));\n require(rewardRate <= balance.div(rewardsDuration), \"Provided reward too high\");\n\n lastUpdateTime = block.timestamp;\n periodFinish = block.timestamp.add(rewardsDuration);\n emit RewardAdded(reward);\n }\n\n // Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders\n function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner {\n require(tokenAddress != address(stakingToken), \"Cannot withdraw the staking token\");\n IERC20(tokenAddress).safeTransfer(owner, tokenAmount);\n emit Recovered(tokenAddress, tokenAmount);\n }\n\n function setRewardsDuration(uint256 _rewardsDuration) external onlyOwner {\n require(\n block.timestamp > periodFinish,\n \"Previous rewards period must be complete before changing the duration for the new period\"\n );\n rewardsDuration = _rewardsDuration;\n emit RewardsDurationUpdated(rewardsDuration);\n }\n\n /* ========== MODIFIERS ========== */\n\n modifier updateReward(address account) {\n rewardPerTokenStored = rewardPerToken();\n lastUpdateTime = lastTimeRewardApplicable();\n if (account != address(0)) {\n rewards[account] = earned(account);\n userRewardPerTokenPaid[account] = rewardPerTokenStored;\n }\n _;\n }\n\n /* ========== EVENTS ========== */\n\n event RewardAdded(uint256 reward);\n event Staked(address indexed user, uint256 amount);\n event Withdrawn(address indexed user, uint256 amount);\n event RewardPaid(address indexed user, uint256 reward);\n event RewardsDurationUpdated(uint256 newDuration);\n event Recovered(address token, uint256 amount);\n}\n", "sourcePath": "/home/user/vcs/int/ubiq-grans-yieldfarm/contracts/ShinobiPool.sol", "ast": { "absolutePath": "/home/user/vcs/int/ubiq-grans-yieldfarm/contracts/ShinobiPool.sol", "exportedSymbols": { "ShinobiPool": [ 813 ] }, "id": 814, "nodeType": "SourceUnit", "nodes": [ { "id": 242, "literals": [ "solidity", "^", "0.5", ".16" ], "nodeType": "PragmaDirective", "src": "0:24:4" }, { "absolutePath": "@openzeppelin/contracts/math/Math.sol", "file": "@openzeppelin/contracts/math/Math.sol", "id": 243, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 997, "src": "26:47:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", "file": "@openzeppelin/contracts/math/SafeMath.sol", "id": 244, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 1184, "src": "74:51:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/ownership/Ownable.sol", "file": "@openzeppelin/contracts/ownership/Ownable.sol", "id": 245, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 1302, "src": "126:55:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol", "file": "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol", "id": 246, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 1360, "src": "182:63:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", "file": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", "id": 247, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 1649, "src": "246:59:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", "id": 248, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 1754, "src": "306:59:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/user/vcs/int/ubiq-grans-yieldfarm/contracts/interfaces/IStakingRewards.sol", "file": "./interfaces/IStakingRewards.sol", "id": 249, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 901, "src": "382:42:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/user/vcs/int/ubiq-grans-yieldfarm/contracts/RewardsDistributionRecipient.sol", "file": "./RewardsDistributionRecipient.sol", "id": 250, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 241, "src": "425:44:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/user/vcs/int/ubiq-grans-yieldfarm/contracts/Pausable.sol", "file": "./Pausable.sol", "id": 251, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 204, "src": "470:24:4", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 252, "name": "IStakingRewards", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 900, "src": "592:15:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IStakingRewards_$900", "typeString": "contract IStakingRewards" } }, "id": 253, "nodeType": "InheritanceSpecifier", "src": "592:15:4" }, { "arguments": null, "baseName": { "contractScope": null, "id": 254, "name": "RewardsDistributionRecipient", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 240, "src": "609:28:4", "typeDescriptions": { "typeIdentifier": "t_contract$_RewardsDistributionRecipient_$240", "typeString": "contract RewardsDistributionRecipient" } }, "id": 255, "nodeType": "InheritanceSpecifier", "src": "609:28:4" }, { "arguments": null, "baseName": { "contractScope": null, "id": 256, "name": "ReentrancyGuard", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1753, "src": "639:15:4", "typeDescriptions": { "typeIdentifier": "t_contract$_ReentrancyGuard_$1753", "typeString": "contract ReentrancyGuard" } }, "id": 257, "nodeType": "InheritanceSpecifier", "src": "639:15:4" }, { "arguments": null, "baseName": { "contractScope": null, "id": 258, "name": "Pausable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 203, "src": "656:8:4", "typeDescriptions": { "typeIdentifier": "t_contract$_Pausable_$203", "typeString": "contract Pausable" } }, "id": 259, "nodeType": "InheritanceSpecifier", "src": "656:8:4" } ], "contractDependencies": [ 137, 203, 240, 900, 1753 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 813, "linearizedBaseContracts": [ 813, 203, 1753, 240, 137, 900 ], "name": "ShinobiPool", "nodeType": "ContractDefinition", "nodes": [ { "id": 262, "libraryName": { "contractScope": null, "id": 260, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1183, "src": "677:8:4", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$1183", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "671:27:4", "typeName": { "id": 261, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "690:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "id": 265, "libraryName": { "contractScope": null, "id": 263, "name": "SafeERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1648, "src": "709:9:4", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeERC20_$1648", "typeString": "library SafeERC20" } }, "nodeType": "UsingForDirective", "src": "703:27:4", "typeName": { "contractScope": null, "id": 264, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1428, "src": "723:6:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } } }, { "constant": false, "id": 267, "name": "rewardsToken", "nodeType": "VariableDeclaration", "scope": 813, "src": "785:26:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" }, "typeName": { "contractScope": null, "id": 266, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1428, "src": "785:6:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 269, "name": "stakingToken", "nodeType": "VariableDeclaration", "scope": 813, "src": "817:26:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" }, "typeName": { "contractScope": null, "id": 268, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1428, "src": "817:6:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 272, "name": "periodFinish", "nodeType": "VariableDeclaration", "scope": 813, "src": "849:31:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 270, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "849:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "hexValue": "30", "id": 271, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "879:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "visibility": "public" }, { "constant": false, "id": 275, "name": "rewardRate", "nodeType": "VariableDeclaration", "scope": 813, "src": "886:29:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 273, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "886:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "hexValue": "30", "id": 274, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "914:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "visibility": "public" }, { "constant": false, "id": 278, "name": "rewardsDuration", "nodeType": "VariableDeclaration", "scope": 813, "src": "921:39:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 276, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "921:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "hexValue": "31", "id": 277, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "954:6:4", "subdenomination": "days", "typeDescriptions": { "typeIdentifier": "t_rational_86400_by_1", "typeString": "int_const 86400" }, "value": "1" }, "visibility": "public" }, { "constant": false, "id": 280, "name": "lastUpdateTime", "nodeType": "VariableDeclaration", "scope": 813, "src": "966:29:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 279, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "966:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 282, "name": "rewardPerTokenStored", "nodeType": "VariableDeclaration", "scope": 813, "src": "1001:35:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 281, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1001:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 286, "name": "userRewardPerTokenPaid", "nodeType": "VariableDeclaration", "scope": 813, "src": "1043:57:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 285, "keyType": { "id": 283, "name": "address", "nodeType": "ElementaryTypeName", "src": "1051:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "1043:27:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 284, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1062:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "public" }, { "constant": false, "id": 290, "name": "rewards", "nodeType": "VariableDeclaration", "scope": 813, "src": "1106:42:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 289, "keyType": { "id": 287, "name": "address", "nodeType": "ElementaryTypeName", "src": "1114:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "1106:27:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 288, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1125:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "public" }, { "constant": false, "id": 292, "name": "_totalSupply", "nodeType": "VariableDeclaration", "scope": 813, "src": "1155:28:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 291, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1155:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 296, "name": "_balances", "nodeType": "VariableDeclaration", "scope": 813, "src": "1189:45:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 295, "keyType": { "id": 293, "name": "address", "nodeType": "ElementaryTypeName", "src": "1197:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "1189:27:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 294, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1208:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "private" }, { "body": { "id": 326, "nodeType": "Block", "src": "1449:151:4", "statements": [ { "expression": { "argumentTypes": null, "id": 314, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 310, "name": "rewardsToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 267, "src": "1459:12:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 312, "name": "_rewardsToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 302, "src": "1481:13:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 311, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1428, "src": "1474:6:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$1428_$", "typeString": "type(contract IERC20)" } }, "id": 313, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1474:21:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "src": "1459:36:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "id": 315, "nodeType": "ExpressionStatement", "src": "1459:36:4" }, { "expression": { "argumentTypes": null, "id": 320, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 316, "name": "stakingToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 269, "src": "1505:12:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 318, "name": "_stakingToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 304, "src": "1527:13:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 317, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1428, "src": "1520:6:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$1428_$", "typeString": "type(contract IERC20)" } }, "id": 319, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1520:21:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "src": "1505:36:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "id": 321, "nodeType": "ExpressionStatement", "src": "1505:36:4" }, { "expression": { "argumentTypes": null, "id": 324, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 322, "name": "rewardsDistribution", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 210, "src": "1551:19:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 323, "name": "_rewardsDistribution", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 300, "src": "1573:20:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1551:42:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 325, "nodeType": "ExpressionStatement", "src": "1551:42:4" } ] }, "documentation": null, "id": 327, "implemented": true, "kind": "constructor", "modifiers": [ { "arguments": [ { "argumentTypes": null, "id": 307, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 298, "src": "1441:6:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "id": 308, "modifierName": { "argumentTypes": null, "id": 306, "name": "Owned", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 137, "src": "1435:5:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Owned_$137_$", "typeString": "type(contract Owned)" } }, "nodeType": "ModifierInvocation", "src": "1435:13:4" } ], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 305, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 298, "name": "_owner", "nodeType": "VariableDeclaration", "scope": 327, "src": "1307:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 297, "name": "address", "nodeType": "ElementaryTypeName", "src": "1307:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 300, "name": "_rewardsDistribution", "nodeType": "VariableDeclaration", "scope": 327, "src": "1331:28:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 299, "name": "address", "nodeType": "ElementaryTypeName", "src": "1331:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 302, "name": "_rewardsToken", "nodeType": "VariableDeclaration", "scope": 327, "src": "1369:21:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 301, "name": "address", "nodeType": "ElementaryTypeName", "src": "1369:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 304, "name": "_stakingToken", "nodeType": "VariableDeclaration", "scope": 327, "src": "1400:21:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 303, "name": "address", "nodeType": "ElementaryTypeName", "src": "1400:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1297:130:4" }, "returnParameters": { "id": 309, "nodeType": "ParameterList", "parameters": [], "src": "1449:0:4" }, "scope": 813, "src": "1286:314:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 334, "nodeType": "Block", "src": "1700:36:4", "statements": [ { "expression": { "argumentTypes": null, "id": 332, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 292, "src": "1717:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 331, "id": 333, "nodeType": "Return", "src": "1710:19:4" } ] }, "documentation": null, "id": 335, "implemented": true, "kind": "function", "modifiers": [], "name": "totalSupply", "nodeType": "FunctionDefinition", "parameters": { "id": 328, "nodeType": "ParameterList", "parameters": [], "src": "1665:2:4" }, "returnParameters": { "id": 331, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 330, "name": "", "nodeType": "VariableDeclaration", "scope": 335, "src": "1691:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 329, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1691:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1690:9:4" }, "scope": 813, "src": "1645:91:4", "stateMutability": "view", "superFunction": 876, "visibility": "external" }, { "body": { "id": 346, "nodeType": "Block", "src": "1810:42:4", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 342, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 296, "src": "1827:9:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 344, "indexExpression": { "argumentTypes": null, "id": 343, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 337, "src": "1837:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1827:18:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 341, "id": 345, "nodeType": "Return", "src": "1820:25:4" } ] }, "documentation": null, "id": 347, "implemented": true, "kind": "function", "modifiers": [], "name": "balanceOf", "nodeType": "FunctionDefinition", "parameters": { "id": 338, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 337, "name": "account", "nodeType": "VariableDeclaration", "scope": 347, "src": "1761:15:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 336, "name": "address", "nodeType": "ElementaryTypeName", "src": "1761:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1760:17:4" }, "returnParameters": { "id": 341, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 340, "name": "", "nodeType": "VariableDeclaration", "scope": 347, "src": "1801:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 339, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1801:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1800:9:4" }, "scope": 813, "src": "1742:110:4", "stateMutability": "view", "superFunction": 883, "visibility": "external" }, { "body": { "id": 359, "nodeType": "Block", "src": "1924:63:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 354, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1758, "src": "1950:5:4", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 355, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1950:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 356, "name": "periodFinish", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 272, "src": "1967:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 352, "name": "Math", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 996, "src": "1941:4:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Math_$996_$", "typeString": "type(library Math)" } }, "id": 353, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "min", "nodeType": "MemberAccess", "referencedDeclaration": 963, "src": "1941:8:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 357, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1941:39:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 351, "id": 358, "nodeType": "Return", "src": "1934:46:4" } ] }, "documentation": null, "id": 360, "implemented": true, "kind": "function", "modifiers": [], "name": "lastTimeRewardApplicable", "nodeType": "FunctionDefinition", "parameters": { "id": 348, "nodeType": "ParameterList", "parameters": [], "src": "1891:2:4" }, "returnParameters": { "id": 351, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 350, "name": "", "nodeType": "VariableDeclaration", "scope": 360, "src": "1915:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 349, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1915:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1914:9:4" }, "scope": 813, "src": "1858:129:4", "stateMutability": "view", "superFunction": 854, "visibility": "public" }, { "body": { "id": 390, "nodeType": "Block", "src": "2049:266:4", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 367, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 365, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 292, "src": "2063:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 366, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2079:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "2063:17:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 371, "nodeType": "IfStatement", "src": "2059:75:4", "trueBody": { "id": 370, "nodeType": "Block", "src": "2082:52:4", "statements": [ { "expression": { "argumentTypes": null, "id": 368, "name": "rewardPerTokenStored", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 282, "src": "2103:20:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 364, "id": 369, "nodeType": "Return", "src": "2096:27:4" } ] } }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 386, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 292, "src": "2281:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "31653138", "id": 383, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2271:4:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" }, "value": "1e18" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 380, "name": "rewardRate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "2255:10:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 377, "name": "lastUpdateTime", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 280, "src": "2235:14:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 374, "name": "lastTimeRewardApplicable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 360, "src": "2204:24:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 375, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2204:26:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 376, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 1039, "src": "2204:30:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 378, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2204:46:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 379, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 1100, "src": "2204:50:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 381, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2204:62:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 382, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 1100, "src": "2204:66:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 384, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2204:72:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 385, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 1116, "src": "2204:76:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 387, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2204:90:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 372, "name": "rewardPerTokenStored", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 282, "src": "2162:20:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 373, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 1023, "src": "2162:24:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 388, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2162:146:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 364, "id": 389, "nodeType": "Return", "src": "2143:165:4" } ] }, "documentation": null, "id": 391, "implemented": true, "kind": "function", "modifiers": [], "name": "rewardPerToken", "nodeType": "FunctionDefinition", "parameters": { "id": 361, "nodeType": "ParameterList", "parameters": [], "src": "2016:2:4" }, "returnParameters": { "id": 364, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 363, "name": "", "nodeType": "VariableDeclaration", "scope": 391, "src": "2040:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 362, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2040:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2039:9:4" }, "scope": 813, "src": "1993:322:4", "stateMutability": "view", "superFunction": 859, "visibility": "public" }, { "body": { "id": 419, "nodeType": "Block", "src": "2384:133:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 414, "name": "rewards", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 290, "src": "2493:7:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 416, "indexExpression": { "argumentTypes": null, "id": 415, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 393, "src": "2501:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "2493:16:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "31653138", "id": 411, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2483:4:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" }, "value": "1e18" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 405, "name": "userRewardPerTokenPaid", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 286, "src": "2445:22:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 407, "indexExpression": { "argumentTypes": null, "id": 406, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 393, "src": "2468:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "2445:31:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 402, "name": "rewardPerToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 391, "src": "2424:14:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 403, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2424:16:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 404, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 1039, "src": "2424:20:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 408, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2424:53:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 398, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 296, "src": "2401:9:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 400, "indexExpression": { "argumentTypes": null, "id": 399, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 393, "src": "2411:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "2401:18:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 401, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 1100, "src": "2401:22:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 409, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2401:77:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 410, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 1116, "src": "2401:81:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 412, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2401:87:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 413, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 1023, "src": "2401:91:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 417, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2401:109:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 397, "id": 418, "nodeType": "Return", "src": "2394:116:4" } ] }, "documentation": null, "id": 420, "implemented": true, "kind": "function", "modifiers": [], "name": "earned", "nodeType": "FunctionDefinition", "parameters": { "id": 394, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 393, "name": "account", "nodeType": "VariableDeclaration", "scope": 420, "src": "2337:15:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 392, "name": "address", "nodeType": "ElementaryTypeName", "src": "2337:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "2336:17:4" }, "returnParameters": { "id": 397, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 396, "name": "", "nodeType": "VariableDeclaration", "scope": 420, "src": "2375:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 395, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2375:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2374:9:4" }, "scope": 813, "src": "2321:196:4", "stateMutability": "view", "superFunction": 866, "visibility": "public" }, { "body": { "id": 430, "nodeType": "Block", "src": "2587:55:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 427, "name": "rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 278, "src": "2619:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 425, "name": "rewardRate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "2604:10:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 426, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 1100, "src": "2604:14:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 428, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2604:31:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 424, "id": 429, "nodeType": "Return", "src": "2597:38:4" } ] }, "documentation": null, "id": 431, "implemented": true, "kind": "function", "modifiers": [], "name": "getRewardForDuration", "nodeType": "FunctionDefinition", "parameters": { "id": 421, "nodeType": "ParameterList", "parameters": [], "src": "2552:2:4" }, "returnParameters": { "id": 424, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 423, "name": "", "nodeType": "VariableDeclaration", "scope": 431, "src": "2578:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 422, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2578:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2577:9:4" }, "scope": 813, "src": "2523:119:4", "stateMutability": "view", "superFunction": 871, "visibility": "external" }, { "body": { "id": 488, "nodeType": "Block", "src": "2788:285:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 447, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 445, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 433, "src": "2806:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 446, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2815:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "2806:10:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "43616e6e6f74207374616b652030", "id": 448, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2818:16:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", "typeString": "literal_string \"Cannot stake 0\"" }, "value": "Cannot stake 0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", "typeString": "literal_string \"Cannot stake 0\"" } ], "id": 444, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1771, 1772 ], "referencedDeclaration": 1772, "src": "2798:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 449, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2798:37:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 450, "nodeType": "ExpressionStatement", "src": "2798:37:4" }, { "expression": { "argumentTypes": null, "id": 456, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 451, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 292, "src": "2845:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 454, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 433, "src": "2877:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 452, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 292, "src": "2860:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 453, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 1023, "src": "2860:16:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 455, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2860:24:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2845:39:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 457, "nodeType": "ExpressionStatement", "src": "2845:39:4" }, { "expression": { "argumentTypes": null, "id": 469, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 458, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 296, "src": "2894:9:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 461, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 459, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "2904:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 460, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2904:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "2894:21:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 467, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 433, "src": "2944:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 462, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 296, "src": "2918:9:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 465, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 463, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "2928:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 464, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2928:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "2918:21:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 466, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 1023, "src": "2918:25:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 468, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2918:33:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2894:57:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 470, "nodeType": "ExpressionStatement", "src": "2894:57:4" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 474, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "2991:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 475, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2991:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 477, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1810, "src": "3011:4:4", "typeDescriptions": { "typeIdentifier": "t_contract$_ShinobiPool_$813", "typeString": "contract ShinobiPool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_ShinobiPool_$813", "typeString": "contract ShinobiPool" } ], "id": 476, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3003:7:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 478, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3003:13:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 479, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 433, "src": "3018:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 471, "name": "stakingToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 269, "src": "2961:12:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "id": 473, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1486, "src": "2961:29:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1428_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1428_$", "typeString": "function (contract IERC20,address,address,uint256)" } }, "id": 480, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2961:64:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 481, "nodeType": "ExpressionStatement", "src": "2961:64:4" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 483, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3047:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 484, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3047:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 485, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 433, "src": "3059:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 482, "name": "Staked", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 790, "src": "3040:6:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 486, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3040:26:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 487, "nodeType": "EmitStatement", "src": "3035:31:4" } ] }, "documentation": null, "id": 489, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 436, "modifierName": { "argumentTypes": null, "id": 435, "name": "nonReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1752, "src": "2740:12:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2740:12:4" }, { "arguments": null, "id": 438, "modifierName": { "argumentTypes": null, "id": 437, "name": "notPaused", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 202, "src": "2753:9:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2753:9:4" }, { "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 440, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "2776:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 441, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2776:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "id": 442, "modifierName": { "argumentTypes": null, "id": 439, "name": "updateReward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 780, "src": "2763:12:4", "typeDescriptions": { "typeIdentifier": "t_modifier$_t_address_$", "typeString": "modifier (address)" } }, "nodeType": "ModifierInvocation", "src": "2763:24:4" } ], "name": "stake", "nodeType": "FunctionDefinition", "parameters": { "id": 434, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 433, "name": "amount", "nodeType": "VariableDeclaration", "scope": 489, "src": "2715:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 432, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2715:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2714:16:4" }, "returnParameters": { "id": 443, "nodeType": "ParameterList", "parameters": [], "src": "2788:0:4" }, "scope": 813, "src": "2700:373:4", "stateMutability": "nonpayable", "superFunction": 888, "visibility": "external" }, { "body": { "id": 541, "nodeType": "Block", "src": "3158:272:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 503, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 501, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 491, "src": "3176:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 502, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3185:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "3176:10:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "43616e6e6f742077697468647261772030", "id": 504, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3188:19:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", "typeString": "literal_string \"Cannot withdraw 0\"" }, "value": "Cannot withdraw 0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", "typeString": "literal_string \"Cannot withdraw 0\"" } ], "id": 500, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1771, 1772 ], "referencedDeclaration": 1772, "src": "3168:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 505, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3168:40:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 506, "nodeType": "ExpressionStatement", "src": "3168:40:4" }, { "expression": { "argumentTypes": null, "id": 512, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 507, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 292, "src": "3218:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 510, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 491, "src": "3250:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 508, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 292, "src": "3233:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 509, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 1039, "src": "3233:16:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 511, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3233:24:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3218:39:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 513, "nodeType": "ExpressionStatement", "src": "3218:39:4" }, { "expression": { "argumentTypes": null, "id": 525, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 514, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 296, "src": "3267:9:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 517, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 515, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3277:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 516, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3277:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "3267:21:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 523, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 491, "src": "3317:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 518, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 296, "src": "3291:9:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 521, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 519, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3301:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 520, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3301:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3291:21:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 522, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 1039, "src": "3291:25:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 524, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3291:33:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3267:57:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 526, "nodeType": "ExpressionStatement", "src": "3267:57:4" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 530, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3360:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 531, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3360:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 532, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 491, "src": "3372:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 527, "name": "stakingToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 269, "src": "3334:12:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "id": 529, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransfer", "nodeType": "MemberAccess", "referencedDeclaration": 1461, "src": "3334:25:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1428_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1428_$", "typeString": "function (contract IERC20,address,uint256)" } }, "id": 533, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3334:45:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 534, "nodeType": "ExpressionStatement", "src": "3334:45:4" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 536, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3404:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 537, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3404:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 538, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 491, "src": "3416:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 535, "name": "Withdrawn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 796, "src": "3394:9:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 539, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3394:29:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 540, "nodeType": "EmitStatement", "src": "3389:34:4" } ] }, "documentation": null, "id": 542, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 494, "modifierName": { "argumentTypes": null, "id": 493, "name": "nonReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1752, "src": "3120:12:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "3120:12:4" }, { "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 496, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3146:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 497, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3146:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "id": 498, "modifierName": { "argumentTypes": null, "id": 495, "name": "updateReward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 780, "src": "3133:12:4", "typeDescriptions": { "typeIdentifier": "t_modifier$_t_address_$", "typeString": "modifier (address)" } }, "nodeType": "ModifierInvocation", "src": "3133:24:4" } ], "name": "withdraw", "nodeType": "FunctionDefinition", "parameters": { "id": 492, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 491, "name": "amount", "nodeType": "VariableDeclaration", "scope": 542, "src": "3097:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 490, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3097:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "3096:16:4" }, "returnParameters": { "id": 499, "nodeType": "ParameterList", "parameters": [], "src": "3158:0:4" }, "scope": 813, "src": "3079:351:4", "stateMutability": "nonpayable", "superFunction": 893, "visibility": "public" }, { "body": { "id": 584, "nodeType": "Block", "src": "3502:234:4", "statements": [ { "assignments": [ 552 ], "declarations": [ { "constant": false, "id": 552, "name": "reward", "nodeType": "VariableDeclaration", "scope": 584, "src": "3512:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 551, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3512:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 557, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 553, "name": "rewards", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 290, "src": "3529:7:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 556, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 554, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3537:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 555, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3537:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3529:19:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3512:36:4" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 560, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 558, "name": "reward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 552, "src": "3562:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 559, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3571:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "3562:10:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 583, "nodeType": "IfStatement", "src": "3558:172:4", "trueBody": { "id": 582, "nodeType": "Block", "src": "3574:156:4", "statements": [ { "expression": { "argumentTypes": null, "id": 566, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 561, "name": "rewards", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 290, "src": "3588:7:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 564, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 562, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3596:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 563, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3596:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "3588:19:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "30", "id": 565, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3610:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "3588:23:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 567, "nodeType": "ExpressionStatement", "src": "3588:23:4" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 571, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3651:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 572, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3651:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 573, "name": "reward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 552, "src": "3663:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 568, "name": "rewardsToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 267, "src": "3625:12:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "id": 570, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransfer", "nodeType": "MemberAccess", "referencedDeclaration": 1461, "src": "3625:25:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1428_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1428_$", "typeString": "function (contract IERC20,address,uint256)" } }, "id": 574, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3625:45:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 575, "nodeType": "ExpressionStatement", "src": "3625:45:4" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 577, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3700:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 578, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3700:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 579, "name": "reward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 552, "src": "3712:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 576, "name": "RewardPaid", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 802, "src": "3689:10:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 580, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3689:30:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 581, "nodeType": "EmitStatement", "src": "3684:35:4" } ] } } ] }, "documentation": null, "id": 585, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 545, "modifierName": { "argumentTypes": null, "id": 544, "name": "nonReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1752, "src": "3464:12:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "3464:12:4" }, { "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 547, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3490:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 548, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3490:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "id": 549, "modifierName": { "argumentTypes": null, "id": 546, "name": "updateReward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 780, "src": "3477:12:4", "typeDescriptions": { "typeIdentifier": "t_modifier$_t_address_$", "typeString": "modifier (address)" } }, "nodeType": "ModifierInvocation", "src": "3477:24:4" } ], "name": "getReward", "nodeType": "FunctionDefinition", "parameters": { "id": 543, "nodeType": "ParameterList", "parameters": [], "src": "3454:2:4" }, "returnParameters": { "id": 550, "nodeType": "ParameterList", "parameters": [], "src": "3502:0:4" }, "scope": 813, "src": "3436:300:4", "stateMutability": "nonpayable", "superFunction": 896, "visibility": "public" }, { "body": { "id": 598, "nodeType": "Block", "src": "3767:69:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 589, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 296, "src": "3786:9:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 592, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 590, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3796:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 591, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3796:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3786:21:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 588, "name": "withdraw", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 542, "src": "3777:8:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 593, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3777:31:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 594, "nodeType": "ExpressionStatement", "src": "3777:31:4" }, { "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 595, "name": "getReward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 585, "src": "3818:9:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", "typeString": "function ()" } }, "id": 596, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3818:11:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 597, "nodeType": "ExpressionStatement", "src": "3818:11:4" } ] }, "documentation": null, "id": 599, "implemented": true, "kind": "function", "modifiers": [], "name": "exit", "nodeType": "FunctionDefinition", "parameters": { "id": 586, "nodeType": "ParameterList", "parameters": [], "src": "3755:2:4" }, "returnParameters": { "id": 587, "nodeType": "ParameterList", "parameters": [], "src": "3767:0:4" }, "scope": 813, "src": "3742:94:4", "stateMutability": "nonpayable", "superFunction": 899, "visibility": "external" }, { "body": { "id": 686, "nodeType": "Block", "src": "3998:962:4", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 614, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 611, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1758, "src": "4012:5:4", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 612, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4012:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "id": 613, "name": "periodFinish", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 272, "src": "4031:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4012:31:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 648, "nodeType": "Block", "src": "4116:204:4", "statements": [ { "assignments": [ 624 ], "declarations": [ { "constant": false, "id": 624, "name": "remaining", "nodeType": "VariableDeclaration", "scope": 648, "src": "4130:17:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 623, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4130:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 630, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 627, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1758, "src": "4167:5:4", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 628, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4167:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 625, "name": "periodFinish", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 272, "src": "4150:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 626, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 1039, "src": "4150:16:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 629, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4150:33:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4130:53:4" }, { "assignments": [ 632 ], "declarations": [ { "constant": false, "id": 632, "name": "leftover", "nodeType": "VariableDeclaration", "scope": 648, "src": "4197:16:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 631, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4197:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 637, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 635, "name": "rewardRate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "4230:10:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 633, "name": "remaining", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 624, "src": "4216:9:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 634, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 1100, "src": "4216:13:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 636, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4216:25:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4197:44:4" }, { "expression": { "argumentTypes": null, "id": 646, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 638, "name": "rewardRate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "4255:10:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 644, "name": "rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 278, "src": "4293:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 641, "name": "leftover", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 632, "src": "4279:8:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 639, "name": "reward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 601, "src": "4268:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 640, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 1023, "src": "4268:10:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 642, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4268:20:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 643, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 1116, "src": "4268:24:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 645, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4268:41:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4255:54:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 647, "nodeType": "ExpressionStatement", "src": "4255:54:4" } ] }, "id": 649, "nodeType": "IfStatement", "src": "4008:312:4", "trueBody": { "id": 622, "nodeType": "Block", "src": "4045:65:4", "statements": [ { "expression": { "argumentTypes": null, "id": 620, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 615, "name": "rewardRate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "4059:10:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 618, "name": "rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 278, "src": "4083:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 616, "name": "reward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 601, "src": "4072:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 617, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 1116, "src": "4072:10:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 619, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4072:27:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4059:40:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 621, "nodeType": "ExpressionStatement", "src": "4059:40:4" } ] } }, { "assignments": [ 651 ], "declarations": [ { "constant": false, "id": 651, "name": "balance", "nodeType": "VariableDeclaration", "scope": 686, "src": "4674:12:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 650, "name": "uint", "nodeType": "ElementaryTypeName", "src": "4674:4:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 658, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 655, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1810, "src": "4720:4:4", "typeDescriptions": { "typeIdentifier": "t_contract$_ShinobiPool_$813", "typeString": "contract ShinobiPool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_ShinobiPool_$813", "typeString": "contract ShinobiPool" } ], "id": 654, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4712:7:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 656, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4712:13:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "argumentTypes": null, "id": 652, "name": "rewardsToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 267, "src": "4689:12:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "id": 653, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1373, "src": "4689:22:4", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, "id": 657, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4689:37:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4674:52:4" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 665, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 660, "name": "rewardRate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "4744:10:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 663, "name": "rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 278, "src": "4770:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 661, "name": "balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 651, "src": "4758:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 662, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 1116, "src": "4758:11:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 664, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4758:28:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4744:42:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "50726f76696465642072657761726420746f6f2068696768", "id": 666, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4788:26:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_af294828ccb7807394ab9c640e14eb2534ed0e75bb2e1346f1bb81dd84cda810", "typeString": "literal_string \"Provided reward too high\"" }, "value": "Provided reward too high" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_af294828ccb7807394ab9c640e14eb2534ed0e75bb2e1346f1bb81dd84cda810", "typeString": "literal_string \"Provided reward too high\"" } ], "id": 659, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1771, 1772 ], "referencedDeclaration": 1772, "src": "4736:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 667, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4736:79:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 668, "nodeType": "ExpressionStatement", "src": "4736:79:4" }, { "expression": { "argumentTypes": null, "id": 672, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 669, "name": "lastUpdateTime", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 280, "src": "4826:14:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 670, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1758, "src": "4843:5:4", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 671, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4843:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4826:32:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 673, "nodeType": "ExpressionStatement", "src": "4826:32:4" }, { "expression": { "argumentTypes": null, "id": 680, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 674, "name": "periodFinish", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 272, "src": "4868:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 678, "name": "rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 278, "src": "4903:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 675, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1758, "src": "4883:5:4", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 676, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4883:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 677, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 1023, "src": "4883:19:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 679, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4883:36:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4868:51:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 681, "nodeType": "ExpressionStatement", "src": "4868:51:4" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 683, "name": "reward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 601, "src": "4946:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 682, "name": "RewardAdded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 784, "src": "4934:11:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 684, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4934:19:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 685, "nodeType": "EmitStatement", "src": "4929:24:4" } ] }, "documentation": null, "id": 687, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 604, "modifierName": { "argumentTypes": null, "id": 603, "name": "onlyRewardsDistribution", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 227, "src": "3949:23:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "3949:23:4" }, { "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 607, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3994:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 606, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3986:7:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 608, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3986:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "id": 609, "modifierName": { "argumentTypes": null, "id": 605, "name": "updateReward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 780, "src": "3973:12:4", "typeDescriptions": { "typeIdentifier": "t_modifier$_t_address_$", "typeString": "modifier (address)" } }, "nodeType": "ModifierInvocation", "src": "3973:24:4" } ], "name": "notifyRewardAmount", "nodeType": "FunctionDefinition", "parameters": { "id": 602, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 601, "name": "reward", "nodeType": "VariableDeclaration", "scope": 687, "src": "3924:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 600, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3924:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "3923:16:4" }, "returnParameters": { "id": 610, "nodeType": "ParameterList", "parameters": [], "src": "3998:0:4" }, "scope": 813, "src": "3896:1064:4", "stateMutability": "nonpayable", "superFunction": 215, "visibility": "external" }, { "body": { "id": 718, "nodeType": "Block", "src": "5156:214:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 701, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 697, "name": "tokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 689, "src": "5174:12:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 699, "name": "stakingToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 269, "src": "5198:12:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } ], "id": 698, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5190:7:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 700, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5190:21:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "5174:37:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "43616e6e6f7420776974686472617720746865207374616b696e6720746f6b656e", "id": 702, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5213:35:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_f43de9f2a3539b2ac9cf1844588e9cc0acd1b2bdb1ec43734f76440993ede0a9", "typeString": "literal_string \"Cannot withdraw the staking token\"" }, "value": "Cannot withdraw the staking token" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_f43de9f2a3539b2ac9cf1844588e9cc0acd1b2bdb1ec43734f76440993ede0a9", "typeString": "literal_string \"Cannot withdraw the staking token\"" } ], "id": 696, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1771, 1772 ], "referencedDeclaration": 1772, "src": "5166:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 703, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5166:83:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 704, "nodeType": "ExpressionStatement", "src": "5166:83:4" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 709, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 36, "src": "5293:5:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 710, "name": "tokenAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 691, "src": "5300:11:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 706, "name": "tokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 689, "src": "5266:12:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 705, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1428, "src": "5259:6:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$1428_$", "typeString": "type(contract IERC20)" } }, "id": 707, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5259:20:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "id": 708, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransfer", "nodeType": "MemberAccess", "referencedDeclaration": 1461, "src": "5259:33:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1428_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1428_$", "typeString": "function (contract IERC20,address,uint256)" } }, "id": 711, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5259:53:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 712, "nodeType": "ExpressionStatement", "src": "5259:53:4" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 714, "name": "tokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 689, "src": "5337:12:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 715, "name": "tokenAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 691, "src": "5351:11:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 713, "name": "Recovered", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 812, "src": "5327:9:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 716, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5327:36:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 717, "nodeType": "EmitStatement", "src": "5322:41:4" } ] }, "documentation": null, "id": 719, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 694, "modifierName": { "argumentTypes": null, "id": 693, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 114, "src": "5146:9:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "5146:9:4" } ], "name": "recoverERC20", "nodeType": "FunctionDefinition", "parameters": { "id": 692, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 689, "name": "tokenAddress", "nodeType": "VariableDeclaration", "scope": 719, "src": "5094:20:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 688, "name": "address", "nodeType": "ElementaryTypeName", "src": "5094:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 691, "name": "tokenAmount", "nodeType": "VariableDeclaration", "scope": 719, "src": "5116:19:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 690, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5116:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "5093:43:4" }, "returnParameters": { "id": 695, "nodeType": "ParameterList", "parameters": [], "src": "5156:0:4" }, "scope": 813, "src": "5072:298:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { "id": 742, "nodeType": "Block", "src": "5449:280:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 730, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 727, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1758, "src": "5480:5:4", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 728, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5480:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "id": 729, "name": "periodFinish", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 272, "src": "5498:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5480:30:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "50726576696f7573207265776172647320706572696f64206d75737420626520636f6d706c657465206265666f7265206368616e67696e6720746865206475726174696f6e20666f7220746865206e657720706572696f64", "id": 731, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5524:90:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_07f2725172f5941b576a01ec7036d341e0c837e280f27b110cb3e6fd2f2c4a56", "typeString": "literal_string \"Previous rewards period must be complete before changing the duration for the new period\"" }, "value": "Previous rewards period must be complete before changing the duration for the new period" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_07f2725172f5941b576a01ec7036d341e0c837e280f27b110cb3e6fd2f2c4a56", "typeString": "literal_string \"Previous rewards period must be complete before changing the duration for the new period\"" } ], "id": 726, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1771, 1772 ], "referencedDeclaration": 1772, "src": "5459:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 732, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5459:165:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 733, "nodeType": "ExpressionStatement", "src": "5459:165:4" }, { "expression": { "argumentTypes": null, "id": 736, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 734, "name": "rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 278, "src": "5634:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 735, "name": "_rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 721, "src": "5652:16:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5634:34:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 737, "nodeType": "ExpressionStatement", "src": "5634:34:4" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 739, "name": "rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 278, "src": "5706:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 738, "name": "RewardsDurationUpdated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 806, "src": "5683:22:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 740, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5683:39:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 741, "nodeType": "EmitStatement", "src": "5678:44:4" } ] }, "documentation": null, "id": 743, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 724, "modifierName": { "argumentTypes": null, "id": 723, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 114, "src": "5439:9:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "5439:9:4" } ], "name": "setRewardsDuration", "nodeType": "FunctionDefinition", "parameters": { "id": 722, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 721, "name": "_rewardsDuration", "nodeType": "VariableDeclaration", "scope": 743, "src": "5404:24:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 720, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5404:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "5403:26:4" }, "returnParameters": { "id": 725, "nodeType": "ParameterList", "parameters": [], "src": "5449:0:4" }, "scope": 813, "src": "5376:353:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { "id": 779, "nodeType": "Block", "src": "5817:283:4", "statements": [ { "expression": { "argumentTypes": null, "id": 750, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 747, "name": "rewardPerTokenStored", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 282, "src": "5827:20:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 748, "name": "rewardPerToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 391, "src": "5850:14:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 749, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5850:16:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5827:39:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 751, "nodeType": "ExpressionStatement", "src": "5827:39:4" }, { "expression": { "argumentTypes": null, "id": 755, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 752, "name": "lastUpdateTime", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 280, "src": "5876:14:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 753, "name": "lastTimeRewardApplicable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 360, "src": "5893:24:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 754, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5893:26:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5876:43:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 756, "nodeType": "ExpressionStatement", "src": "5876:43:4" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 761, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 757, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 745, "src": "5933:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 759, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5952:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 758, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5944:7:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 760, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5944:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "5933:21:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 777, "nodeType": "IfStatement", "src": "5929:154:4", "trueBody": { "id": 776, "nodeType": "Block", "src": "5956:127:4", "statements": [ { "expression": { "argumentTypes": null, "id": 768, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 762, "name": "rewards", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 290, "src": "5970:7:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 764, "indexExpression": { "argumentTypes": null, "id": 763, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 745, "src": "5978:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "5970:16:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 766, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 745, "src": "5996:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 765, "name": "earned", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 420, "src": "5989:6:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 767, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5989:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5970:34:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 769, "nodeType": "ExpressionStatement", "src": "5970:34:4" }, { "expression": { "argumentTypes": null, "id": 774, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 770, "name": "userRewardPerTokenPaid", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 286, "src": "6018:22:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 772, "indexExpression": { "argumentTypes": null, "id": 771, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 745, "src": "6041:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "6018:31:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 773, "name": "rewardPerTokenStored", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 282, "src": "6052:20:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "6018:54:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 775, "nodeType": "ExpressionStatement", "src": "6018:54:4" } ] } }, { "id": 778, "nodeType": "PlaceholderStatement", "src": "6092:1:4" } ] }, "documentation": null, "id": 780, "name": "updateReward", "nodeType": "ModifierDefinition", "parameters": { "id": 746, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 745, "name": "account", "nodeType": "VariableDeclaration", "scope": 780, "src": "5800:15:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 744, "name": "address", "nodeType": "ElementaryTypeName", "src": "5800:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "5799:17:4" }, "src": "5778:322:4", "visibility": "internal" }, { "anonymous": false, "documentation": null, "id": 784, "name": "RewardAdded", "nodeType": "EventDefinition", "parameters": { "id": 783, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 782, "indexed": false, "name": "reward", "nodeType": "VariableDeclaration", "scope": 784, "src": "6164:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 781, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6164:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "6163:16:4" }, "src": "6146:34:4" }, { "anonymous": false, "documentation": null, "id": 790, "name": "Staked", "nodeType": "EventDefinition", "parameters": { "id": 789, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 786, "indexed": true, "name": "user", "nodeType": "VariableDeclaration", "scope": 790, "src": "6198:20:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 785, "name": "address", "nodeType": "ElementaryTypeName", "src": "6198:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 788, "indexed": false, "name": "amount", "nodeType": "VariableDeclaration", "scope": 790, "src": "6220:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 787, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6220:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "6197:38:4" }, "src": "6185:51:4" }, { "anonymous": false, "documentation": null, "id": 796, "name": "Withdrawn", "nodeType": "EventDefinition", "parameters": { "id": 795, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 792, "indexed": true, "name": "user", "nodeType": "VariableDeclaration", "scope": 796, "src": "6257:20:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 791, "name": "address", "nodeType": "ElementaryTypeName", "src": "6257:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 794, "indexed": false, "name": "amount", "nodeType": "VariableDeclaration", "scope": 796, "src": "6279:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 793, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6279:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "6256:38:4" }, "src": "6241:54:4" }, { "anonymous": false, "documentation": null, "id": 802, "name": "RewardPaid", "nodeType": "EventDefinition", "parameters": { "id": 801, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 798, "indexed": true, "name": "user", "nodeType": "VariableDeclaration", "scope": 802, "src": "6317:20:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 797, "name": "address", "nodeType": "ElementaryTypeName", "src": "6317:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 800, "indexed": false, "name": "reward", "nodeType": "VariableDeclaration", "scope": 802, "src": "6339:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 799, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6339:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "6316:38:4" }, "src": "6300:55:4" }, { "anonymous": false, "documentation": null, "id": 806, "name": "RewardsDurationUpdated", "nodeType": "EventDefinition", "parameters": { "id": 805, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 804, "indexed": false, "name": "newDuration", "nodeType": "VariableDeclaration", "scope": 806, "src": "6389:19:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 803, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6389:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "6388:21:4" }, "src": "6360:50:4" }, { "anonymous": false, "documentation": null, "id": 812, "name": "Recovered", "nodeType": "EventDefinition", "parameters": { "id": 811, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 808, "indexed": false, "name": "token", "nodeType": "VariableDeclaration", "scope": 812, "src": "6431:13:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 807, "name": "address", "nodeType": "ElementaryTypeName", "src": "6431:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 810, "indexed": false, "name": "amount", "nodeType": "VariableDeclaration", "scope": 812, "src": "6446:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 809, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6446:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "6430:31:4" }, "src": "6415:47:4" } ], "scope": 814, "src": "568:5896:4" } ], "src": "0:6465:4" }, "legacyAST": { "absolutePath": "/home/user/vcs/int/ubiq-grans-yieldfarm/contracts/ShinobiPool.sol", "exportedSymbols": { "ShinobiPool": [ 813 ] }, "id": 814, "nodeType": "SourceUnit", "nodes": [ { "id": 242, "literals": [ "solidity", "^", "0.5", ".16" ], "nodeType": "PragmaDirective", "src": "0:24:4" }, { "absolutePath": "@openzeppelin/contracts/math/Math.sol", "file": "@openzeppelin/contracts/math/Math.sol", "id": 243, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 997, "src": "26:47:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", "file": "@openzeppelin/contracts/math/SafeMath.sol", "id": 244, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 1184, "src": "74:51:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/ownership/Ownable.sol", "file": "@openzeppelin/contracts/ownership/Ownable.sol", "id": 245, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 1302, "src": "126:55:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol", "file": "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol", "id": 246, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 1360, "src": "182:63:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", "file": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", "id": 247, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 1649, "src": "246:59:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", "id": 248, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 1754, "src": "306:59:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/user/vcs/int/ubiq-grans-yieldfarm/contracts/interfaces/IStakingRewards.sol", "file": "./interfaces/IStakingRewards.sol", "id": 249, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 901, "src": "382:42:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/user/vcs/int/ubiq-grans-yieldfarm/contracts/RewardsDistributionRecipient.sol", "file": "./RewardsDistributionRecipient.sol", "id": 250, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 241, "src": "425:44:4", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/user/vcs/int/ubiq-grans-yieldfarm/contracts/Pausable.sol", "file": "./Pausable.sol", "id": 251, "nodeType": "ImportDirective", "scope": 814, "sourceUnit": 204, "src": "470:24:4", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 252, "name": "IStakingRewards", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 900, "src": "592:15:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IStakingRewards_$900", "typeString": "contract IStakingRewards" } }, "id": 253, "nodeType": "InheritanceSpecifier", "src": "592:15:4" }, { "arguments": null, "baseName": { "contractScope": null, "id": 254, "name": "RewardsDistributionRecipient", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 240, "src": "609:28:4", "typeDescriptions": { "typeIdentifier": "t_contract$_RewardsDistributionRecipient_$240", "typeString": "contract RewardsDistributionRecipient" } }, "id": 255, "nodeType": "InheritanceSpecifier", "src": "609:28:4" }, { "arguments": null, "baseName": { "contractScope": null, "id": 256, "name": "ReentrancyGuard", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1753, "src": "639:15:4", "typeDescriptions": { "typeIdentifier": "t_contract$_ReentrancyGuard_$1753", "typeString": "contract ReentrancyGuard" } }, "id": 257, "nodeType": "InheritanceSpecifier", "src": "639:15:4" }, { "arguments": null, "baseName": { "contractScope": null, "id": 258, "name": "Pausable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 203, "src": "656:8:4", "typeDescriptions": { "typeIdentifier": "t_contract$_Pausable_$203", "typeString": "contract Pausable" } }, "id": 259, "nodeType": "InheritanceSpecifier", "src": "656:8:4" } ], "contractDependencies": [ 137, 203, 240, 900, 1753 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 813, "linearizedBaseContracts": [ 813, 203, 1753, 240, 137, 900 ], "name": "ShinobiPool", "nodeType": "ContractDefinition", "nodes": [ { "id": 262, "libraryName": { "contractScope": null, "id": 260, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1183, "src": "677:8:4", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$1183", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "671:27:4", "typeName": { "id": 261, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "690:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "id": 265, "libraryName": { "contractScope": null, "id": 263, "name": "SafeERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1648, "src": "709:9:4", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeERC20_$1648", "typeString": "library SafeERC20" } }, "nodeType": "UsingForDirective", "src": "703:27:4", "typeName": { "contractScope": null, "id": 264, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1428, "src": "723:6:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } } }, { "constant": false, "id": 267, "name": "rewardsToken", "nodeType": "VariableDeclaration", "scope": 813, "src": "785:26:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" }, "typeName": { "contractScope": null, "id": 266, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1428, "src": "785:6:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 269, "name": "stakingToken", "nodeType": "VariableDeclaration", "scope": 813, "src": "817:26:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" }, "typeName": { "contractScope": null, "id": 268, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1428, "src": "817:6:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 272, "name": "periodFinish", "nodeType": "VariableDeclaration", "scope": 813, "src": "849:31:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 270, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "849:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "hexValue": "30", "id": 271, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "879:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "visibility": "public" }, { "constant": false, "id": 275, "name": "rewardRate", "nodeType": "VariableDeclaration", "scope": 813, "src": "886:29:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 273, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "886:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "hexValue": "30", "id": 274, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "914:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "visibility": "public" }, { "constant": false, "id": 278, "name": "rewardsDuration", "nodeType": "VariableDeclaration", "scope": 813, "src": "921:39:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 276, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "921:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "hexValue": "31", "id": 277, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "954:6:4", "subdenomination": "days", "typeDescriptions": { "typeIdentifier": "t_rational_86400_by_1", "typeString": "int_const 86400" }, "value": "1" }, "visibility": "public" }, { "constant": false, "id": 280, "name": "lastUpdateTime", "nodeType": "VariableDeclaration", "scope": 813, "src": "966:29:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 279, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "966:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 282, "name": "rewardPerTokenStored", "nodeType": "VariableDeclaration", "scope": 813, "src": "1001:35:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 281, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1001:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 286, "name": "userRewardPerTokenPaid", "nodeType": "VariableDeclaration", "scope": 813, "src": "1043:57:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 285, "keyType": { "id": 283, "name": "address", "nodeType": "ElementaryTypeName", "src": "1051:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "1043:27:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 284, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1062:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "public" }, { "constant": false, "id": 290, "name": "rewards", "nodeType": "VariableDeclaration", "scope": 813, "src": "1106:42:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 289, "keyType": { "id": 287, "name": "address", "nodeType": "ElementaryTypeName", "src": "1114:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "1106:27:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 288, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1125:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "public" }, { "constant": false, "id": 292, "name": "_totalSupply", "nodeType": "VariableDeclaration", "scope": 813, "src": "1155:28:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 291, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1155:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 296, "name": "_balances", "nodeType": "VariableDeclaration", "scope": 813, "src": "1189:45:4", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 295, "keyType": { "id": 293, "name": "address", "nodeType": "ElementaryTypeName", "src": "1197:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "1189:27:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 294, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1208:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "private" }, { "body": { "id": 326, "nodeType": "Block", "src": "1449:151:4", "statements": [ { "expression": { "argumentTypes": null, "id": 314, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 310, "name": "rewardsToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 267, "src": "1459:12:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 312, "name": "_rewardsToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 302, "src": "1481:13:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 311, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1428, "src": "1474:6:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$1428_$", "typeString": "type(contract IERC20)" } }, "id": 313, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1474:21:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "src": "1459:36:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "id": 315, "nodeType": "ExpressionStatement", "src": "1459:36:4" }, { "expression": { "argumentTypes": null, "id": 320, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 316, "name": "stakingToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 269, "src": "1505:12:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 318, "name": "_stakingToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 304, "src": "1527:13:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 317, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1428, "src": "1520:6:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$1428_$", "typeString": "type(contract IERC20)" } }, "id": 319, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1520:21:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "src": "1505:36:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "id": 321, "nodeType": "ExpressionStatement", "src": "1505:36:4" }, { "expression": { "argumentTypes": null, "id": 324, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 322, "name": "rewardsDistribution", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 210, "src": "1551:19:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 323, "name": "_rewardsDistribution", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 300, "src": "1573:20:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1551:42:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 325, "nodeType": "ExpressionStatement", "src": "1551:42:4" } ] }, "documentation": null, "id": 327, "implemented": true, "kind": "constructor", "modifiers": [ { "arguments": [ { "argumentTypes": null, "id": 307, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 298, "src": "1441:6:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "id": 308, "modifierName": { "argumentTypes": null, "id": 306, "name": "Owned", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 137, "src": "1435:5:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Owned_$137_$", "typeString": "type(contract Owned)" } }, "nodeType": "ModifierInvocation", "src": "1435:13:4" } ], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 305, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 298, "name": "_owner", "nodeType": "VariableDeclaration", "scope": 327, "src": "1307:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 297, "name": "address", "nodeType": "ElementaryTypeName", "src": "1307:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 300, "name": "_rewardsDistribution", "nodeType": "VariableDeclaration", "scope": 327, "src": "1331:28:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 299, "name": "address", "nodeType": "ElementaryTypeName", "src": "1331:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 302, "name": "_rewardsToken", "nodeType": "VariableDeclaration", "scope": 327, "src": "1369:21:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 301, "name": "address", "nodeType": "ElementaryTypeName", "src": "1369:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 304, "name": "_stakingToken", "nodeType": "VariableDeclaration", "scope": 327, "src": "1400:21:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 303, "name": "address", "nodeType": "ElementaryTypeName", "src": "1400:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1297:130:4" }, "returnParameters": { "id": 309, "nodeType": "ParameterList", "parameters": [], "src": "1449:0:4" }, "scope": 813, "src": "1286:314:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 334, "nodeType": "Block", "src": "1700:36:4", "statements": [ { "expression": { "argumentTypes": null, "id": 332, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 292, "src": "1717:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 331, "id": 333, "nodeType": "Return", "src": "1710:19:4" } ] }, "documentation": null, "id": 335, "implemented": true, "kind": "function", "modifiers": [], "name": "totalSupply", "nodeType": "FunctionDefinition", "parameters": { "id": 328, "nodeType": "ParameterList", "parameters": [], "src": "1665:2:4" }, "returnParameters": { "id": 331, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 330, "name": "", "nodeType": "VariableDeclaration", "scope": 335, "src": "1691:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 329, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1691:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1690:9:4" }, "scope": 813, "src": "1645:91:4", "stateMutability": "view", "superFunction": 876, "visibility": "external" }, { "body": { "id": 346, "nodeType": "Block", "src": "1810:42:4", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 342, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 296, "src": "1827:9:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 344, "indexExpression": { "argumentTypes": null, "id": 343, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 337, "src": "1837:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1827:18:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 341, "id": 345, "nodeType": "Return", "src": "1820:25:4" } ] }, "documentation": null, "id": 347, "implemented": true, "kind": "function", "modifiers": [], "name": "balanceOf", "nodeType": "FunctionDefinition", "parameters": { "id": 338, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 337, "name": "account", "nodeType": "VariableDeclaration", "scope": 347, "src": "1761:15:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 336, "name": "address", "nodeType": "ElementaryTypeName", "src": "1761:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1760:17:4" }, "returnParameters": { "id": 341, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 340, "name": "", "nodeType": "VariableDeclaration", "scope": 347, "src": "1801:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 339, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1801:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1800:9:4" }, "scope": 813, "src": "1742:110:4", "stateMutability": "view", "superFunction": 883, "visibility": "external" }, { "body": { "id": 359, "nodeType": "Block", "src": "1924:63:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 354, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1758, "src": "1950:5:4", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 355, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1950:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "id": 356, "name": "periodFinish", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 272, "src": "1967:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 352, "name": "Math", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 996, "src": "1941:4:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Math_$996_$", "typeString": "type(library Math)" } }, "id": 353, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "min", "nodeType": "MemberAccess", "referencedDeclaration": 963, "src": "1941:8:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 357, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1941:39:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 351, "id": 358, "nodeType": "Return", "src": "1934:46:4" } ] }, "documentation": null, "id": 360, "implemented": true, "kind": "function", "modifiers": [], "name": "lastTimeRewardApplicable", "nodeType": "FunctionDefinition", "parameters": { "id": 348, "nodeType": "ParameterList", "parameters": [], "src": "1891:2:4" }, "returnParameters": { "id": 351, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 350, "name": "", "nodeType": "VariableDeclaration", "scope": 360, "src": "1915:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 349, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1915:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1914:9:4" }, "scope": 813, "src": "1858:129:4", "stateMutability": "view", "superFunction": 854, "visibility": "public" }, { "body": { "id": 390, "nodeType": "Block", "src": "2049:266:4", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 367, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 365, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 292, "src": "2063:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 366, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2079:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "2063:17:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 371, "nodeType": "IfStatement", "src": "2059:75:4", "trueBody": { "id": 370, "nodeType": "Block", "src": "2082:52:4", "statements": [ { "expression": { "argumentTypes": null, "id": 368, "name": "rewardPerTokenStored", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 282, "src": "2103:20:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 364, "id": 369, "nodeType": "Return", "src": "2096:27:4" } ] } }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 386, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 292, "src": "2281:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "31653138", "id": 383, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2271:4:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" }, "value": "1e18" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 380, "name": "rewardRate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "2255:10:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 377, "name": "lastUpdateTime", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 280, "src": "2235:14:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 374, "name": "lastTimeRewardApplicable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 360, "src": "2204:24:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 375, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2204:26:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 376, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 1039, "src": "2204:30:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 378, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2204:46:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 379, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 1100, "src": "2204:50:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 381, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2204:62:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 382, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 1100, "src": "2204:66:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 384, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2204:72:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 385, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 1116, "src": "2204:76:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 387, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2204:90:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 372, "name": "rewardPerTokenStored", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 282, "src": "2162:20:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 373, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 1023, "src": "2162:24:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 388, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2162:146:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 364, "id": 389, "nodeType": "Return", "src": "2143:165:4" } ] }, "documentation": null, "id": 391, "implemented": true, "kind": "function", "modifiers": [], "name": "rewardPerToken", "nodeType": "FunctionDefinition", "parameters": { "id": 361, "nodeType": "ParameterList", "parameters": [], "src": "2016:2:4" }, "returnParameters": { "id": 364, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 363, "name": "", "nodeType": "VariableDeclaration", "scope": 391, "src": "2040:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 362, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2040:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2039:9:4" }, "scope": 813, "src": "1993:322:4", "stateMutability": "view", "superFunction": 859, "visibility": "public" }, { "body": { "id": 419, "nodeType": "Block", "src": "2384:133:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 414, "name": "rewards", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 290, "src": "2493:7:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 416, "indexExpression": { "argumentTypes": null, "id": 415, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 393, "src": "2501:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "2493:16:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "31653138", "id": 411, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2483:4:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" }, "value": "1e18" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_1000000000000000000_by_1", "typeString": "int_const 1000000000000000000" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 405, "name": "userRewardPerTokenPaid", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 286, "src": "2445:22:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 407, "indexExpression": { "argumentTypes": null, "id": 406, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 393, "src": "2468:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "2445:31:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 402, "name": "rewardPerToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 391, "src": "2424:14:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 403, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2424:16:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 404, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 1039, "src": "2424:20:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 408, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2424:53:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 398, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 296, "src": "2401:9:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 400, "indexExpression": { "argumentTypes": null, "id": 399, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 393, "src": "2411:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "2401:18:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 401, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 1100, "src": "2401:22:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 409, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2401:77:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 410, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 1116, "src": "2401:81:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 412, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2401:87:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 413, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 1023, "src": "2401:91:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 417, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2401:109:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 397, "id": 418, "nodeType": "Return", "src": "2394:116:4" } ] }, "documentation": null, "id": 420, "implemented": true, "kind": "function", "modifiers": [], "name": "earned", "nodeType": "FunctionDefinition", "parameters": { "id": 394, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 393, "name": "account", "nodeType": "VariableDeclaration", "scope": 420, "src": "2337:15:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 392, "name": "address", "nodeType": "ElementaryTypeName", "src": "2337:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "2336:17:4" }, "returnParameters": { "id": 397, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 396, "name": "", "nodeType": "VariableDeclaration", "scope": 420, "src": "2375:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 395, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2375:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2374:9:4" }, "scope": 813, "src": "2321:196:4", "stateMutability": "view", "superFunction": 866, "visibility": "public" }, { "body": { "id": 430, "nodeType": "Block", "src": "2587:55:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 427, "name": "rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 278, "src": "2619:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 425, "name": "rewardRate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "2604:10:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 426, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 1100, "src": "2604:14:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 428, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2604:31:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 424, "id": 429, "nodeType": "Return", "src": "2597:38:4" } ] }, "documentation": null, "id": 431, "implemented": true, "kind": "function", "modifiers": [], "name": "getRewardForDuration", "nodeType": "FunctionDefinition", "parameters": { "id": 421, "nodeType": "ParameterList", "parameters": [], "src": "2552:2:4" }, "returnParameters": { "id": 424, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 423, "name": "", "nodeType": "VariableDeclaration", "scope": 431, "src": "2578:7:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 422, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2578:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2577:9:4" }, "scope": 813, "src": "2523:119:4", "stateMutability": "view", "superFunction": 871, "visibility": "external" }, { "body": { "id": 488, "nodeType": "Block", "src": "2788:285:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 447, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 445, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 433, "src": "2806:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 446, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "2815:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "2806:10:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "43616e6e6f74207374616b652030", "id": 448, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "2818:16:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", "typeString": "literal_string \"Cannot stake 0\"" }, "value": "Cannot stake 0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_2972ce884b95fc24c703b7f04fae79e4ca7287e77fa26ed09d1faa4263e887ab", "typeString": "literal_string \"Cannot stake 0\"" } ], "id": 444, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1771, 1772 ], "referencedDeclaration": 1772, "src": "2798:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 449, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2798:37:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 450, "nodeType": "ExpressionStatement", "src": "2798:37:4" }, { "expression": { "argumentTypes": null, "id": 456, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 451, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 292, "src": "2845:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 454, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 433, "src": "2877:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 452, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 292, "src": "2860:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 453, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 1023, "src": "2860:16:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 455, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2860:24:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2845:39:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 457, "nodeType": "ExpressionStatement", "src": "2845:39:4" }, { "expression": { "argumentTypes": null, "id": 469, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 458, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 296, "src": "2894:9:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 461, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 459, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "2904:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 460, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2904:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "2894:21:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 467, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 433, "src": "2944:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 462, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 296, "src": "2918:9:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 465, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 463, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "2928:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 464, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2928:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "2918:21:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 466, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 1023, "src": "2918:25:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 468, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2918:33:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2894:57:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 470, "nodeType": "ExpressionStatement", "src": "2894:57:4" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 474, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "2991:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 475, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2991:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 477, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1810, "src": "3011:4:4", "typeDescriptions": { "typeIdentifier": "t_contract$_ShinobiPool_$813", "typeString": "contract ShinobiPool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_ShinobiPool_$813", "typeString": "contract ShinobiPool" } ], "id": 476, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3003:7:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 478, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3003:13:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 479, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 433, "src": "3018:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 471, "name": "stakingToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 269, "src": "2961:12:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "id": 473, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransferFrom", "nodeType": "MemberAccess", "referencedDeclaration": 1486, "src": "2961:29:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1428_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1428_$", "typeString": "function (contract IERC20,address,address,uint256)" } }, "id": 480, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "2961:64:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 481, "nodeType": "ExpressionStatement", "src": "2961:64:4" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 483, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3047:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 484, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3047:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 485, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 433, "src": "3059:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 482, "name": "Staked", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 790, "src": "3040:6:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 486, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3040:26:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 487, "nodeType": "EmitStatement", "src": "3035:31:4" } ] }, "documentation": null, "id": 489, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 436, "modifierName": { "argumentTypes": null, "id": 435, "name": "nonReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1752, "src": "2740:12:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2740:12:4" }, { "arguments": null, "id": 438, "modifierName": { "argumentTypes": null, "id": 437, "name": "notPaused", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 202, "src": "2753:9:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "2753:9:4" }, { "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 440, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "2776:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 441, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "2776:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "id": 442, "modifierName": { "argumentTypes": null, "id": 439, "name": "updateReward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 780, "src": "2763:12:4", "typeDescriptions": { "typeIdentifier": "t_modifier$_t_address_$", "typeString": "modifier (address)" } }, "nodeType": "ModifierInvocation", "src": "2763:24:4" } ], "name": "stake", "nodeType": "FunctionDefinition", "parameters": { "id": 434, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 433, "name": "amount", "nodeType": "VariableDeclaration", "scope": 489, "src": "2715:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 432, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2715:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "2714:16:4" }, "returnParameters": { "id": 443, "nodeType": "ParameterList", "parameters": [], "src": "2788:0:4" }, "scope": 813, "src": "2700:373:4", "stateMutability": "nonpayable", "superFunction": 888, "visibility": "external" }, { "body": { "id": 541, "nodeType": "Block", "src": "3158:272:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 503, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 501, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 491, "src": "3176:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 502, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3185:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "3176:10:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "43616e6e6f742077697468647261772030", "id": 504, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "3188:19:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", "typeString": "literal_string \"Cannot withdraw 0\"" }, "value": "Cannot withdraw 0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_8d85b8e7f4404d04d93e8d532ad219ceeba0becfbc18622bad46b31e08b1f0b0", "typeString": "literal_string \"Cannot withdraw 0\"" } ], "id": 500, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1771, 1772 ], "referencedDeclaration": 1772, "src": "3168:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 505, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3168:40:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 506, "nodeType": "ExpressionStatement", "src": "3168:40:4" }, { "expression": { "argumentTypes": null, "id": 512, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 507, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 292, "src": "3218:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 510, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 491, "src": "3250:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 508, "name": "_totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 292, "src": "3233:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 509, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 1039, "src": "3233:16:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 511, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3233:24:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3218:39:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 513, "nodeType": "ExpressionStatement", "src": "3218:39:4" }, { "expression": { "argumentTypes": null, "id": 525, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 514, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 296, "src": "3267:9:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 517, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 515, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3277:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 516, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3277:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "3267:21:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 523, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 491, "src": "3317:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 518, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 296, "src": "3291:9:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 521, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 519, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3301:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 520, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3301:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3291:21:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 522, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 1039, "src": "3291:25:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 524, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3291:33:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3267:57:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 526, "nodeType": "ExpressionStatement", "src": "3267:57:4" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 530, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3360:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 531, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3360:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 532, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 491, "src": "3372:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 527, "name": "stakingToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 269, "src": "3334:12:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "id": 529, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransfer", "nodeType": "MemberAccess", "referencedDeclaration": 1461, "src": "3334:25:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1428_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1428_$", "typeString": "function (contract IERC20,address,uint256)" } }, "id": 533, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3334:45:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 534, "nodeType": "ExpressionStatement", "src": "3334:45:4" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 536, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3404:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 537, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3404:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 538, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 491, "src": "3416:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 535, "name": "Withdrawn", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 796, "src": "3394:9:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 539, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3394:29:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 540, "nodeType": "EmitStatement", "src": "3389:34:4" } ] }, "documentation": null, "id": 542, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 494, "modifierName": { "argumentTypes": null, "id": 493, "name": "nonReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1752, "src": "3120:12:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "3120:12:4" }, { "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 496, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3146:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 497, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3146:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "id": 498, "modifierName": { "argumentTypes": null, "id": 495, "name": "updateReward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 780, "src": "3133:12:4", "typeDescriptions": { "typeIdentifier": "t_modifier$_t_address_$", "typeString": "modifier (address)" } }, "nodeType": "ModifierInvocation", "src": "3133:24:4" } ], "name": "withdraw", "nodeType": "FunctionDefinition", "parameters": { "id": 492, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 491, "name": "amount", "nodeType": "VariableDeclaration", "scope": 542, "src": "3097:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 490, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3097:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "3096:16:4" }, "returnParameters": { "id": 499, "nodeType": "ParameterList", "parameters": [], "src": "3158:0:4" }, "scope": 813, "src": "3079:351:4", "stateMutability": "nonpayable", "superFunction": 893, "visibility": "public" }, { "body": { "id": 584, "nodeType": "Block", "src": "3502:234:4", "statements": [ { "assignments": [ 552 ], "declarations": [ { "constant": false, "id": 552, "name": "reward", "nodeType": "VariableDeclaration", "scope": 584, "src": "3512:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 551, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3512:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 557, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 553, "name": "rewards", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 290, "src": "3529:7:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 556, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 554, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3537:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 555, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3537:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3529:19:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3512:36:4" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 560, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 558, "name": "reward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 552, "src": "3562:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 559, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3571:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "3562:10:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 583, "nodeType": "IfStatement", "src": "3558:172:4", "trueBody": { "id": 582, "nodeType": "Block", "src": "3574:156:4", "statements": [ { "expression": { "argumentTypes": null, "id": 566, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 561, "name": "rewards", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 290, "src": "3588:7:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 564, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 562, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3596:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 563, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3596:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "3588:19:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "30", "id": 565, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3610:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "3588:23:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 567, "nodeType": "ExpressionStatement", "src": "3588:23:4" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 571, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3651:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 572, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3651:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 573, "name": "reward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 552, "src": "3663:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 568, "name": "rewardsToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 267, "src": "3625:12:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "id": 570, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransfer", "nodeType": "MemberAccess", "referencedDeclaration": 1461, "src": "3625:25:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1428_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1428_$", "typeString": "function (contract IERC20,address,uint256)" } }, "id": 574, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3625:45:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 575, "nodeType": "ExpressionStatement", "src": "3625:45:4" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 577, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3700:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 578, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3700:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, { "argumentTypes": null, "id": 579, "name": "reward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 552, "src": "3712:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address_payable", "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 576, "name": "RewardPaid", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 802, "src": "3689:10:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 580, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3689:30:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 581, "nodeType": "EmitStatement", "src": "3684:35:4" } ] } } ] }, "documentation": null, "id": 585, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 545, "modifierName": { "argumentTypes": null, "id": 544, "name": "nonReentrant", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1752, "src": "3464:12:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "3464:12:4" }, { "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 547, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3490:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 548, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3490:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "id": 549, "modifierName": { "argumentTypes": null, "id": 546, "name": "updateReward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 780, "src": "3477:12:4", "typeDescriptions": { "typeIdentifier": "t_modifier$_t_address_$", "typeString": "modifier (address)" } }, "nodeType": "ModifierInvocation", "src": "3477:24:4" } ], "name": "getReward", "nodeType": "FunctionDefinition", "parameters": { "id": 543, "nodeType": "ParameterList", "parameters": [], "src": "3454:2:4" }, "returnParameters": { "id": 550, "nodeType": "ParameterList", "parameters": [], "src": "3502:0:4" }, "scope": 813, "src": "3436:300:4", "stateMutability": "nonpayable", "superFunction": 896, "visibility": "public" }, { "body": { "id": 598, "nodeType": "Block", "src": "3767:69:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 589, "name": "_balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 296, "src": "3786:9:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 592, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 590, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1768, "src": "3796:3:4", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 591, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "3796:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "3786:21:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 588, "name": "withdraw", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 542, "src": "3777:8:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 593, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3777:31:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 594, "nodeType": "ExpressionStatement", "src": "3777:31:4" }, { "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 595, "name": "getReward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 585, "src": "3818:9:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", "typeString": "function ()" } }, "id": 596, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3818:11:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 597, "nodeType": "ExpressionStatement", "src": "3818:11:4" } ] }, "documentation": null, "id": 599, "implemented": true, "kind": "function", "modifiers": [], "name": "exit", "nodeType": "FunctionDefinition", "parameters": { "id": 586, "nodeType": "ParameterList", "parameters": [], "src": "3755:2:4" }, "returnParameters": { "id": 587, "nodeType": "ParameterList", "parameters": [], "src": "3767:0:4" }, "scope": 813, "src": "3742:94:4", "stateMutability": "nonpayable", "superFunction": 899, "visibility": "external" }, { "body": { "id": 686, "nodeType": "Block", "src": "3998:962:4", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 614, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 611, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1758, "src": "4012:5:4", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 612, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4012:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "id": 613, "name": "periodFinish", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 272, "src": "4031:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4012:31:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { "id": 648, "nodeType": "Block", "src": "4116:204:4", "statements": [ { "assignments": [ 624 ], "declarations": [ { "constant": false, "id": 624, "name": "remaining", "nodeType": "VariableDeclaration", "scope": 648, "src": "4130:17:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 623, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4130:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 630, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 627, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1758, "src": "4167:5:4", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 628, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4167:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 625, "name": "periodFinish", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 272, "src": "4150:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 626, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 1039, "src": "4150:16:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 629, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4150:33:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4130:53:4" }, { "assignments": [ 632 ], "declarations": [ { "constant": false, "id": 632, "name": "leftover", "nodeType": "VariableDeclaration", "scope": 648, "src": "4197:16:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 631, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4197:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 637, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 635, "name": "rewardRate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "4230:10:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 633, "name": "remaining", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 624, "src": "4216:9:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 634, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 1100, "src": "4216:13:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 636, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4216:25:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4197:44:4" }, { "expression": { "argumentTypes": null, "id": 646, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 638, "name": "rewardRate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "4255:10:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 644, "name": "rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 278, "src": "4293:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 641, "name": "leftover", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 632, "src": "4279:8:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 639, "name": "reward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 601, "src": "4268:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 640, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 1023, "src": "4268:10:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 642, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4268:20:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 643, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 1116, "src": "4268:24:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 645, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4268:41:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4255:54:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 647, "nodeType": "ExpressionStatement", "src": "4255:54:4" } ] }, "id": 649, "nodeType": "IfStatement", "src": "4008:312:4", "trueBody": { "id": 622, "nodeType": "Block", "src": "4045:65:4", "statements": [ { "expression": { "argumentTypes": null, "id": 620, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 615, "name": "rewardRate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "4059:10:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 618, "name": "rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 278, "src": "4083:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 616, "name": "reward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 601, "src": "4072:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 617, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 1116, "src": "4072:10:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 619, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4072:27:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4059:40:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 621, "nodeType": "ExpressionStatement", "src": "4059:40:4" } ] } }, { "assignments": [ 651 ], "declarations": [ { "constant": false, "id": 651, "name": "balance", "nodeType": "VariableDeclaration", "scope": 686, "src": "4674:12:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 650, "name": "uint", "nodeType": "ElementaryTypeName", "src": "4674:4:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 658, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 655, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1810, "src": "4720:4:4", "typeDescriptions": { "typeIdentifier": "t_contract$_ShinobiPool_$813", "typeString": "contract ShinobiPool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_ShinobiPool_$813", "typeString": "contract ShinobiPool" } ], "id": 654, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "4712:7:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 656, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4712:13:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "argumentTypes": null, "id": 652, "name": "rewardsToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 267, "src": "4689:12:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "id": 653, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balanceOf", "nodeType": "MemberAccess", "referencedDeclaration": 1373, "src": "4689:22:4", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, "id": 657, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4689:37:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "4674:52:4" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 665, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 660, "name": "rewardRate", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 275, "src": "4744:10:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 663, "name": "rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 278, "src": "4770:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 661, "name": "balance", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 651, "src": "4758:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 662, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 1116, "src": "4758:11:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 664, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4758:28:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4744:42:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "50726f76696465642072657761726420746f6f2068696768", "id": 666, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "4788:26:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_af294828ccb7807394ab9c640e14eb2534ed0e75bb2e1346f1bb81dd84cda810", "typeString": "literal_string \"Provided reward too high\"" }, "value": "Provided reward too high" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_af294828ccb7807394ab9c640e14eb2534ed0e75bb2e1346f1bb81dd84cda810", "typeString": "literal_string \"Provided reward too high\"" } ], "id": 659, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1771, 1772 ], "referencedDeclaration": 1772, "src": "4736:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 667, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4736:79:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 668, "nodeType": "ExpressionStatement", "src": "4736:79:4" }, { "expression": { "argumentTypes": null, "id": 672, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 669, "name": "lastUpdateTime", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 280, "src": "4826:14:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 670, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1758, "src": "4843:5:4", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 671, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4843:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4826:32:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 673, "nodeType": "ExpressionStatement", "src": "4826:32:4" }, { "expression": { "argumentTypes": null, "id": 680, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 674, "name": "periodFinish", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 272, "src": "4868:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 678, "name": "rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 278, "src": "4903:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 675, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1758, "src": "4883:5:4", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 676, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "4883:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 677, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 1023, "src": "4883:19:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 679, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4883:36:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4868:51:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 681, "nodeType": "ExpressionStatement", "src": "4868:51:4" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 683, "name": "reward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 601, "src": "4946:6:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 682, "name": "RewardAdded", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 784, "src": "4934:11:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 684, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "4934:19:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 685, "nodeType": "EmitStatement", "src": "4929:24:4" } ] }, "documentation": null, "id": 687, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 604, "modifierName": { "argumentTypes": null, "id": 603, "name": "onlyRewardsDistribution", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 227, "src": "3949:23:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "3949:23:4" }, { "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 607, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3994:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 606, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "3986:7:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 608, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "3986:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } } ], "id": 609, "modifierName": { "argumentTypes": null, "id": 605, "name": "updateReward", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 780, "src": "3973:12:4", "typeDescriptions": { "typeIdentifier": "t_modifier$_t_address_$", "typeString": "modifier (address)" } }, "nodeType": "ModifierInvocation", "src": "3973:24:4" } ], "name": "notifyRewardAmount", "nodeType": "FunctionDefinition", "parameters": { "id": 602, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 601, "name": "reward", "nodeType": "VariableDeclaration", "scope": 687, "src": "3924:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 600, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3924:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "3923:16:4" }, "returnParameters": { "id": 610, "nodeType": "ParameterList", "parameters": [], "src": "3998:0:4" }, "scope": 813, "src": "3896:1064:4", "stateMutability": "nonpayable", "superFunction": 215, "visibility": "external" }, { "body": { "id": 718, "nodeType": "Block", "src": "5156:214:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 701, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 697, "name": "tokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 689, "src": "5174:12:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 699, "name": "stakingToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 269, "src": "5198:12:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } ], "id": 698, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5190:7:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 700, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5190:21:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "5174:37:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "43616e6e6f7420776974686472617720746865207374616b696e6720746f6b656e", "id": 702, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5213:35:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_f43de9f2a3539b2ac9cf1844588e9cc0acd1b2bdb1ec43734f76440993ede0a9", "typeString": "literal_string \"Cannot withdraw the staking token\"" }, "value": "Cannot withdraw the staking token" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_f43de9f2a3539b2ac9cf1844588e9cc0acd1b2bdb1ec43734f76440993ede0a9", "typeString": "literal_string \"Cannot withdraw the staking token\"" } ], "id": 696, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1771, 1772 ], "referencedDeclaration": 1772, "src": "5166:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 703, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5166:83:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 704, "nodeType": "ExpressionStatement", "src": "5166:83:4" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 709, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 36, "src": "5293:5:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 710, "name": "tokenAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 691, "src": "5300:11:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 706, "name": "tokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 689, "src": "5266:12:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 705, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1428, "src": "5259:6:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IERC20_$1428_$", "typeString": "type(contract IERC20)" } }, "id": 707, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5259:20:4", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$1428", "typeString": "contract IERC20" } }, "id": 708, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeTransfer", "nodeType": "MemberAccess", "referencedDeclaration": 1461, "src": "5259:33:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1428_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1428_$", "typeString": "function (contract IERC20,address,uint256)" } }, "id": 711, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5259:53:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 712, "nodeType": "ExpressionStatement", "src": "5259:53:4" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 714, "name": "tokenAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 689, "src": "5337:12:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 715, "name": "tokenAmount", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 691, "src": "5351:11:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 713, "name": "Recovered", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 812, "src": "5327:9:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 716, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5327:36:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 717, "nodeType": "EmitStatement", "src": "5322:41:4" } ] }, "documentation": null, "id": 719, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 694, "modifierName": { "argumentTypes": null, "id": 693, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 114, "src": "5146:9:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "5146:9:4" } ], "name": "recoverERC20", "nodeType": "FunctionDefinition", "parameters": { "id": 692, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 689, "name": "tokenAddress", "nodeType": "VariableDeclaration", "scope": 719, "src": "5094:20:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 688, "name": "address", "nodeType": "ElementaryTypeName", "src": "5094:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 691, "name": "tokenAmount", "nodeType": "VariableDeclaration", "scope": 719, "src": "5116:19:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 690, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5116:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "5093:43:4" }, "returnParameters": { "id": 695, "nodeType": "ParameterList", "parameters": [], "src": "5156:0:4" }, "scope": 813, "src": "5072:298:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { "id": 742, "nodeType": "Block", "src": "5449:280:4", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 730, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 727, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1758, "src": "5480:5:4", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 728, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "5480:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "id": 729, "name": "periodFinish", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 272, "src": "5498:12:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5480:30:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "50726576696f7573207265776172647320706572696f64206d75737420626520636f6d706c657465206265666f7265206368616e67696e6720746865206475726174696f6e20666f7220746865206e657720706572696f64", "id": 731, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "5524:90:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_07f2725172f5941b576a01ec7036d341e0c837e280f27b110cb3e6fd2f2c4a56", "typeString": "literal_string \"Previous rewards period must be complete before changing the duration for the new period\"" }, "value": "Previous rewards period must be complete before changing the duration for the new period" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_07f2725172f5941b576a01ec7036d341e0c837e280f27b110cb3e6fd2f2c4a56", "typeString": "literal_string \"Previous rewards period must be complete before changing the duration for the new period\"" } ], "id": 726, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 1771, 1772 ], "referencedDeclaration": 1772, "src": "5459:7:4", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 732, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5459:165:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 733, "nodeType": "ExpressionStatement", "src": "5459:165:4" }, { "expression": { "argumentTypes": null, "id": 736, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 734, "name": "rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 278, "src": "5634:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 735, "name": "_rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 721, "src": "5652:16:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5634:34:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 737, "nodeType": "ExpressionStatement", "src": "5634:34:4" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 739, "name": "rewardsDuration", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 278, "src": "5706:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 738, "name": "RewardsDurationUpdated", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 806, "src": "5683:22:4", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 740, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5683:39:4", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 741, "nodeType": "EmitStatement", "src": "5678:44:4" } ] }, "documentation": null, "id": 743, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, "id": 724, "modifierName": { "argumentTypes": null, "id": 723, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 114, "src": "5439:9:4", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "5439:9:4" } ], "name": "setRewardsDuration", "nodeType": "FunctionDefinition", "parameters": { "id": 722, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 721, "name": "_rewardsDuration", "nodeType": "VariableDeclaration", "scope": 743, "src": "5404:24:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 720, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5404:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "5403:26:4" }, "returnParameters": { "id": 725, "nodeType": "ParameterList", "parameters": [], "src": "5449:0:4" }, "scope": 813, "src": "5376:353:4", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": { "id": 779, "nodeType": "Block", "src": "5817:283:4", "statements": [ { "expression": { "argumentTypes": null, "id": 750, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 747, "name": "rewardPerTokenStored", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 282, "src": "5827:20:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 748, "name": "rewardPerToken", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 391, "src": "5850:14:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 749, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5850:16:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5827:39:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 751, "nodeType": "ExpressionStatement", "src": "5827:39:4" }, { "expression": { "argumentTypes": null, "id": 755, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 752, "name": "lastUpdateTime", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 280, "src": "5876:14:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "id": 753, "name": "lastTimeRewardApplicable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 360, "src": "5893:24:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", "typeString": "function () view returns (uint256)" } }, "id": 754, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5893:26:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5876:43:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 756, "nodeType": "ExpressionStatement", "src": "5876:43:4" }, { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 761, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 757, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 745, "src": "5933:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 759, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5952:1:4", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 758, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5944:7:4", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 760, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5944:10:4", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "src": "5933:21:4", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 777, "nodeType": "IfStatement", "src": "5929:154:4", "trueBody": { "id": 776, "nodeType": "Block", "src": "5956:127:4", "statements": [ { "expression": { "argumentTypes": null, "id": 768, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 762, "name": "rewards", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 290, "src": "5970:7:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 764, "indexExpression": { "argumentTypes": null, "id": 763, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 745, "src": "5978:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "5970:16:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 766, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 745, "src": "5996:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 765, "name": "earned", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 420, "src": "5989:6:4", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view returns (uint256)" } }, "id": 767, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "5989:15:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5970:34:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 769, "nodeType": "ExpressionStatement", "src": "5970:34:4" }, { "expression": { "argumentTypes": null, "id": 774, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 770, "name": "userRewardPerTokenPaid", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 286, "src": "6018:22:4", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 772, "indexExpression": { "argumentTypes": null, "id": 771, "name": "account", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 745, "src": "6041:7:4", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "6018:31:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 773, "name": "rewardPerTokenStored", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 282, "src": "6052:20:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "6018:54:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 775, "nodeType": "ExpressionStatement", "src": "6018:54:4" } ] } }, { "id": 778, "nodeType": "PlaceholderStatement", "src": "6092:1:4" } ] }, "documentation": null, "id": 780, "name": "updateReward", "nodeType": "ModifierDefinition", "parameters": { "id": 746, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 745, "name": "account", "nodeType": "VariableDeclaration", "scope": 780, "src": "5800:15:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 744, "name": "address", "nodeType": "ElementaryTypeName", "src": "5800:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "5799:17:4" }, "src": "5778:322:4", "visibility": "internal" }, { "anonymous": false, "documentation": null, "id": 784, "name": "RewardAdded", "nodeType": "EventDefinition", "parameters": { "id": 783, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 782, "indexed": false, "name": "reward", "nodeType": "VariableDeclaration", "scope": 784, "src": "6164:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 781, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6164:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "6163:16:4" }, "src": "6146:34:4" }, { "anonymous": false, "documentation": null, "id": 790, "name": "Staked", "nodeType": "EventDefinition", "parameters": { "id": 789, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 786, "indexed": true, "name": "user", "nodeType": "VariableDeclaration", "scope": 790, "src": "6198:20:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 785, "name": "address", "nodeType": "ElementaryTypeName", "src": "6198:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 788, "indexed": false, "name": "amount", "nodeType": "VariableDeclaration", "scope": 790, "src": "6220:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 787, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6220:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "6197:38:4" }, "src": "6185:51:4" }, { "anonymous": false, "documentation": null, "id": 796, "name": "Withdrawn", "nodeType": "EventDefinition", "parameters": { "id": 795, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 792, "indexed": true, "name": "user", "nodeType": "VariableDeclaration", "scope": 796, "src": "6257:20:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 791, "name": "address", "nodeType": "ElementaryTypeName", "src": "6257:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 794, "indexed": false, "name": "amount", "nodeType": "VariableDeclaration", "scope": 796, "src": "6279:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 793, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6279:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "6256:38:4" }, "src": "6241:54:4" }, { "anonymous": false, "documentation": null, "id": 802, "name": "RewardPaid", "nodeType": "EventDefinition", "parameters": { "id": 801, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 798, "indexed": true, "name": "user", "nodeType": "VariableDeclaration", "scope": 802, "src": "6317:20:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 797, "name": "address", "nodeType": "ElementaryTypeName", "src": "6317:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 800, "indexed": false, "name": "reward", "nodeType": "VariableDeclaration", "scope": 802, "src": "6339:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 799, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6339:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "6316:38:4" }, "src": "6300:55:4" }, { "anonymous": false, "documentation": null, "id": 806, "name": "RewardsDurationUpdated", "nodeType": "EventDefinition", "parameters": { "id": 805, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 804, "indexed": false, "name": "newDuration", "nodeType": "VariableDeclaration", "scope": 806, "src": "6389:19:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 803, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6389:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "6388:21:4" }, "src": "6360:50:4" }, { "anonymous": false, "documentation": null, "id": 812, "name": "Recovered", "nodeType": "EventDefinition", "parameters": { "id": 811, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 808, "indexed": false, "name": "token", "nodeType": "VariableDeclaration", "scope": 812, "src": "6431:13:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 807, "name": "address", "nodeType": "ElementaryTypeName", "src": "6431:7:4", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 810, "indexed": false, "name": "amount", "nodeType": "VariableDeclaration", "scope": 812, "src": "6446:14:4", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 809, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "6446:7:4", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "6430:31:4" }, "src": "6415:47:4" } ], "scope": 814, "src": "568:5896:4" } ], "src": "0:6465:4" }, "compiler": { "name": "solc", "version": "0.5.16+commit.9c3226ce.Emscripten.clang" }, "networks": { "88": { "events": { "0xb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c": { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "oldOwner", "type": "address" }, { "indexed": false, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnerChanged", "type": "event" }, "0x906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce22": { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnerNominated", "type": "event" }, "0x8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec5": { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bool", "name": "isPaused", "type": "bool" } ], "name": "PauseChanged", "type": "event" }, "0x8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28": { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Recovered", "type": "event" }, "0xde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d": { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "RewardAdded", "type": "event" }, "0xe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486": { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" } ], "name": "RewardPaid", "type": "event" }, "0xfb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d3": { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "newDuration", "type": "uint256" } ], "name": "RewardsDurationUpdated", "type": "event" }, "0x9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d": { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Staked", "type": "event" }, "0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5": { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Withdrawn", "type": "event" } }, "links": {}, "address": "0x9969A0123c7e7553dac5390221e321C05630d102", "transactionHash": "0xfa7e4e1090594af65d178eb980fcffa256b124622c09dcdc23bbe9e6c5cab1d6" } }, "schemaVersion": "3.1.0", "updatedAt": "2021-02-04T04:32:36.478Z", "networkType": "ethereum", "devdoc": { "methods": { "setPaused(bool)": { "details": "Only the contract owner may call this." } } }, "userdoc": { "methods": { "setPaused(bool)": { "notice": "Change the paused state of the contract" } } } }