编译器
0.8.17+commit.8df45f5f
文件 1 的 15:Address.sol
pragma solidity ^0.8.1;
library Address {
function isContract(address account) internal view returns (bool) {
return account.code.length > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
文件 2 的 15:Context.sol
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
文件 3 的 15:FlashStrategyRocketPool.sol
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./interfaces/Flashstake/IFlashStrategy.sol";
import "./interfaces/Flashstake/IFlashFToken.sol";
import "./interfaces/RocketPool/RocketStorageInterface.sol";
import "./interfaces/RocketPool/RocketDepositPoolInterface.sol";
import "./interfaces/RocketPool/RocketTokenRETHInterface.sol";
import "./interfaces/IWETH.sol";
contract FlashStrategyRocketPool is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20Metadata;
event BurnedFToken(address indexed _address, uint256 _tokenAmount, uint256 _yieldReturned);
address immutable flashProtocolAddress;
address payable constant principalTokenAddress = payable(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
address fTokenAddress;
uint256 principalBalance;
RocketStorageInterface public rocketStorage;
uint256 maxStakeDuration = 14515200;
bool public maxStakeDurationLocked = false;
constructor(address _flashProtocolAddress, address _rocketStorageAddress) {
flashProtocolAddress = _flashProtocolAddress;
rocketStorage = RocketStorageInterface(_rocketStorageAddress);
}
function getAddresses() public view returns(address _depositAddress, address _withdrawAddress) {
_depositAddress = rocketStorage.getAddress(keccak256(abi.encodePacked("contract.address", "rocketDepositPool")));
_withdrawAddress = rocketStorage.getAddress(keccak256(abi.encodePacked("contract.address", "rocketTokenRETH")));
}
function depositPrincipal(uint256 _tokenAmount) external onlyAuthorised returns (uint256) {
IWETH(principalTokenAddress).approve(principalTokenAddress, _tokenAmount);
IWETH(principalTokenAddress).withdraw(_tokenAmount);
(address _depositAddress, address _withdrawAddress) = getAddresses();
uint256 rETHBefore = IERC20Metadata(_withdrawAddress).balanceOf(address(this));
RocketDepositPoolInterface(_depositAddress).deposit{ value: address(this).balance }();
uint256 rETHAfter = IERC20Metadata(_withdrawAddress).balanceOf(address(this));
uint256 redeemableValue = RocketTokenRETHInterface(_withdrawAddress).getEthValue(rETHAfter - rETHBefore);
principalBalance += redeemableValue;
return redeemableValue;
}
function withdrawPrincipal(uint256 _tokenAmount) external onlyAuthorised {
require(_tokenAmount <= principalBalance, "WITHDRAW TOO HIGH");
(, address _withdrawAddress) = getAddresses();
uint256 rETHtoBurn = ((_tokenAmount * 10**18) / RocketTokenRETHInterface(_withdrawAddress).getExchangeRate()) + 1;
RocketTokenRETHInterface(_withdrawAddress).approve(_withdrawAddress, rETHtoBurn);
RocketTokenRETHInterface(_withdrawAddress).burn(rETHtoBurn);
IWETH(principalTokenAddress).deposit{ value: address(this).balance }();
IERC20Metadata(principalTokenAddress).safeTransfer(msg.sender, _tokenAmount);
principalBalance -= _tokenAmount;
}
function getPrincipalBalance() public view returns (uint256) {
return principalBalance;
}
function getYieldBalance() public view returns (uint256) {
(, address _withdrawAddress) = getAddresses();
uint256 totalrETHBalance = RocketTokenRETHInterface(_withdrawAddress).balanceOf(address(this));
uint256 totalEtherBalance = RocketTokenRETHInterface(_withdrawAddress).getEthValue(totalrETHBalance);
if(principalBalance > totalEtherBalance) {
return 0;
}
return totalEtherBalance - principalBalance;
}
function getPrincipalAddress() external view returns (address) {
return principalTokenAddress;
}
function getFTokenAddress() external view returns (address) {
return fTokenAddress;
}
function setFTokenAddress(address _fTokenAddress) external onlyAuthorised {
require(fTokenAddress == address(0), "FTOKEN ADDRESS ALREADY SET");
fTokenAddress = _fTokenAddress;
}
function quoteMintFToken(uint256 _tokenAmount, uint256 _duration) external pure returns (uint256) {
require(_duration >= 60, "DURATION TOO LOW");
uint256 amountToMint = (_tokenAmount * (_duration * 31709792000)) / (10**18);
return amountToMint;
}
function quoteBurnFToken(uint256 _tokenAmount) public view returns (uint256) {
uint256 totalSupply = IERC20Metadata(fTokenAddress).totalSupply();
require(totalSupply > 0, "INSUFFICIENT fERC20 TOKEN SUPPLY");
if (_tokenAmount > totalSupply) {
_tokenAmount = totalSupply;
}
uint256 totalYield = getYieldBalance();
return (totalYield * _tokenAmount) / totalSupply;
}
function burnFToken(
uint256 _tokenAmount,
uint256 _minimumReturned,
address _yieldTo
) external nonReentrant returns (uint256) {
uint256 tokensOwed = quoteBurnFToken(_tokenAmount);
require(tokensOwed >= _minimumReturned, "INSUFFICIENT OUTPUT");
IFlashFToken(fTokenAddress).burnFrom(msg.sender, _tokenAmount);
(, address _withdrawAddress) = getAddresses();
uint256 rETHtoBurn = ((tokensOwed * 10**18) / RocketTokenRETHInterface(_withdrawAddress).getExchangeRate()) + 1;
RocketTokenRETHInterface(_withdrawAddress).approve(_withdrawAddress, rETHtoBurn);
RocketTokenRETHInterface(_withdrawAddress).burn(rETHtoBurn);
IWETH(principalTokenAddress).deposit{ value: address(this).balance }();
IERC20Metadata(principalTokenAddress).safeTransfer(_yieldTo, tokensOwed);
emit BurnedFToken(msg.sender, _tokenAmount, tokensOwed);
return tokensOwed;
}
modifier onlyAuthorised() {
require(msg.sender == flashProtocolAddress || msg.sender == address(this), "NOT FLASH PROTOCOL");
_;
}
function withdrawERC20(address[] calldata _tokenAddresses, uint256[] calldata _tokenAmounts) external onlyOwner {
require(_tokenAddresses.length == _tokenAmounts.length, "ARRAY SIZE MISMATCH");
(, address _withdrawAddress) = getAddresses();
for (uint256 i = 0; i < _tokenAddresses.length; i++) {
require(_tokenAddresses[i] != principalTokenAddress &&
_tokenAddresses[i] != _withdrawAddress, "TOKEN ADDRESS PROHIBITED");
IERC20Metadata(_tokenAddresses[i]).safeTransfer(msg.sender, _tokenAmounts[i]);
}
}
function getMaxStakeDuration() public view returns (uint256) {
return maxStakeDuration;
}
function setMaxStakeDuration(uint256 _newMaxStakeDuration) external onlyOwner {
require(maxStakeDurationLocked == false);
maxStakeDuration = _newMaxStakeDuration;
}
function lockMaxStakeDuration() external onlyOwner {
maxStakeDurationLocked = true;
}
fallback() external payable {}
}
文件 4 的 15:IERC20.sol
pragma solidity ^0.8.0;
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
文件 5 的 15:IERC20Metadata.sol
pragma solidity ^0.8.0;
import "../IERC20.sol";
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
文件 6 的 15:IFlashFToken.sol
pragma solidity ^0.8.4;
interface IFlashFToken {
function mint(address account, uint256 amount) external;
function burnFrom(address from, uint256 amount) external;
function decimals() external returns (uint8);
}
文件 7 的 15:IFlashStrategy.sol
pragma solidity ^0.8.4;
interface IFlashStrategy {
event BurnedFToken(address indexed _address, uint256 _tokenAmount, uint256 _yieldReturned);
function depositPrincipal(uint256 _tokenAmount) external returns (uint256);
function withdrawPrincipal(uint256 _tokenAmount) external;
function burnFToken(
uint256 _tokenAmount,
uint256 _minimumReturned,
address _yieldTo
) external returns (uint256);
function getPrincipalBalance() external view returns (uint256);
function getYieldBalance() external view returns (uint256);
function getPrincipalAddress() external view returns (address);
function quoteMintFToken(uint256 _tokenAmount, uint256 duration) external view returns (uint256);
function quoteBurnFToken(uint256 _tokenAmount) external view returns (uint256);
function setFTokenAddress(address _fTokenAddress) external;
function getMaxStakeDuration() external view returns (uint256);
function getFTokenAddress() external view returns (address);
}
文件 8 的 15:IWETH.sol
pragma solidity ^0.8.4;
interface IWETH {
function name() external view returns (string memory);
function approve(address guy, uint256 wad) external returns (bool);
function totalSupply() external view returns (uint256);
function transferFrom(
address src,
address dst,
uint256 wad
) external returns (bool);
function withdraw(uint256 wad) external;
function decimals() external view returns (uint8);
function balanceOf(address) external view returns (uint256);
function symbol() external view returns (string memory);
function transfer(address dst, uint256 wad) external returns (bool);
function deposit() external payable;
function allowance(address, address) external view returns (uint256);
fallback() external payable;
event Approval(address indexed src, address indexed guy, uint256 wad);
event Transfer(address indexed src, address indexed dst, uint256 wad);
event Deposit(address indexed dst, uint256 wad);
event Withdrawal(address indexed src, uint256 wad);
}
文件 9 的 15:Ownable.sol
pragma solidity ^0.8.0;
import "../utils/Context.sol";
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_transferOwnership(_msgSender());
}
modifier onlyOwner() {
_checkOwner();
_;
}
function owner() public view virtual returns (address) {
return _owner;
}
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
文件 10 的 15:ReentrancyGuard.sol
pragma solidity ^0.8.0;
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
_status = _ENTERED;
}
function _nonReentrantAfter() private {
_status = _NOT_ENTERED;
}
}
文件 11 的 15:RocketDepositPoolInterface.sol
pragma solidity >0.5.0 <0.9.0;
interface RocketDepositPoolInterface {
function getBalance() external view returns (uint256);
function getNodeBalance() external view returns (uint256);
function getUserBalance() external view returns (int256);
function getExcessBalance() external view returns (uint256);
function deposit() external payable;
function getMaximumDepositAmount() external view returns (uint256);
function nodeDeposit(uint256 _totalAmount) external payable;
function nodeCreditWithdrawal(uint256 _amount) external;
function recycleDissolvedDeposit() external payable;
function recycleExcessCollateral() external payable;
function recycleLiquidatedStake() external payable;
function assignDeposits() external;
function maybeAssignDeposits() external returns (bool);
function withdrawExcessBalance(uint256 _amount) external;
}
文件 12 的 15:RocketStorageInterface.sol
pragma solidity >0.5.0 <0.9.0;
interface RocketStorageInterface {
function getDeployedStatus() external view returns (bool);
function getGuardian() external view returns(address);
function setGuardian(address _newAddress) external;
function confirmGuardian() external;
function getAddress(bytes32 _key) external view returns (address);
function getUint(bytes32 _key) external view returns (uint);
function getString(bytes32 _key) external view returns (string memory);
function getBytes(bytes32 _key) external view returns (bytes memory);
function getBool(bytes32 _key) external view returns (bool);
function getInt(bytes32 _key) external view returns (int);
function getBytes32(bytes32 _key) external view returns (bytes32);
function setAddress(bytes32 _key, address _value) external;
function setUint(bytes32 _key, uint _value) external;
function setString(bytes32 _key, string calldata _value) external;
function setBytes(bytes32 _key, bytes calldata _value) external;
function setBool(bytes32 _key, bool _value) external;
function setInt(bytes32 _key, int _value) external;
function setBytes32(bytes32 _key, bytes32 _value) external;
function deleteAddress(bytes32 _key) external;
function deleteUint(bytes32 _key) external;
function deleteString(bytes32 _key) external;
function deleteBytes(bytes32 _key) external;
function deleteBool(bytes32 _key) external;
function deleteInt(bytes32 _key) external;
function deleteBytes32(bytes32 _key) external;
function addUint(bytes32 _key, uint256 _amount) external;
function subUint(bytes32 _key, uint256 _amount) external;
function getNodeWithdrawalAddress(address _nodeAddress) external view returns (address);
function getNodePendingWithdrawalAddress(address _nodeAddress) external view returns (address);
function setWithdrawalAddress(address _nodeAddress, address _newWithdrawalAddress, bool _confirm) external;
function confirmWithdrawalAddress(address _nodeAddress) external;
}
文件 13 的 15:RocketTokenRETHInterface.sol
pragma solidity >0.5.0 <0.9.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface RocketTokenRETHInterface is IERC20 {
function getEthValue(uint256 _rethAmount) external view returns (uint256);
function getRethValue(uint256 _ethAmount) external view returns (uint256);
function getExchangeRate() external view returns (uint256);
function getTotalCollateral() external view returns (uint256);
function getCollateralRate() external view returns (uint256);
function depositExcess() external payable;
function depositExcessCollateral() external;
function mint(uint256 _ethAmount, address _to) external;
function burn(uint256 _rethAmount) external;
}
文件 14 的 15:SafeERC20.sol
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
文件 15 的 15:draft-IERC20Permit.sol
pragma solidity ^0.8.0;
interface IERC20Permit {
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
function nonces(address owner) external view returns (uint256);
function DOMAIN_SEPARATOR() external view returns (bytes32);
}
{
"compilationTarget": {
"contracts/FlashStrategyRocketPool.sol": "FlashStrategyRocketPool"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "none"
},
"optimizer": {
"enabled": true,
"runs": 800
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"_flashProtocolAddress","type":"address"},{"internalType":"address","name":"_rocketStorageAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"},{"indexed":false,"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_yieldReturned","type":"uint256"}],"name":"BurnedFToken","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"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"internalType":"uint256","name":"_minimumReturned","type":"uint256"},{"internalType":"address","name":"_yieldTo","type":"address"}],"name":"burnFToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"depositPrincipal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAddresses","outputs":[{"internalType":"address","name":"_depositAddress","type":"address"},{"internalType":"address","name":"_withdrawAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxStakeDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrincipalAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrincipalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getYieldBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockMaxStakeDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxStakeDurationLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"quoteBurnFToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"quoteMintFToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rocketStorage","outputs":[{"internalType":"contract RocketStorageInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_fTokenAddress","type":"address"}],"name":"setFTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMaxStakeDuration","type":"uint256"}],"name":"setMaxStakeDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokenAddresses","type":"address[]"},{"internalType":"uint256[]","name":"_tokenAmounts","type":"uint256[]"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"withdrawPrincipal","outputs":[],"stateMutability":"nonpayable","type":"function"}]