@ohgeez/fsushi
Version:
fSUSHI is a protocol built on top of [FlashStake](http://flashstake.io/) and [SushiSwap](https://sushi.com) that enables stakers to get instant, upfront yield without waiting for it to accrue.
146 lines • 60.4 kB
JSON
{
"address": "0xd7Ed9a4d7DC7Ce4066d0e32FF993bf59c89e3648",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_flashStrategyFactory",
"type": "address"
},
{
"internalType": "address",
"name": "_sousChef",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "pid",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountLP",
"type": "uint256"
},
{
"internalType": "address[]",
"name": "path0",
"type": "address[]"
},
{
"internalType": "address[]",
"name": "path1",
"type": "address[]"
},
{
"internalType": "uint256",
"name": "amountMin",
"type": "uint256"
},
{
"internalType": "address",
"name": "beneficiary",
"type": "address"
},
{
"internalType": "uint256",
"name": "stakeDuration",
"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": "cook",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "flashStrategyFactory",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "flpTokenFactory",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "sousChef",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"transactionHash": "0xd99e259fc47811f6fd76135a0cdf5850f050bd1f874e019d066727fd263f35a7",
"receipt": {
"to": null,
"from": "0x612ef87bfcd858687160294b0eFFACA0CBA342E2",
"contractAddress": "0xd7Ed9a4d7DC7Ce4066d0e32FF993bf59c89e3648",
"transactionIndex": 144,
"gasUsed": "760535",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x014f13ab6a555983253e24ac4c6c232bbd2d35c5aed2fc10e6ebd50963e9e5d8",
"transactionHash": "0xd99e259fc47811f6fd76135a0cdf5850f050bd1f874e019d066727fd263f35a7",
"logs": [],
"blockNumber": 16379197,
"cumulativeGasUsed": "13123767",
"status": 1,
"byzantium": true
},
"args": [
"0x77b8E6e577fd3e90553dbF205D3854a649414741",
"0x991660133a987F21c6225027C33B9B5680272850"
],
"numDeployments": 4,
"solcInputHash": "c20380826da928da38a1473b91e27f2a",
"metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_flashStrategyFactory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sousChef\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountLP\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path0\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"path1\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"amountMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"stakeDuration\",\"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\":\"cook\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"flashStrategyFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"flpTokenFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sousChef\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/FSushiCookV0.sol\":\"FSushiCookV0\"},\"evmVersion\":\"london\",\"libraries\":{\":__CACHE_BREAKER__\":\"0x00000000d41867734bbee4c6863d9255b2b06ac1\"},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xf41ca991f30855bf80ffd11e9347856a517b977f0a6c2d52e6421a99b7840329\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/draft-IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9b72f93be69ca894d8492c244259615c4a742afc8d63720dbc8bb81087d9b238\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"license\":\"MIT\"},\"@sushiswap/core/contracts/uniswapv2/interfaces/IUniswapV2Pair.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface IUniswapV2Pair {\\n event Approval(address indexed owner, address indexed spender, uint value);\\n event Transfer(address indexed from, address indexed to, uint value);\\n\\n function name() external pure returns (string memory);\\n function symbol() external pure returns (string memory);\\n function decimals() external pure returns (uint8);\\n function totalSupply() external view returns (uint);\\n function balanceOf(address owner) external view returns (uint);\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function approve(address spender, uint value) external returns (bool);\\n function transfer(address to, uint value) external returns (bool);\\n function transferFrom(address from, address to, uint value) external returns (bool);\\n\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n function PERMIT_TYPEHASH() external pure returns (bytes32);\\n function nonces(address owner) external view returns (uint);\\n\\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\\n\\n event Mint(address indexed sender, uint amount0, uint amount1);\\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\\n event Swap(\\n address indexed sender,\\n uint amount0In,\\n uint amount1In,\\n uint amount0Out,\\n uint amount1Out,\\n address indexed to\\n );\\n event Sync(uint112 reserve0, uint112 reserve1);\\n\\n function MINIMUM_LIQUIDITY() external pure returns (uint);\\n function factory() external view returns (address);\\n function token0() external view returns (address);\\n function token1() external view returns (address);\\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\\n function price0CumulativeLast() external view returns (uint);\\n function price1CumulativeLast() external view returns (uint);\\n function kLast() external view returns (uint);\\n\\n function mint(address to) external returns (uint liquidity);\\n function burn(address to) external returns (uint amount0, uint amount1);\\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\\n function skim(address to) external;\\n function sync() external;\\n\\n function initialize(address, address) external;\\n}\",\"keccak256\":\"0x08f9a63b34855eec941be8d36a04424f1a1725a2c030373fcef3afeb480ca385\",\"license\":\"GPL-3.0\"},\"contracts/FSushiCookV0.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.17;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport \\\"@sushiswap/core/contracts/uniswapv2/interfaces/IUniswapV2Pair.sol\\\";\\nimport \\\"./interfaces/IFlashStrategySushiSwapFactory.sol\\\";\\nimport \\\"./interfaces/IFlashStrategySushiSwap.sol\\\";\\nimport \\\"./interfaces/IFarmingLPTokenFactory.sol\\\";\\nimport \\\"./interfaces/IFarmingLPToken.sol\\\";\\nimport \\\"./interfaces/ISousChef.sol\\\";\\nimport \\\"./interfaces/IFSushiBill.sol\\\";\\n\\ninterface IFlashProtocol_ {\\n function stake(\\n address _strategyAddress,\\n uint256 _tokenAmount,\\n uint256 _stakeDuration,\\n address _fTokensTo,\\n bool _issueNFT\\n )\\n external\\n returns (\\n address stakerAddress,\\n address strategyAddress,\\n uint256 stakeStartTs,\\n uint256 stakeDuration,\\n uint256 stakedAmount,\\n bool active,\\n uint256 nftId,\\n uint256 fTokensToUser,\\n uint256 fTokensFee,\\n uint256 totalFTokenBurned,\\n uint256 totalStakedWithdrawn\\n );\\n}\\n\\ncontract FSushiCookV0 {\\n using SafeERC20 for IERC20;\\n\\n address public immutable flashStrategyFactory;\\n address public immutable flpTokenFactory;\\n address public immutable sousChef;\\n\\n constructor(address _flashStrategyFactory, address _sousChef) {\\n flashStrategyFactory = _flashStrategyFactory;\\n flpTokenFactory = IFlashStrategySushiSwapFactory(_flashStrategyFactory).flpTokenFactory();\\n sousChef = _sousChef;\\n }\\n\\n function cook(\\n uint256 pid,\\n uint256 amountLP,\\n address[] calldata path0,\\n address[] calldata path1,\\n uint256 amountMin,\\n address beneficiary,\\n uint256 stakeDuration,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public {\\n address flpToken = IFarmingLPTokenFactory(flpTokenFactory).getFarmingLPToken(pid);\\n address lpToken = IFarmingLPToken(flpToken).lpToken();\\n\\n IUniswapV2Pair(lpToken).permit(msg.sender, address(this), amountLP, deadline, v, r, s);\\n IERC20(lpToken).safeTransferFrom(msg.sender, address(this), amountLP);\\n\\n IERC20(lpToken).approve(flpToken, amountLP);\\n IFarmingLPToken(flpToken).deposit(amountLP, path0, path1, amountMin, address(this), deadline);\\n\\n uint256 amountFLP = IFarmingLPToken(flpToken).balanceOf(address(this));\\n address strategy = IFlashStrategySushiSwapFactory(flashStrategyFactory).getFlashStrategySushiSwap(pid);\\n\\n address protocol = IFlashStrategySushiSwap(strategy).flashProtocol();\\n IERC20(flpToken).approve(protocol, amountFLP);\\n (, , , , , , , uint256 fTokensToUser, , , ) = IFlashProtocol_(protocol).stake(\\n strategy,\\n amountFLP,\\n stakeDuration,\\n address(this),\\n false\\n );\\n\\n address fToken = IFlashStrategySushiSwap(strategy).fToken();\\n address bill = ISousChef(sousChef).getBill(pid);\\n\\n IERC20(fToken).approve(bill, fTokensToUser);\\n IFSushiBill(bill).deposit(fTokensToUser, beneficiary);\\n }\\n}\\n\",\"keccak256\":\"0xf4db59e08a71ada921e432853b793281c9b644d7a9259995ac6e0d0d0340a3f6\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IFSushiBill.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\ninterface IFSushiBill is IERC20Metadata {\\n error NoClaimableRewards();\\n\\n event Deposit(address indexed account, uint256 amount, address indexed beneficiary);\\n event Withdraw(address indexed account, uint256 amount, address indexed beneficiary);\\n event Checkpoint();\\n event UserCheckpoint(address indexed account);\\n event ClaimRewards(address indexed account, address indexed beneficiary, uint256 amount);\\n\\n function sousChef() external view returns (address);\\n\\n function pid() external view returns (uint256);\\n\\n function fToken() external view returns (address);\\n\\n function points(uint256 week) external view returns (uint256);\\n\\n function lastCheckpoint() external view returns (uint256 timestamp);\\n\\n function userPoints(address account, uint256 week) external view returns (uint256);\\n\\n function userLastCheckpoint(address account) external view returns (uint256 timestamp);\\n\\n function claimedRewards(address account) external view returns (uint256);\\n\\n function nextClaimableWeek(address account) external view returns (uint256);\\n\\n function initialize(uint256 _pid, address _fToken) external;\\n\\n function deposit(uint256 amount, address beneficiary) external;\\n\\n function withdraw(uint256 amount, address beneficiary) external;\\n\\n function claimRewards(address beneficiary) external;\\n\\n function checkpoint() external;\\n\\n function userCheckpoint(address account) external;\\n}\\n\",\"keccak256\":\"0x10aced848e0f105686eb4878940a81f0bceb201a56494c50d6204aef5dc62ec1\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IFarmingLPToken.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.17;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface IFarmingLPToken is IERC20 {\\n error InvalidPath();\\n error InsufficientYield();\\n error InsufficientAmount();\\n error NoMigratorSet();\\n\\n event Deposit(uint256 shares, uint256 amountLP, address indexed beneficiary);\\n event Withdraw(uint256 shares, uint256 amountLP, address indexed beneficiary);\\n event EmergencyWithdraw(uint256 shares, uint256 amountLP, address indexed beneficiary);\\n event ClaimSushi(uint256 shares, uint256 yield, address indexed beneficiary);\\n event Migrate(uint256 shares, uint256 amountLP, address indexed beneficiary);\\n event EmergencyMigrate(uint256 shares, uint256 amountLP, address indexed beneficiary);\\n\\n function initialize(\\n address _router,\\n address _masterChef,\\n uint256 _pid\\n ) external;\\n\\n function factory() external view returns (address);\\n\\n function router() external view returns (address);\\n\\n function masterChef() external view returns (address);\\n\\n function sushi() external view returns (address);\\n\\n function pid() external view returns (uint256);\\n\\n function lpToken() external view returns (address);\\n\\n function token0() external view returns (address);\\n\\n function token1() external view returns (address);\\n\\n function withdrawableTotalLPs() external view returns (uint256);\\n\\n function withdrawableLPsOf(address account) external view returns (uint256);\\n\\n function withdrawableTotalYield() external view returns (uint256);\\n\\n function withdrawableYieldOf(address account) external view returns (uint256);\\n\\n function totalShares() external view returns (uint256);\\n\\n function sharesOf(address account) external view returns (uint256);\\n\\n function approveMax() external;\\n\\n function depositSigned(\\n uint256 amountLP,\\n address[] calldata path0,\\n address[] calldata path1,\\n uint256 amountMin,\\n address beneficiary,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n function deposit(\\n uint256 amountLP,\\n address[] calldata path0,\\n address[] calldata path1,\\n uint256 amountMin,\\n address beneficiary,\\n uint256 deadline\\n ) external;\\n\\n function depositWithSushi(\\n uint256 amount,\\n address[] calldata path0,\\n address[] calldata path1,\\n uint256 amountLPMin,\\n address beneficiary,\\n uint256 deadline\\n ) external;\\n\\n function withdraw(uint256 shares, address beneficiary) external;\\n\\n function emergencyWithdraw(address beneficiary) external;\\n\\n function migrate(address beneficiary, bytes calldata params) external;\\n\\n function emergencyMigrate(address beneficiary, bytes calldata params) external;\\n\\n function checkpoint() external;\\n}\\n\",\"keccak256\":\"0x72184ba706021d3c901e7481b624e95d3d43699335d159baf778de69a2edce5e\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IFarmingLPTokenFactory.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\ninterface IFarmingLPTokenFactory {\\n error InvalidAddress();\\n error MigratorSet();\\n error TokenCreated();\\n\\n event UpdateVault(address indexed vault);\\n event UpdateMigrator(address indexed migrator);\\n event CreateFarmingLPToken(uint256 indexed pid, address indexed token);\\n\\n function router() external view returns (address);\\n\\n function masterChef() external view returns (address);\\n\\n function yieldVault() external view returns (address);\\n\\n function migrator() external view returns (address);\\n\\n function getFarmingLPToken(uint256 pid) external view returns (address);\\n\\n function predictFarmingLPTokenAddress(uint256 pid) external view returns (address token);\\n\\n function updateYieldVault(address vault) external;\\n\\n function updateMigrator(address vault) external;\\n\\n function createFarmingLPToken(uint256 pid) external returns (address token);\\n}\\n\",\"keccak256\":\"0x1cdd684bf0d94c6bce80efcc5b93761a02356bde314f4851f1ba82059378e5c4\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IFlashStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\ninterface IFlashStrategy {\\n event BurnedFToken(address indexed _address, uint256 _tokenAmount, uint256 _yieldReturned);\\n\\n // This is how principal will be deposited into the contract\\n // The Flash protocol allows the strategy to specify how much\\n // should be registered. This allows the strategy to manipulate (eg take fee)\\n // on the principal if the strategy requires\\n function depositPrincipal(uint256 _tokenAmount) external returns (uint256);\\n\\n // This is how principal will be returned from the contract\\n function withdrawPrincipal(uint256 _tokenAmount) external;\\n\\n // Responsible for instant upfront yield. Takes fERC20 tokens specific to this\\n // strategy. The strategy is responsible for returning some amount of principal tokens\\n function burnFToken(\\n uint256 _tokenAmount,\\n uint256 _minimumReturned,\\n address _yieldTo\\n ) external returns (uint256);\\n\\n // This should return the current total of all principal within the contract\\n function getPrincipalBalance() external view returns (uint256);\\n\\n // This should return the current total of all yield generated to date (including bootstrapped tokens)\\n function getYieldBalance() external view returns (uint256);\\n\\n // This should return the principal token address (eg DAI)\\n function getPrincipalAddress() external view returns (address);\\n\\n // View function which quotes how many principal tokens would be returned if x\\n // fERC20 tokens are burned\\n function quoteMintFToken(uint256 _tokenAmount, uint256 duration) external view returns (uint256);\\n\\n // View function which quotes how many principal tokens would be returned if x\\n // fERC20 tokens are burned\\n // IMPORTANT NOTE: This should utilise bootstrap tokens if they exist\\n // bootstrapped tokens are any principal tokens that exist within the smart contract\\n function quoteBurnFToken(uint256 _tokenAmount) external view returns (uint256);\\n\\n // The function to set the fERC20 address within the strategy\\n function setFTokenAddress(address _fTokenAddress) external;\\n\\n // This should return what the maximum stake duration is\\n function getMaxStakeDuration() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x8c72e893e2c11a247880fbacf8a0f761268797b789d269f7e0714c00efd5b988\",\"license\":\"MIT\"},\"contracts/interfaces/IFlashStrategySushiSwap.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IFlashStrategy.sol\\\";\\n\\ninterface IFlashStrategySushiSwap is IFlashStrategy {\\n error Forbidden();\\n error InvalidVault();\\n error AmountTooLow();\\n error InsufficientYield();\\n error InsufficientTotalSupply();\\n\\n function factory() external view returns (address);\\n\\n function flashProtocol() external view returns (address);\\n\\n function fToken() external view returns (address);\\n\\n function sushi() external view returns (address);\\n\\n function flpToken() external view returns (address);\\n\\n function initialize(address _flashProtocol, address _flpToken) external;\\n}\\n\",\"keccak256\":\"0xa533e69b48a4816db0e03fbd23eb39bad5ab23e762602a326619fb92cb94a774\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IFlashStrategySushiSwapFactory.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\ninterface IFlashStrategySushiSwapFactory {\\n error InvalidFee();\\n error InvalidFeeRecipient();\\n error FlashStrategySushiSwapCreated();\\n\\n event UpdateStakeFeeBPS(uint256 fee);\\n event UpdateFlashStakeFeeBPS(uint256 fee);\\n event UpdateFeeRecipient(address feeRecipient);\\n event CreateFlashStrategySushiSwap(uint256 pid, address strategy);\\n\\n function flashProtocol() external view returns (address);\\n\\n function flpTokenFactory() external view returns (address);\\n\\n function feeRecipient() external view returns (address);\\n\\n function getFlashStrategySushiSwap(uint256 pid) external view returns (address);\\n\\n function predictFlashStrategySushiSwapAddress(uint256 pid) external view returns (address strategy);\\n\\n function updateFeeRecipient(address _feeRecipient) external;\\n\\n function createFlashStrategySushiSwap(uint256 pid) external returns (address strategy);\\n}\\n\",\"keccak256\":\"0xfa2ca9ab0537cf4b0cf915100d292d48201e905162c4ace0d552d3e5c1cec3f1\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISousChef.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\ninterface ISousChef {\\n error BillCreated();\\n error InvalidRestaurant();\\n error InvalidKitchen();\\n error Forbidden();\\n\\n event UpdateRestaurant(address indexed restaurant);\\n event UpdateKitchen(address indexed kitchen);\\n event CreateBill(uint256 indexed pid, address indexed bill);\\n event Checkpoint();\\n\\n function fSushi() external view returns (address);\\n\\n function flashStrategyFactory() external view returns (address);\\n\\n function startWeek() external view returns (uint256);\\n\\n function restaurant() external view returns (address);\\n\\n function kitchen() external view returns (address);\\n\\n function getBill(uint256 pid) external view returns (address);\\n\\n function weeklyRewards(uint256 week) external view returns (uint256);\\n\\n function lastCheckpoint() external view returns (uint256);\\n\\n function predictBillAddress(uint256 pid) external view returns (address bill);\\n\\n function updateRestaurant(address _restaurant) external;\\n\\n function updateKitchen(address _kitchen) external;\\n\\n function createBill(uint256 pid) external returns (address strategy);\\n\\n function checkpoint() external;\\n\\n function mintFSushi(\\n uint256 pid,\\n address to,\\n uint256 amount\\n ) external;\\n}\\n\",\"keccak256\":\"0x005703330171f9ce003fc1cbea84b67d20889e7030d8f1ada00d7217367bba75\",\"license\":\"BUSL-1.1\"}},\"version\":1}",
"bytecode": "0x60e08060405234620001165760408162000e1280380380916200002382856200011b565b8339810103126200011657600460206200004a81620000428562000155565b940162000155565b6080849052604051633e1875ed60e01b815290939092839182906001600160a01b03165afa9081156200010a57600091620000c6575b5060a05260c052604051610ca790816200016b82396080518181816103dd0152610a0c015260a05181818160e10152610a51015260c0518181816105330152610a940152f35b906020823d821162000101575b81620000e2602093836200011b565b81010312620000fe5750620000f79062000155565b3862000080565b80fd5b3d9150620000d3565b6040513d6000823e3d90fd5b600080fd5b601f909101601f19168101906001600160401b038211908210176200013f57604052565b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b0382168203620001165756fe608080604052600436101561001357600080fd5b600090813560e01c908163233b256414610a80575080633e1875ed14610a3b578063654e6d77146109f65763db2441af1461004d57600080fd5b3461060c5761016036600319011261060c5760443567ffffffffffffffff81116109f25761007f903690600401610ac3565b60643567ffffffffffffffff81116109ee5761009f903690600401610ac3565b60a43592916001600160a01b038416840361078857610104359460ff8616860361086157604051632ddefbf960e01b81526004803590820152936020856024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9485156108a25788956109b2575b50604051635fcbd28560e01b8152966020886004816001600160a01b038a165afa97881561096b578998610976575b506001600160a01b0388163b1561092f5760ff6040519163d505accf60e01b8352336004840152306024840152602435604484015260e43560648401521660848201526101243560a48201526101443560c4820152888160e4818360018060a01b038d165af1801561096b57610958575b50604051966323b872dd60e01b60208901523360248901523060448901526024356064890152606488528760a081011067ffffffffffffffff60a08a0111176109335760a0880160e089011067ffffffffffffffff60e08a0111176109335760e08801604052602060a08901527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460c08901528880895160208b018260018060a01b0386165af197893d1561094957503d9867ffffffffffffffff8a11610933576040518b9a6102b59360a09161029a601f8201601f191660200185610b0d565b83523d8d602085013e5b01916001600160a01b038516610b9d565b8051806108ad575b505060405163095ea7b360e01b81526001600160a01b03878116600483015260248035908301529091602091839160449183918d91165af180156108a257610865575b506001600160a01b0385163b156108615761035687936103449560405196879586956202e03560e31b8752602435600488015260c0602488015260c4870191610b50565b84810360031901604486015291610b50565b608480356064840152309083015260e43560a48301520381836001600160a01b0387165af19081156106dd578491610849575b50506040516370a0823160e01b81523060048201526020816024816001600160a01b0386165afa9081156106dd578491610817575b50604051633750db2960e21b81526004803590820152906020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa91821561065c5785926107db575b506040516395da4c3160e01b8152906020826004816001600160a01b0387165afa91821561079457869261079f575b5060405163095ea7b360e01b81526001600160a01b038381166004830152602482018390529094602091869160449183918b91165af193841561079457869461074b575b50604051634360451760e01b81526001600160a01b038481166004830152602482019290925260c4356044820152306064820152608481018590529361016092859260a49284929091165af19182156106dd5784926106e8575b5060405163a8694e5760e01b815290602090829060049082906001600160a01b03165afa9081156106dd5784916106a3575b506040516358e6837360e11b81526004803590820152906020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa91821561065c578592610667575b5060405163095ea7b360e01b8152600