Expand description
Generated by the following Solidity interface…
interface StrategyBase {
error BalanceExceedsMaxTotalDeposits();
error CurrentlyPaused();
error InputAddressZero();
error InvalidNewPausedStatus();
error InvalidShortString();
error MaxPerDepositExceedsMax();
error NewSharesZero();
error OnlyPauser();
error OnlyStrategyManager();
error OnlyUnderlyingToken();
error OnlyUnpauser();
error StringTooLong(string str);
error TotalSharesExceedsMax();
error WithdrawalAmountExceedsTotalDeposits();
event ExchangeRateEmitted(uint256 rate);
event Initialized(uint8 version);
event Paused(address indexed account, uint256 newPausedStatus);
event StrategyTokenSet(address token, uint8 decimals);
event Unpaused(address indexed account, uint256 newPausedStatus);
constructor(address _strategyManager, address _pauserRegistry, string _version);
function deposit(address token, uint256 amount) external returns (uint256 newShares);
function explanation() external pure returns (string memory);
function initialize(address _underlyingToken) external;
function pause(uint256 newPausedStatus) external;
function pauseAll() external;
function paused(uint8 index) external view returns (bool);
function paused() external view returns (uint256);
function pauserRegistry() external view returns (address);
function shares(address user) external view returns (uint256);
function sharesToUnderlying(uint256 amountShares) external view returns (uint256);
function sharesToUnderlyingView(uint256 amountShares) external view returns (uint256);
function strategyManager() external view returns (address);
function totalShares() external view returns (uint256);
function underlyingToShares(uint256 amountUnderlying) external view returns (uint256);
function underlyingToSharesView(uint256 amountUnderlying) external view returns (uint256);
function underlyingToken() external view returns (address);
function unpause(uint256 newPausedStatus) external;
function userUnderlying(address user) external returns (uint256);
function userUnderlyingView(address user) external view returns (uint256);
function version() external view returns (string memory);
function withdraw(address recipient, address token, uint256 amountShares) external;
}…which was generated by the following JSON ABI:
[
{
"type": "constructor",
"inputs": [
{
"name": "_strategyManager",
"type": "address",
"internalType": "contract IStrategyManager"
},
{
"name": "_pauserRegistry",
"type": "address",
"internalType": "contract IPauserRegistry"
},
{
"name": "_version",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "deposit",
"inputs": [
{
"name": "token",
"type": "address",
"internalType": "contract IERC20"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "newShares",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "explanation",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "initialize",
"inputs": [
{
"name": "_underlyingToken",
"type": "address",
"internalType": "contract IERC20"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "pause",
"inputs": [
{
"name": "newPausedStatus",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "pauseAll",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "paused",
"inputs": [
{
"name": "index",
"type": "uint8",
"internalType": "uint8"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "paused",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "pauserRegistry",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IPauserRegistry"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "shares",
"inputs": [
{
"name": "user",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "sharesToUnderlying",
"inputs": [
{
"name": "amountShares",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "sharesToUnderlyingView",
"inputs": [
{
"name": "amountShares",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "strategyManager",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IStrategyManager"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "totalShares",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "underlyingToShares",
"inputs": [
{
"name": "amountUnderlying",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "underlyingToSharesView",
"inputs": [
{
"name": "amountUnderlying",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "underlyingToken",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IERC20"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "unpause",
"inputs": [
{
"name": "newPausedStatus",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "userUnderlying",
"inputs": [
{
"name": "user",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "userUnderlyingView",
"inputs": [
{
"name": "user",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "version",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "withdraw",
"inputs": [
{
"name": "recipient",
"type": "address",
"internalType": "address"
},
{
"name": "token",
"type": "address",
"internalType": "contract IERC20"
},
{
"name": "amountShares",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "ExchangeRateEmitted",
"inputs": [
{
"name": "rate",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Initialized",
"inputs": [
{
"name": "version",
"type": "uint8",
"indexed": false,
"internalType": "uint8"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Paused",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newPausedStatus",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "StrategyTokenSet",
"inputs": [
{
"name": "token",
"type": "address",
"indexed": false,
"internalType": "contract IERC20"
},
{
"name": "decimals",
"type": "uint8",
"indexed": false,
"internalType": "uint8"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Unpaused",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newPausedStatus",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "error",
"name": "BalanceExceedsMaxTotalDeposits",
"inputs": []
},
{
"type": "error",
"name": "CurrentlyPaused",
"inputs": []
},
{
"type": "error",
"name": "InputAddressZero",
"inputs": []
},
{
"type": "error",
"name": "InvalidNewPausedStatus",
"inputs": []
},
{
"type": "error",
"name": "InvalidShortString",
"inputs": []
},
{
"type": "error",
"name": "MaxPerDepositExceedsMax",
"inputs": []
},
{
"type": "error",
"name": "NewSharesZero",
"inputs": []
},
{
"type": "error",
"name": "OnlyPauser",
"inputs": []
},
{
"type": "error",
"name": "OnlyStrategyManager",
"inputs": []
},
{
"type": "error",
"name": "OnlyUnderlyingToken",
"inputs": []
},
{
"type": "error",
"name": "OnlyUnpauser",
"inputs": []
},
{
"type": "error",
"name": "StringTooLong",
"inputs": [
{
"name": "str",
"type": "string",
"internalType": "string"
}
]
},
{
"type": "error",
"name": "TotalSharesExceedsMax",
"inputs": []
},
{
"type": "error",
"name": "WithdrawalAmountExceedsTotalDeposits",
"inputs": []
}
]Structs§
- Balance
Exceeds MaxTotal Deposits - Custom error with signature
BalanceExceedsMaxTotalDeposits()and selector0xd86bae67. - Currently
Paused - Custom error with signature
CurrentlyPaused()and selector0x840a48d5. - Exchange
Rate Emitted - Event with signature
ExchangeRateEmitted(uint256)and selector0xd2494f3479e5da49d386657c292c610b5b01df313d07c62eb0cfa49924a31be8. - Initialized
- Event with signature
Initialized(uint8)and selector0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. - Input
Address Zero - Custom error with signature
InputAddressZero()and selector0x73632176. - Invalid
NewPaused Status - Custom error with signature
InvalidNewPausedStatus()and selector0xc61dca5d. - Invalid
Short String - Custom error with signature
InvalidShortString()and selector0xb3512b0c. - MaxPer
Deposit Exceeds Max - Custom error with signature
MaxPerDepositExceedsMax()and selector0x14ac1edc. - NewShares
Zero - Custom error with signature
NewSharesZero()and selector0x18725da6. - Only
Pauser - Custom error with signature
OnlyPauser()and selector0x75df51dc. - Only
Strategy Manager - Custom error with signature
OnlyStrategyManager()and selector0x48da714f. - Only
Underlying Token - Custom error with signature
OnlyUnderlyingToken()and selector0xc4aaf740. - Only
Unpauser - Custom error with signature
OnlyUnpauser()and selector0x794821ff. - Paused
- Event with signature
Paused(address,uint256)and selector0xab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d. - Strategy
Base Instance - A
StrategyBaseinstance. - Strategy
Token Set - Event with signature
StrategyTokenSet(address,uint8)and selector0x1c540707b00eb5427b6b774fc799d756516a54aee108b64b327acc55af557507. - String
TooLong - Custom error with signature
StringTooLong(string)and selector0x305a27a9. - Total
Shares Exceeds Max - Custom error with signature
TotalSharesExceedsMax()and selector0x5e29d146. - Unpaused
- Event with signature
Unpaused(address,uint256)and selector0x3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c. - Withdrawal
Amount Exceeds Total Deposits - Custom error with signature
WithdrawalAmountExceedsTotalDeposits()and selector0xb469df30. - constructor
Call - Constructor`.
- deposit
Call - Function with signature
deposit(address,uint256)and selector0x47e7ef24. - deposit
Return - Container type for the return parameters of the
deposit(address,uint256)function. - explanation
Call - Function with signature
explanation()and selector0xab5921e1. - explanation
Return - Container type for the return parameters of the
explanation()function. - initialize
Call - Function with signature
initialize(address)and selector0xc4d66de8. - initialize
Return - Container type for the return parameters of the
initialize(address)function. - pause
AllCall - Function with signature
pauseAll()and selector0x595c6a67. - pause
AllReturn - Container type for the return parameters of the
pauseAll()function. - pause
Call - Function with signature
pause(uint256)and selector0x136439dd. - pause
Return - Container type for the return parameters of the
pause(uint256)function. - paused_
0Call - Function with signature
paused(uint8)and selector0x5ac86ab7. - paused_
0Return - Container type for the return parameters of the
paused(uint8)function. - paused_
1Call - Function with signature
paused()and selector0x5c975abb. - paused_
1Return - Container type for the return parameters of the
paused()function. - pauser
Registry Call - Function with signature
pauserRegistry()and selector0x886f1195. - pauser
Registry Return - Container type for the return parameters of the
pauserRegistry()function. - shares
Call - Function with signature
shares(address)and selector0xce7c2ac2. - shares
Return - Container type for the return parameters of the
shares(address)function. - shares
ToUnderlying Call - Function with signature
sharesToUnderlying(uint256)and selector0xf3e73875. - shares
ToUnderlying Return - Container type for the return parameters of the
sharesToUnderlying(uint256)function. - shares
ToUnderlying View Call - Function with signature
sharesToUnderlyingView(uint256)and selector0x7a8b2637. - shares
ToUnderlying View Return - Container type for the return parameters of the
sharesToUnderlyingView(uint256)function. - strategy
Manager Call - Function with signature
strategyManager()and selector0x39b70e38. - strategy
Manager Return - Container type for the return parameters of the
strategyManager()function. - total
Shares Call - Function with signature
totalShares()and selector0x3a98ef39. - total
Shares Return - Container type for the return parameters of the
totalShares()function. - underlying
ToShares Call - Function with signature
underlyingToShares(uint256)and selector0x8c871019. - underlying
ToShares Return - Container type for the return parameters of the
underlyingToShares(uint256)function. - underlying
ToShares View Call - Function with signature
underlyingToSharesView(uint256)and selector0xe3dae51c. - underlying
ToShares View Return - Container type for the return parameters of the
underlyingToSharesView(uint256)function. - underlying
Token Call - Function with signature
underlyingToken()and selector0x2495a599. - underlying
Token Return - Container type for the return parameters of the
underlyingToken()function. - unpause
Call - Function with signature
unpause(uint256)and selector0xfabc1cbc. - unpause
Return - Container type for the return parameters of the
unpause(uint256)function. - user
Underlying Call - Function with signature
userUnderlying(address)and selector0x8f6a6240. - user
Underlying Return - Container type for the return parameters of the
userUnderlying(address)function. - user
Underlying View Call - Function with signature
userUnderlyingView(address)and selector0x553ca5f8. - user
Underlying View Return - Container type for the return parameters of the
userUnderlyingView(address)function. - version
Call - Function with signature
version()and selector0x54fd4d50. - version
Return - Container type for the return parameters of the
version()function. - withdraw
Call - Function with signature
withdraw(address,address,uint256)and selector0xd9caed12. - withdraw
Return - Container type for the return parameters of the
withdraw(address,address,uint256)function.
Enums§
- Strategy
Base Calls - Container for all the
StrategyBasefunction calls. - Strategy
Base Errors - Container for all the
StrategyBasecustom errors. - Strategy
Base Events - Container for all the
StrategyBaseevents.
Statics§
- BYTECODE
- The creation / init bytecode of the contract.
- DEPLOYED_
BYTECODE - The runtime bytecode of the contract, as deployed on the network.
Functions§
- deploy
- Deploys this contract using the given
providerand constructor arguments, if any. - deploy_
builder - Creates a
RawCallBuilderfor deploying this contract using the givenproviderand constructor arguments, if any. - new
- Creates a new wrapper around an on-chain
StrategyBasecontract instance.