eigen_utils::strategybase

Module StrategyBase

Source
Expand description

Generated by the following Solidity interface…

interface StrategyBase {
    event Initialized(uint8 version);
    event Paused(address indexed account, uint256 newPausedStatus);
    event PauserRegistrySet(address pauserRegistry, address newPauserRegistry);
    event Unpaused(address indexed account, uint256 newPausedStatus);

    constructor(address _strategyManager);

    function deposit(address token, uint256 amount) external returns (uint256 newShares);
    function explanation() external pure returns (string memory);
    function initialize(address _underlyingToken, address _pauserRegistry) 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 setPauserRegistry(address newPauserRegistry) external;
    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 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"
      }
    ],
    "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"
      },
      {
        "name": "_pauserRegistry",
        "type": "address",
        "internalType": "contract IPauserRegistry"
      }
    ],
    "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": "setPauserRegistry",
    "inputs": [
      {
        "name": "newPauserRegistry",
        "type": "address",
        "internalType": "contract IPauserRegistry"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "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": "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": "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": "PauserRegistrySet",
    "inputs": [
      {
        "name": "pauserRegistry",
        "type": "address",
        "indexed": false,
        "internalType": "contract IPauserRegistry"
      },
      {
        "name": "newPauserRegistry",
        "type": "address",
        "indexed": false,
        "internalType": "contract IPauserRegistry"
      }
    ],
    "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
  }
]

Structs§

  • Event with signature Initialized(uint8) and selector 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. solidity event Initialized(uint8 version);
  • Event with signature Paused(address,uint256) and selector 0xab40a374bc51de372200a8bc981af8c9ecdc08dfdaef0bb6e09f88f3c616ef3d. solidity event Paused(address indexed account, uint256 newPausedStatus);
  • Event with signature PauserRegistrySet(address,address) and selector 0x6e9fcd539896fca60e8b0f01dd580233e48a6b0f7df013b89ba7f565869acdb6. solidity event PauserRegistrySet(address pauserRegistry, address newPauserRegistry);
  • A StrategyBase instance.
  • Event with signature Unpaused(address,uint256) and selector 0x3582d1828e26bf56bd801502bc021ac0bc8afb57c826e4986b45593c8fad389c. solidity event Unpaused(address indexed account, uint256 newPausedStatus);
  • Constructor`. solidity constructor(address _strategyManager);
  • Function with signature deposit(address,uint256) and selector 0x47e7ef24. solidity function deposit(address token, uint256 amount) external returns (uint256 newShares);
  • Container type for the return parameters of the deposit(address,uint256) function.
  • Function with signature explanation() and selector 0xab5921e1. solidity function explanation() external pure returns (string memory);
  • Container type for the return parameters of the explanation() function.
  • Function with signature initialize(address,address) and selector 0x485cc955. solidity function initialize(address _underlyingToken, address _pauserRegistry) external;
  • Container type for the return parameters of the initialize(address,address) function.
  • Function with signature pauseAll() and selector 0x595c6a67. solidity function pauseAll() external;
  • Container type for the return parameters of the pauseAll() function.
  • Function with signature pause(uint256) and selector 0x136439dd. solidity function pause(uint256 newPausedStatus) external;
  • Container type for the return parameters of the pause(uint256) function.
  • Function with signature paused(uint8) and selector 0x5ac86ab7. solidity function paused(uint8 index) external view returns (bool);
  • Container type for the return parameters of the paused(uint8) function.
  • Function with signature paused() and selector 0x5c975abb. solidity function paused() external view returns (uint256);
  • Container type for the return parameters of the paused() function.
  • Function with signature pauserRegistry() and selector 0x886f1195. solidity function pauserRegistry() external view returns (address);
  • Container type for the return parameters of the pauserRegistry() function.
  • Function with signature setPauserRegistry(address) and selector 0x10d67a2f. solidity function setPauserRegistry(address newPauserRegistry) external;
  • Container type for the return parameters of the setPauserRegistry(address) function.
  • Function with signature shares(address) and selector 0xce7c2ac2. solidity function shares(address user) external view returns (uint256);
  • Container type for the return parameters of the shares(address) function.
  • Function with signature sharesToUnderlying(uint256) and selector 0xf3e73875. solidity function sharesToUnderlying(uint256 amountShares) external view returns (uint256);
  • Container type for the return parameters of the sharesToUnderlying(uint256) function.
  • Function with signature sharesToUnderlyingView(uint256) and selector 0x7a8b2637. solidity function sharesToUnderlyingView(uint256 amountShares) external view returns (uint256);
  • Container type for the return parameters of the sharesToUnderlyingView(uint256) function.
  • Function with signature strategyManager() and selector 0x39b70e38. solidity function strategyManager() external view returns (address);
  • Container type for the return parameters of the strategyManager() function.
  • Function with signature totalShares() and selector 0x3a98ef39. solidity function totalShares() external view returns (uint256);
  • Container type for the return parameters of the totalShares() function.
  • Function with signature underlyingToShares(uint256) and selector 0x8c871019. solidity function underlyingToShares(uint256 amountUnderlying) external view returns (uint256);
  • Container type for the return parameters of the underlyingToShares(uint256) function.
  • Function with signature underlyingToSharesView(uint256) and selector 0xe3dae51c. solidity function underlyingToSharesView(uint256 amountUnderlying) external view returns (uint256);
  • Container type for the return parameters of the underlyingToSharesView(uint256) function.
  • Function with signature underlyingToken() and selector 0x2495a599. solidity function underlyingToken() external view returns (address);
  • Container type for the return parameters of the underlyingToken() function.
  • Function with signature unpause(uint256) and selector 0xfabc1cbc. solidity function unpause(uint256 newPausedStatus) external;
  • Container type for the return parameters of the unpause(uint256) function.
  • Function with signature userUnderlying(address) and selector 0x8f6a6240. solidity function userUnderlying(address user) external returns (uint256);
  • Container type for the return parameters of the userUnderlying(address) function.
  • Function with signature userUnderlyingView(address) and selector 0x553ca5f8. solidity function userUnderlyingView(address user) external view returns (uint256);
  • Container type for the return parameters of the userUnderlyingView(address) function.
  • Function with signature withdraw(address,address,uint256) and selector 0xd9caed12. solidity function withdraw(address recipient, address token, uint256 amountShares) external;
  • Container type for the return parameters of the withdraw(address,address,uint256) function.

Enums§

Statics§

  • The creation / init bytecode of the contract.
  • The runtime bytecode of the contract, as deployed on the network.

Functions§

  • Deploys this contract using the given provider and constructor arguments, if any.
  • Creates a RawCallBuilder for deploying this contract using the given provider and constructor arguments, if any.
  • Creates a new wrapper around an on-chain StrategyBase contract instance.