UNPKG

@polycity/core

Version:

Core contracts for the PolyCityDex protocol

871 lines 122 kB
{ "address": "0xd6Cbf2e582799889De393508362afA63E1ccb7c1", "abi": [ { "inputs": [ { "internalType": "contract IERC20", "name": "_pichi", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "pid", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" } ], "name": "Deposit", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "pid", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" } ], "name": "EmergencyWithdraw", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "pid", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Harvest", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "pichiPerSecond", "type": "uint256" } ], "name": "LogPichiPerSecond", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "pid", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "allocPoint", "type": "uint256" }, { "indexed": true, "internalType": "contract IERC20", "name": "lpToken", "type": "address" }, { "indexed": true, "internalType": "contract IRewarder", "name": "rewarder", "type": "address" } ], "name": "LogPoolAddition", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "pid", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "allocPoint", "type": "uint256" }, { "indexed": true, "internalType": "contract IRewarder", "name": "rewarder", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "overwrite", "type": "bool" } ], "name": "LogSetPool", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "pid", "type": "uint256" }, { "indexed": false, "internalType": "uint64", "name": "lastRewardTime", "type": "uint64" }, { "indexed": false, "internalType": "uint256", "name": "lpSupply", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "accPichiPerShare", "type": "uint256" } ], "name": "LogUpdatePool", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "pid", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" } ], "name": "Withdraw", "type": "event" }, { "inputs": [], "name": "PICHI", "outputs": [ { "internalType": "contract IERC20", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "allocPoint", "type": "uint256" }, { "internalType": "contract IERC20", "name": "_lpToken", "type": "address" }, { "internalType": "contract IRewarder", "name": "_rewarder", "type": "address" } ], "name": "add", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes[]", "name": "calls", "type": "bytes[]" }, { "internalType": "bool", "name": "revertOnFail", "type": "bool" } ], "name": "batch", "outputs": [ { "internalType": "bool[]", "name": "successes", "type": "bool[]" }, { "internalType": "bytes[]", "name": "results", "type": "bytes[]" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "claimOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "pid", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "to", "type": "address" } ], "name": "deposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "pid", "type": "uint256" }, { "internalType": "address", "name": "to", "type": "address" } ], "name": "emergencyWithdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "pid", "type": "uint256" }, { "internalType": "address", "name": "to", "type": "address" } ], "name": "harvest", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "lpToken", "outputs": [ { "internalType": "contract IERC20", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256[]", "name": "pids", "type": "uint256[]" } ], "name": "massUpdatePools", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_pid", "type": "uint256" } ], "name": "migrate", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "migrator", "outputs": [ { "internalType": "contract IMigratorChef", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pendingOwner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_pid", "type": "uint256" }, { "internalType": "address", "name": "_user", "type": "address" } ], "name": "pendingPichi", "outputs": [ { "internalType": "uint256", "name": "pending", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "contract IERC20", "name": "token", "type": "address" }, { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "deadline", "type": "uint256" }, { "internalType": "uint8", "name": "v", "type": "uint8" }, { "internalType": "bytes32", "name": "r", "type": "bytes32" }, { "internalType": "bytes32", "name": "s", "type": "bytes32" } ], "name": "permitToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "pichiPerSecond", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "poolInfo", "outputs": [ { "internalType": "uint128", "name": "accPichiPerShare", "type": "uint128" }, { "internalType": "uint64", "name": "lastRewardTime", "type": "uint64" }, { "internalType": "uint64", "name": "allocPoint", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "poolLength", "outputs": [ { "internalType": "uint256", "name": "pools", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "rewarder", "outputs": [ { "internalType": "contract IRewarder", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_pid", "type": "uint256" }, { "internalType": "uint256", "name": "_allocPoint", "type": "uint256" }, { "internalType": "contract IRewarder", "name": "_rewarder", "type": "address" }, { "internalType": "bool", "name": "overwrite", "type": "bool" } ], "name": "set", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "contract IMigratorChef", "name": "_migrator", "type": "address" } ], "name": "setMigrator", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_pichiPerSecond", "type": "uint256" } ], "name": "setPichiPerSecond", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "totalAllocPoint", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" }, { "internalType": "bool", "name": "direct", "type": "bool" }, { "internalType": "bool", "name": "renounce", "type": "bool" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "pid", "type": "uint256" } ], "name": "updatePool", "outputs": [ { "components": [ { "internalType": "uint128", "name": "accPichiPerShare", "type": "uint128" }, { "internalType": "uint64", "name": "lastRewardTime", "type": "uint64" }, { "internalType": "uint64", "name": "allocPoint", "type": "uint64" } ], "internalType": "struct MiniChefV2.PoolInfo", "name": "pool", "type": "tuple" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "address", "name": "", "type": "address" } ], "name": "userInfo", "outputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "int256", "name": "rewardDebt", "type": "int256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "pid", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "to", "type": "address" } ], "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "pid", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "to", "type": "address" } ], "name": "withdrawAndHarvest", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "transactionHash": "0x41f69ade4393246b25491f5e4199da9251685f4453f4d2eecd76f499dd2a5151", "receipt": { "to": null, "from": "0x9A215A93DBa89746bAB67F3FaFFc7ef55E6355c9", "contractAddress": "0xd6Cbf2e582799889De393508362afA63E1ccb7c1", "transactionIndex": 0, "gasUsed": "2473538", "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000018020000000000000000000000000000000000800000000000000000000800001000000000000000100000000000000000008020000000000000000000800000000000000000080000000000000400000000000000000000000000000000000000000000000000400000000000000200000000000000000000000000000000000000000000000000000000000024000000000000000000001000000000008000000000000000000100000000020000000000000000000002000000000000000000000000000000000000000100000", "blockHash": "0x6f8956fb7ec0fa616408903596ad945d9887471c1a7e292ce8b30f2526a480d8", "transactionHash": "0x41f69ade4393246b25491f5e4199da9251685f4453f4d2eecd76f499dd2a5151", "logs": [ { "transactionIndex": 0, "blockNumber": 18839316, "transactionHash": "0x41f69ade4393246b25491f5e4199da9251685f4453f4d2eecd76f499dd2a5151", "address": "0xd6Cbf2e582799889De393508362afA63E1ccb7c1", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000009a215a93dba89746bab67f3faffc7ef55e6355c9" ], "data": "0x", "logIndex": 0, "blockHash": "0x6f8956fb7ec0fa616408903596ad945d9887471c1a7e292ce8b30f2526a480d8" }, { "transactionIndex": 0, "blockNumber": 18839316, "transactionHash": "0x41f69ade4393246b25491f5e4199da9251685f4453f4d2eecd76f499dd2a5151", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x0000000000000000000000009a215a93dba89746bab67f3faffc7ef55e6355c9", "0x000000000000000000000000e4b8e9222704401ad16d4d826732953daf07c7e2" ], "data": "0x000000000000000000000000000000000000000000000000001a5d02557c3c0000000000000000000000000000000000000000000000000008e6d3218d026400000000000000000000000000000000000000000000000000096e74578083513000000000000000000000000000000000000000000000000008cc761f378628000000000000000000000000000000000000000000000000000988d159d5ff8d30", "logIndex": 1, "blockHash": "0x6f8956fb7ec0fa616408903596ad945d9887471c1a7e292ce8b30f2526a480d8" } ], "blockNumber": 18839316, "cumulativeGasUsed": "2473538", "status": 1, "byzantium": true }, "args": [ "0x31F072bEEA8DC490B67fCA9E2C155a1669CD9dB2" ], "solcInputHash": "54c2fb293113503b4ab1e8687e11159e", "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_pichi\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"EmergencyWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Harvest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"pichiPerSecond\",\"type\":\"uint256\"}],\"name\":\"LogPichiPerSecond\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"allocPoint\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"lpToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IRewarder\",\"name\":\"rewarder\",\"type\":\"address\"}],\"name\":\"LogPoolAddition\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"allocPoint\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contract IRewarder\",\"name\":\"rewarder\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"overwrite\",\"type\":\"bool\"}],\"name\":\"LogSetPool\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"lastRewardTime\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lpSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accPichiPerShare\",\"type\":\"uint256\"}],\"name\":\"LogUpdatePool\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"PICHI\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"allocPoint\",\"type\":\"uint256\"},{\"internalType\":\"contract IERC20\",\"name\":\"_lpToken\",\"type\":\"address\"},{\"internalType\":\"contract IRewarder\",\"name\":\"_rewarder\",\"type\":\"address\"}],\"name\":\"add\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"calls\",\"type\":\"bytes[]\"},{\"internalType\":\"bool\",\"name\":\"revertOnFail\",\"type\":\"bool\"}],\"name\":\"batch\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"successes\",\"type\":\"bool[]\"},{\"internalType\":\"bytes[]\",\"name\":\"results\",\"type\":\"bytes[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"emergencyWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"harvest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lpToken\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"pids\",\"type\":\"uint256[]\"}],\"name\":\"massUpdatePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"}],\"name\":\"migrate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"migrator\",\"outputs\":[{\"internalType\":\"contract IMigratorChef\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"pendingPichi\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pending\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permitToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pichiPerSecond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"poolInfo\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"accPichiPerShare\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"lastRewardTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"allocPoint\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"poolLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pools\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rewarder\",\"outputs\":[{\"internalType\":\"contract IRewarder\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_allocPoint\",\"type\":\"uint256\"},{\"internalType\":\"contract IRewarder\",\"name\":\"_rewarder\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"overwrite\",\"type\":\"bool\"}],\"name\":\"set\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IMigratorChef\",\"name\":\"_migrator\",\"type\":\"address\"}],\"name\":\"setMigrator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pichiPerSecond\",\"type\":\"uint256\"}],\"name\":\"setPichiPerSecond\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAllocPoint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"direct\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"renounce\",\"type\":\"bool\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"}],\"name\":\"updatePool\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"accPichiPerShare\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"lastRewardTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"allocPoint\",\"type\":\"uint64\"}],\"internalType\":\"struct MiniChefV2.PoolInfo\",\"name\":\"pool\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"rewardDebt\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawAndHarvest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The (older) MasterChef contract gives out a constant number of PICHI tokens per block. It is the only address with minting rights for PICHI. The idea for this MasterChef V2 (MCV2) contract is therefore to be the owner of a dummy token that is deposited into the MasterChef V1 (MCV1) contract. The allocation point for this pool on MCV1 is the total allocation point for all pools that receive double incentives.\",\"kind\":\"dev\",\"methods\":{\"add(uint256,address,address)\":{\"details\":\"Add a new LP to the pool. Can only be called by the owner. DO NOT add the same LP token more than once. Rewards will be messed up if you do.\",\"params\":{\"_lpToken\":\"Address of the LP ERC-20 token.\",\"_rewarder\":\"Address of the rewarder delegate.\",\"allocPoint\":\"AP of the new pool.\"}},\"constructor\":{\"params\":{\"_pichi\":\"The PICHI token contract address.\"}},\"deposit(uint256,uint256,address)\":{\"details\":\"Deposit LP tokens to MCV2 for PICHI allocation.\",\"params\":{\"amount\":\"LP token amount to deposit.\",\"pid\":\"The index of the pool. See `poolInfo`.\",\"to\":\"The receiver of `amount` deposit benefit.\"}},\"emergencyWithdraw(uint256,address)\":{\"details\":\"Withdraw without caring about rewards. EMERGENCY ONLY.\",\"params\":{\"pid\":\"The index of the pool. See `poolInfo`.\",\"to\":\"Receiver of the LP tokens.\"}},\"harvest(uint256,address)\":{\"details\":\"Harvest proceeds for transaction sender to `to`.\",\"params\":{\"pid\":\"The index of the pool. See `poolInfo`.\",\"to\":\"Receiver of PICHI rewards.\"}},\"massUpdatePools(uint256[])\":{\"details\":\"Update reward variables for all pools. Be careful of gas spending!\",\"params\":{\"pids\":\"Pool IDs of all to be updated. Make sure to update all active pools.\"}},\"migrate(uint256)\":{\"details\":\"Migrate LP token to another LP contract through the `migrator` contract.\",\"params\":{\"_pid\":\"The index of the pool. See `poolInfo`.\"}},\"pendingPichi(uint256,address)\":{\"details\":\"View function to see pending PICHI on frontend.\",\"params\":{\"_pid\":\"The index of the pool. See `poolInfo`.\",\"_user\":\"Address of user.\"},\"returns\":{\"pending\":\"PICHI reward for a given user.\"}},\"poolLength()\":{\"details\":\"Returns the number of MCV2 pools.\"},\"set(uint256,uint256,address,bool)\":{\"details\":\"Update the given pool's PICHI allocation point and `IRewarder` contract. Can only be called by the owner.\",\"params\":{\"_allocPoint\":\"New AP of the pool.\",\"_pid\":\"The index of the pool. See `poolInfo`.\",\"_rewarder\":\"Address of the rewarder delegate.\",\"overwrite\":\"True if _rewarder should be `set`. Otherwise `_rewarder` is ignored.\"}},\"setMigrator(address)\":{\"details\":\"Set the `migrator` contract. Can only be called by the owner.\",\"params\":{\"_migrator\":\"The contract address to set.\"}},\"setPichiPerSecond(uint256)\":{\"details\":\"Sets the pichi per second to be distributed. Can only be called by the owner.\",\"params\":{\"_pichiPerSecond\":\"The amount of Pichi to be distributed per second.\"}},\"updatePool(uint256)\":{\"details\":\"Update reward variables of the given pool.\",\"params\":{\"pid\":\"The index of the pool. See `poolInfo`.\"},\"returns\":{\"pool\":\"Returns the pool that was updated.\"}},\"withdraw(uint256,uint256,address)\":{\"details\":\"Withdraw LP tokens from MCV2.\",\"params\":{\"amount\":\"LP token amount to withdraw.\",\"pid\":\"The index of the pool. See `poolInfo`.\",\"to\":\"Receiver of the LP tokens.\"}},\"withdrawAndHarvest(uint256,uint256,address)\":{\"details\":\"Withdraw LP tokens from MCV2 and harvest proceeds for transaction sender to `to`.\",\"params\":{\"amount\":\"LP token amount to withdraw.\",\"pid\":\"The index of the pool. See `poolInfo`.\",\"to\":\"Receiver of the LP tokens and PICHI rewards.\"}}},\"stateVariables\":{\"PICHI\":{\"details\":\"Address of PICHI contract.\"},\"lpToken\":{\"details\":\"Address of the LP token for each MCV2 pool.\"},\"poolInfo\":{\"details\":\"Info of each MCV2 pool.\"},\"rewarder\":{\"details\":\"Address of each `IRewarder` contract in MCV2.\"},\"totalAllocPoint\":{\"details\":\"Total allocation points. Must be the sum of all allocation points in all pools.\"},\"userInfo\":{\"details\":\"Info of each user that stakes LP tokens.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/MiniChefV2.sol\":\"MiniChefV2\"},\"evmVersion\":\"istanbul\",\"libraries\":{\"__CACHE_BREAKER__\":\"0x00000000d41867734bbee4c6863d9255b2b06ac1\"},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@boringcrypto/boring-solidity/contracts/BoringBatchable.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n// Audit on 5-Jan-2021 by Keno and BoringCrypto\\n\\n// P1 - P3: OK\\npragma solidity 0.6.12;\\npragma experimental ABIEncoderV2;\\n// solhint-disable avoid-low-level-calls\\n\\nimport \\\"./libraries/BoringERC20.sol\\\";\\n\\n// T1 - T4: OK\\ncontract BaseBoringBatchable {\\n function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {\\n // If the _res length is less than 68, then the transaction failed silently (without a revert message)\\n if (_returnData.length < 68) return \\\"Transaction reverted silently\\\";\\n\\n assembly {\\n // Slice the sighash.\\n _returnData := add(_returnData, 0x04)\\n }\\n return abi.decode(_returnData, (string)); // All that remains is the revert string\\n } \\n \\n // F3 - F9: OK\\n // F1: External is ok here because this is the batch function, adding it to a batch makes no sense\\n // F2: Calls in the batch may be payable, delegatecall operates in the same context, so each call in the batch has access to msg.value\\n // C1 - C21: OK\\n // C3: The length of the loop is fully under user control, so can't be exploited\\n // C7: Delegatecall is only used on the same contract, so it's safe\\n function batch(bytes[] calldata calls, bool revertOnFail) external payable returns(bool[] memory successes, bytes[] memory results) {\\n // Interactions\\n successes = new bool[](calls.length);\\n results = new bytes[](calls.length);\\n for (uint256 i = 0; i < calls.length; i++) {\\n (bool success, bytes memory result) = address(this).delegatecall(calls[i]);\\n require(success || !revertOnFail, _getRevertMsg(result));\\n successes[i] = success;\\n results[i] = result;\\n }\\n }\\n}\\n\\n// T1 - T4: OK\\ncontract BoringBatchable is BaseBoringBatchable {\\n // F1 - F9: OK\\n // F6: Parameters can be used front-run the permit and the user's permit will fail (due to nonce or other revert)\\n // if part of a batch this could be used to grief once as the second call would not need the permit\\n // C1 - C21: OK\\n function permitToken(IERC20 token, address from, address to, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n // Interactions\\n // X1 - X5\\n token.permit(from, to, amount, deadline, v, r, s);\\n }\\n}\",\"keccak256\":\"0xab938b3b1b3328f8fbabee16c5481f021ebc581a2176b2ce2a2aedc66f9da293\",\"license\":\"UNLICENSED\"},\"@boringcrypto/boring-solidity/contracts/BoringOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Audit on 5-Jan-2021 by Keno and BoringCrypto\\n\\n// P1 - P3: OK\\npragma solidity 0.6.12;\\n\\n// Source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol + Claimable.sol\\n// Edited by BoringCrypto\\n\\n// T1 - T4: OK\\ncontract BoringOwnableData {\\n // V1 - V5: OK\\n address public owner;\\n // V1 - V5: OK\\n address public pendingOwner;\\n}\\n\\n// T1 - T4: OK\\ncontract BoringOwnable is BoringOwnableData {\\n // E1: OK\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n constructor () public {\\n owner = msg.sender;\\n emit OwnershipTransferred(address(0), msg.sender);\\n }\\n\\n // F1 - F9: OK\\n // C1 - C21: OK\\n function transferOwnership(address newOwner, bool direct, bool renounce) public onlyOwner {\\n if (direct) {\\n // Checks\\n require(newOwner != address(0) || renounce, \\\"Ownable: zero address\\\");\\n\\n // Effects\\n emit OwnershipTransferred(owner, newOwner);\\n owner = newOwner;\\n pendingOwner = address(0);\\n } else {\\n // Effects\\n pendingOwner = newOwner;\\n }\\n }\\n\\n // F1 - F9: OK\\n // C1 - C21: OK\\n function claimOwnership() public {\\n address _pendingOwner = pendingOwner;\\n \\n // Checks\\n require(msg.sender == _pendingOwner, \\\"Ownable: caller != pending owner\\\");\\n\\n // Effects\\n emit OwnershipTransferred(owner, _pendingOwner);\\n owner = _pendingOwner;\\n pendingOwner = address(0);\\n }\\n\\n // M1 - M5: OK\\n // C1 - C21: OK\\n modifier onlyOwner() {\\n require(msg.sender == owner, \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n}\",\"keccak256\":\"0x5ee0d5606a9dd683203a34ecde9ea08e4e5ffd3ae2c0ea16d94192cac0db94e3\",\"license\":\"MIT\"},\"@boringcrypto/boring-solidity/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.6.12;\\n\\ninterface IERC20 {\\n function totalSupply() external view returns (uint256);\\n function balanceOf(address account) external view returns (uint256);\\n function allowance(address owner, address spender) external view returns (uint256);\\n function approve(address spender, uint256 amount) external returns (bool);\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n // EIP 2612\\n function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;\\n}\",\"keccak256\":\"0xbc2bbe46ffb84b39aa0e39c925b071e3a2ce6e912f7f216619550a38bbf0f9b3\",\"license\":\"MIT\"},\"@boringcrypto/boring-solidity/contracts/libraries/BoringERC20.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.6.12;\\n\\nimport \\\"../interfaces/IERC20.sol\\\";\\n\\nlibrary BoringERC20 {\\n function safeSymbol(IERC20 token) internal view returns(string memory) {\\n (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(0x95d89b41));\\n return success && data.length > 0 ? abi.decode(data, (string)) : \\\"???\\\";\\n }\\n\\n function safeName(IERC20 token) internal view returns(string memory) {\\n (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(0x06fdde03));\\n return success && data.length > 0 ? abi.decode(data, (string)) : \\\"???\\\";\\n }\\n\\n function safeDecimals(IERC20 token) internal view returns (uint8) {\\n (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(0x313ce567));\\n return success && data.length == 32 ? abi.decode(data, (uint8)) : 18;\\n }\\n\\n function safeTransfer(IERC20 token, address to, uint256 amount) internal {\\n (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(0xa9059cbb, to, amount));\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"BoringERC20: Transfer failed\\\");\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 amount) internal {\\n (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(0x23b872dd, from, to, amount));\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"BoringERC20: TransferFrom failed\\\");\\n }\\n}\",\"keccak256\":\"0x74e55a994e33a3d6ca777c4adbd573b5427e33030c1e8603dc09f07b5f4d0a51\",\"license\":\"UNLICENSED\"},\"@boringcrypto/boring-solidity/contracts/libraries/BoringMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.6.12;\\n// a library for performing overflow-safe math, updated with awesomeness from of DappHub (https://github.com/dapphub/ds-math)\\nlibrary BoringMath {\\n function add(uint256 a, uint256 b) internal pure returns (uint256 c) {require((c = a + b) >= b, \\\"BoringMath: Add Overflow\\\");}\\n function sub(uint256 a, uint256 b) internal pure returns (uint256 c) {require((c = a - b) <= a, \\\"BoringMath: Underflow\\\");}\\n function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {require(b == 0 || (c = a * b)/b == a, \\\"BoringMath: Mul Overflow\\\");}\\n function to128(uint256 a) internal pure returns (uint128 c) {\\n require(a <= uint128(-1), \\\"BoringMath: uint128 Overflow\\\");\\n c = uint128(a);\\n }\\n function to64(uint256 a) internal pure returns (uint64 c) {\\n require(a <= uint64(-1), \\\"BoringMath: uint64 Overflow\\\");\\n c = uint64(a);\\n }\\n function to32(uint256 a) internal pure returns (uint32 c) {\\n require(a <= uint32(-1), \\\"BoringMath: uint32 Overflow\\\");\\n c = uint32(a);\\n }\\n}\\n\\nlibrary BoringMath128 {\\n function add(uint128 a, uint128 b) internal pure returns (uint128 c) {require((c = a + b) >= b, \\\"BoringMath: Add Overflow\\\");}\\n function sub(uint128 a, uint128 b) internal pure returns (uint128 c) {require((c = a - b) <= a, \\\"BoringMath: Underflow\\\");}\\n}\\n\\nlibrary BoringMath64 {\\n function add(uint64 a, uint64 b) internal pure returns (uint64 c) {require((c = a + b) >= b, \\\"BoringMath: Add Overflow\\\");}\\n function sub(uint64 a, uint64 b) internal pure returns (uint64 c) {require((c = a - b) <= a, \\\"BoringMath: Underflow\\\");}\\n}\\n\\nlibrary BoringMath32 {\\n function add(uint32 a, uint32 b) internal pure returns (uint32 c) {require((c = a + b) >= b, \\\"BoringMath: Add Overflow\\\");}\\n function sub(uint32 a, uint32 b) internal pure returns (uint32 c) {require((c = a - b) <= a, \\\"BoringMath: Underflow\\\");}\\n}\",\"keccak256\":\"0x697187e610e3fb6d83cbb7a21d3207acd587fee596efde089e48e159ff29687e\",\"license\":\"MIT\"},\"contracts/MiniChefV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.6.12;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"@boringcrypto/boring-solidity/contracts/libraries/BoringMath.sol\\\";\\nimport \\\"@boringcrypto/boring-solidity/contracts/BoringBatchable.sol\\\";\\nimport \\\"@boringcrypto/boring-solidity/contracts/BoringOwnable.sol\\\";\\nimport \\\"./libraries/SignedSafeMath.sol\\\";\\nimport \\\"./interfaces/IRewarder.sol\\\";\\nimport \\\"./interfaces/IMasterChef.sol\\\";\\n\\ninterface IMigratorChef {\\n // Take the current LP token address and return the new LP token address.\\n // Migrator should have full access to the caller's LP token.\\n function migrate(IERC20 token) external returns (IERC20);\\n}\\n\\n/// @dev The (older) MasterChef contract gives out a constant number of PICHI tokens per block.\\n/// It is the only address with minting rights for PICHI.\\n/// The idea for this MasterChef V2 (MCV2) contract is therefore to be the owner of a dummy token\\n/// that is deposited into the MasterChef V1 (MCV1) contract.\\n/// The allocation point for this pool on MCV1 is the total allocation point for all pools that receive double incentives.\\ncontract MiniChefV2 is BoringOwnable, BoringBatchable {\\n using BoringMath for uint256;\\n using BoringMath128 for uint128;\\n using BoringERC20 for IERC20;\\n using SignedSafeMath for int256;\\n\\n /// @dev Info of each MCV2 user.\\n /// `amount` LP token amount the user has provided.\\n /// `rewardDebt` The amount of PICHI entitled to the user.\\n struct UserInfo {\\n uint256 amount;\\n int256 rewardDebt;\\n }\\n\\n /// @dev Info of each MCV2 pool.\\n /// `allocPoint` The amount of allocation points assigned to the pool.\\n /// Also known as the amount of PICHI to distribute per block.\\n struct PoolInfo {\\n uint128 accPichiPerShare;\\n uint64 lastRewardTime;\\n uint64 allocPoint;\\n }\\n\\n /// @dev Address of PICHI contract.\\n IERC20 public immutable PICHI;\\n // @dev The migrator contract. It has a lot of power. Can only be set through governance (owner).\\n IMigratorChef public migrator;\\n\\n /// @dev Info of each MCV2 pool.\\n PoolInfo[] public poolInfo;\\n /// @dev Address of the LP token for each MCV2 pool.\\n IERC20[] public lpToken;\\n /// @dev Address of each `IRewarder` contract in MCV2.\\n IRewarder[] public rewarder;\\n\\n /// @dev Info of each user that stakes LP tokens.\\n mapping (uint256 => mapping (address => UserInfo)) public userInfo;\\n /// @dev Total allocation points. Must be the sum of all allocation points in all pools.\\n uint256 public totalAllocPoint;\\n\\n uint256 public pichiPerSecond;\\n uint256 private constant ACC_PICHI_PRECISION = 1e12;\\n\\n event Deposit(address indexed user, uint256 indexed pid, uint256 amount, address indexed to);\\n event Withdraw(address indexed user, uint256 indexed pid, uint256 amount, address indexed to);\\n event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount, address indexed to);\\n event Harvest(address indexed user, uint256 indexed pid, uint256 amount);\\n event LogPoolAddition(uint256 indexed pid, uint256 allocPoint, IERC20 indexed lpToken, IRewarder indexed rewarder);\\n event LogSetPool(uint256 indexed pid, uint256 allocPoint, IRewarder indexed rewarder, bool overwrite);\\n event LogUpdatePool(uint256 indexed pid, uint64 last