auto-farmer/ShinobiPool.json

15769 lines
676 KiB
JSON
Raw Normal View History

2021-02-14 21:09:47 +00:00
{
"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,\
"bytecode": "0x6080604052600060065560006007556201518060085534801561002157600080fd5b506040516119ac3803806119ac8339818101604052608081101561004457600080fd5b5080516020820151604083015160609093015191929091836001600160a01b0381166100b7576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a1506002805460ff60a01b1916600160a01b1790556000546001600160a01b0316610174576040805162461bcd60e51b815260206004820152601160248201527013dddb995c881b5d5cdd081899481cd95d607a1b604482015290519081900360640190fd5b600480546001600160a01b0393841661010002610100600160a81b0319909116179055600580549183166001600160a01b031992831617905560028054939092169216919091179055506117df806101cd6000396000f3fe608060405234801561001057600080fd5b50600436106101e45760003560e01c806372f702f31161010f578063a694fc3a116100a2578063d1af0c7d11610071578063d1af0c7d14610448578063df136d6514610450578063e9fad8ee14610458578063ebe2b12b14610460576101e4565b8063a694fc3a146103fe578063c8f33c911461041b578063cc1a378f14610423578063cd3daf9d14610440576101e4565b80638980f11f116100de5780638980f11f1461039c5780638b876347146103c85780638da5cb5b146103ee57806391b4ded9146103f6576101e4565b806372f702f31461037c57806379ba5097146103845780637b0a47ee1461038c57806380faa57d14610394576101e4565b80632e1a7d4d116101875780633fc6df6e116101565780633fc6df6e1461030e57806353a47bb7146103325780635c975abb1461033a57806370a0823114610356576101e4565b80632e1a7d4d146102c4578063386a9525146102e15780633c6b16ab146102e95780633d18b91214610306576101e4565b806316c38b3c116101c357806316c38b3c1461026f57806318160ddd1461028e57806319762143146102965780631c1f78eb146102bc576101e4565b80628cc262146101e95780630700037d146102215780631627540c14610247575b600080fd5b61020f600480360360208110156101ff57600080fd5b50356001600160a01b0316610468565b60408051918252519081900360200190f35b61020f6004803603602081101561023757600080fd5b50356001600160a01b03166104fe565b61026d6004803603602081101561025d57600080fd5b50356001600160a01b0316610510565b005b61026d6004803603602081101561028557600080fd5b5035151561056c565b61020f6105e6565b61026d600480360360208110156102ac57600080fd5b50356001600160a01b03166105ed565b61020f610617565b61026d600480360360208110156102da57600080fd5b5035610635565b61020f6107f3565b61026d600480360360208110156102ff57600080fd5b50356107f9565b61026d610a52565b610316610baf565b604080516001600160a01b039092168252519081900360200190f35b610316610bbe565b610342610bcd565b604080519115158252519081900360200190f35b61020f6004803603602081101561036c57600080fd5b50356001600160a01b0316610bd6565b610316610bf1565b61026d610c00565b61020f610cbc565b61020f610cc2565b61026d600480360360408110156103b257600080fd5b506001600160a01b038135169060200135610cd0565b61020f600480360360208110156103de57600080fd5b50356001600160a01b0316610d8d565b610316610d9f565b61020f610dae565b61026d6004803603602081101561041457600080fd5b5035610db4565b61020f610fb2565b61026d6004803603602081101561043957600080fd5b5035610fb8565b61020f61103b565b610316611095565b61020f6110a9565b61026d6110af565b61020f6110d2565b6001600160a01b0381166000908152600c6020908152604080832054600b9092528220546104f891906104ec90670de0b6b3a7640000906104e0906104bb906104af61103b565b9063ffffffff6110d816565b6001600160a01b0388166000908152600e60205260409020549063ffffffff61112116565b9063ffffffff61117a16565b9063ffffffff6111bc16565b92915050565b600c6020526000908152604090205481565b610518611216565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b610574611216565b60045460ff161515811515141561058a576105e3565b6004805460ff1916821515179081905560ff16156105a757426003555b6004546040805160ff90921615158252517f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59181900360200190a15b50565b600d545b90565b6105f5611216565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600061063060085460075461112190919063
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101e45760003560e01c806372f702f31161010f578063a694fc3a116100a2578063d1af0c7d11610071578063d1af0c7d14610448578063df136d6514610450578063e9fad8ee14610458578063ebe2b12b14610460576101e4565b8063a694fc3a146103fe578063c8f33c911461041b578063cc1a378f14610423578063cd3daf9d14610440576101e4565b80638980f11f116100de5780638980f11f1461039c5780638b876347146103c85780638da5cb5b146103ee57806391b4ded9146103f6576101e4565b806372f702f31461037c57806379ba5097146103845780637b0a47ee1461038c57806380faa57d14610394576101e4565b80632e1a7d4d116101875780633fc6df6e116101565780633fc6df6e1461030e57806353a47bb7146103325780635c975abb1461033a57806370a0823114610356576101e4565b80632e1a7d4d146102c4578063386a9525146102e15780633c6b16ab146102e95780633d18b91214610306576101e4565b806316c38b3c116101c357806316c38b3c1461026f57806318160ddd1461028e57806319762143146102965780631c1f78eb146102bc576101e4565b80628cc262146101e95780630700037d146102215780631627540c14610247575b600080fd5b61020f600480360360208110156101ff57600080fd5b50356001600160a01b0316610468565b60408051918252519081900360200190f35b61020f6004803603602081101561023757600080fd5b50356001600160a01b03166104fe565b61026d6004803603602081101561025d57600080fd5b50356001600160a01b0316610510565b005b61026d6004803603602081101561028557600080fd5b5035151561056c565b61020f6105e6565b61026d600480360360208110156102ac57600080fd5b50356001600160a01b03166105ed565b61020f610617565b61026d600480360360208110156102da57600080fd5b5035610635565b61020f6107f3565b61026d600480360360208110156102ff57600080fd5b50356107f9565b61026d610a52565b610316610baf565b604080516001600160a01b039092168252519081900360200190f35b610316610bbe565b610342610bcd565b604080519115158252519081900360200190f35b61020f6004803603602081101561036c57600080fd5b50356001600160a01b0316610bd6565b610316610bf1565b61026d610c00565b61020f610cbc565b61020f610cc2565b61026d600480360360408110156103b257600080fd5b506001600160a01b038135169060200135610cd0565b61020f600480360360208110156103de57600080fd5b50356001600160a01b0316610d8d565b610316610d9f565b61020f610dae565b61026d6004803603602081101561041457600080fd5b5035610db4565b61020f610fb2565b61026d6004803603602081101561043957600080fd5b5035610fb8565b61020f61103b565b610316611095565b61020f6110a9565b61026d6110af565b61020f6110d2565b6001600160a01b0381166000908152600c6020908152604080832054600b9092528220546104f891906104ec90670de0b6b3a7640000906104e0906104bb906104af61103b565b9063ffffffff6110d816565b6001600160a01b0388166000908152600e60205260409020549063ffffffff61112116565b9063ffffffff61117a16565b9063ffffffff6111bc16565b92915050565b600c6020526000908152604090205481565b610518611216565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b610574611216565b60045460ff161515811515141561058a576105e3565b6004805460ff1916821515179081905560ff16156105a757426003555b6004546040805160ff90921615158252517f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59181900360200190a15b50565b600d545b90565b6105f5611216565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600061063060085460075461112190919063ffffffff16565b905090565b600254600160a01b900460ff16610693576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002805460ff60a01b19169055336106a961103b565b600a556106b4610cc2565b6009556001600160a01b038116156106fb576106cf81610468565b6001600160a01b0382166000908152600c6020908152604080832093909355600a54600b909152919020555b60008211610744576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600d54610757908363ffffffff6110d816565b600d55336000908152600e602052604090205461077a908363ffffffff6110d816565b336000818152600e60205260409020919091556005546107a6916001600160a01b03909116908461125f565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a250506002805460ff60a01b1916600160a01b17905556
"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
"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) exter
"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"
}
}
}
}