pragmasolidity ^0.5.16;/**
* @title Strike's InterestRateModel Interface
* @author Strike
*/contractInterestRateModel{
/// @notice Indicator that this is an InterestRateModel contract (for inspection)boolpublicconstant isInterestRateModel =true;
/**
* @notice Calculates the current borrow interest rate per block
* @param cash The total amount of cash the market has
* @param borrows The total amount of borrows the market has outstanding
* @param reserves The total amount of reserves the market has
* @return The borrow rate per block (as a percentage, and scaled by 1e18)
*/functiongetBorrowRate(uint cash, uint borrows, uint reserves) externalviewreturns (uint);
/**
* @notice Calculates the current supply interest rate per block
* @param cash The total amount of cash the market has
* @param borrows The total amount of borrows the market has outstanding
* @param reserves The total amount of reserves the market has
* @param reserveFactorMantissa The current reserve factor the market has
* @return The supply rate per block (as a percentage, and scaled by 1e18)
*/functiongetSupplyRate(uint cash, uint borrows, uint reserves, uint reserveFactorMantissa) externalviewreturns (uint);
}
Contract Source Code
File 3 of 4: SErc20Delegator.sol
pragmasolidity ^0.5.16;import"./STokenInterfaces.sol";
/**
* @title Strike's SErc20Delegator Contract
* @notice STokens which wrap an EIP-20 underlying and delegate to an implementation
* @author Strike
*/contractSErc20DelegatorisSTokenInterface, SErc20Interface, SDelegatorInterface{
/**
* @notice Construct a new money market
* @param underlying_ The address of the underlying asset
* @param comptroller_ The address of the Comptroller
* @param interestRateModel_ The address of the interest rate model
* @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18
* @param name_ ERC-20 name of this token
* @param symbol_ ERC-20 symbol of this token
* @param decimals_ ERC-20 decimal precision of this token
* @param admin_ Address of the administrator of this token
* @param implementation_ The address of the implementation the contract delegates to
* @param becomeImplementationData The encoded args for becomeImplementation
*/constructor(address underlying_,
ComptrollerInterface comptroller_,
InterestRateModel interestRateModel_,
uint initialExchangeRateMantissa_,
stringmemory name_,
stringmemory symbol_,
uint8 decimals_,
addresspayable admin_,
address implementation_,
bytesmemory becomeImplementationData) public{
// Creator of the contract is admin during initialization
admin =msg.sender;
// First delegate gets to initialize the delegator (i.e. storage contract)
delegateTo(implementation_, abi.encodeWithSignature("initialize(address,address,address,uint256,string,string,uint8)",
underlying_,
comptroller_,
interestRateModel_,
initialExchangeRateMantissa_,
name_,
symbol_,
decimals_));
// New implementations always get set via the settor (post-initialize)
_setImplementation(implementation_, false, becomeImplementationData);
// Set the proper admin now that initialization is done
admin = admin_;
}
/**
* @notice Called by the admin to update the implementation of the delegator
* @param implementation_ The address of the new implementation for delegation
* @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation
* @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation
*/function_setImplementation(address implementation_, bool allowResign, bytesmemory becomeImplementationData) public{
require(msg.sender== admin, "SErc20Delegator::_setImplementation: Caller must be admin");
if (allowResign) {
delegateToImplementation(abi.encodeWithSignature("_resignImplementation()"));
}
address oldImplementation = implementation;
implementation = implementation_;
delegateToImplementation(abi.encodeWithSignature("_becomeImplementation(bytes)", becomeImplementationData));
emit NewImplementation(oldImplementation, implementation);
}
/**
* @notice Sender supplies assets into the market and receives sTokens in exchange
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param mintAmount The amount of the underlying asset to supply
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/functionmint(uint mintAmount) externalreturns (uint) {
mintAmount; // Shh
delegateAndReturn();
}
/**
* @notice Sender redeems sTokens in exchange for the underlying asset
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param redeemTokens The number of sTokens to redeem into underlying
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/functionredeem(uint redeemTokens) externalreturns (uint) {
redeemTokens; // Shh
delegateAndReturn();
}
/**
* @notice Sender redeems sTokens in exchange for a specified amount of underlying asset
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param redeemAmount The amount of underlying to redeem
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/functionredeemUnderlying(uint redeemAmount) externalreturns (uint) {
redeemAmount; // Shh
delegateAndReturn();
}
/**
* @notice Sender borrows assets from the protocol to their own address
* @param borrowAmount The amount of the underlying asset to borrow
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/functionborrow(uint borrowAmount) externalreturns (uint) {
borrowAmount; // Shh
delegateAndReturn();
}
/**
* @notice Sender repays their own borrow
* @param repayAmount The amount to repay
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/functionrepayBorrow(uint repayAmount) externalreturns (uint) {
repayAmount; // Shh
delegateAndReturn();
}
/**
* @notice Sender repays a borrow belonging to borrower
* @param borrower the account with the debt being payed off
* @param repayAmount The amount to repay
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/functionrepayBorrowBehalf(address borrower, uint repayAmount) externalreturns (uint) {
borrower; repayAmount; // Shh
delegateAndReturn();
}
/**
* @notice The sender liquidates the borrowers collateral.
* The collateral seized is transferred to the liquidator.
* @param borrower The borrower of this sToken to be liquidated
* @param sTokenCollateral The market in which to seize collateral from the borrower
* @param repayAmount The amount of the underlying borrowed asset to repay
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/functionliquidateBorrow(address borrower, uint repayAmount, STokenInterface sTokenCollateral) externalreturns (uint) {
borrower; repayAmount; sTokenCollateral; // Shh
delegateAndReturn();
}
/**
* @notice Transfer `amount` tokens from `msg.sender` to `dst`
* @param dst The address of the destination account
* @param amount The number of tokens to transfer
* @return Whether or not the transfer succeeded
*/functiontransfer(address dst, uint amount) externalreturns (bool) {
dst; amount; // Shh
delegateAndReturn();
}
/**
* @notice Transfer `amount` tokens from `src` to `dst`
* @param src The address of the source account
* @param dst The address of the destination account
* @param amount The number of tokens to transfer
* @return Whether or not the transfer succeeded
*/functiontransferFrom(address src, address dst, uint256 amount) externalreturns (bool) {
src; dst; amount; // Shh
delegateAndReturn();
}
/**
* @notice Approve `spender` to transfer up to `amount` from `src`
* @dev This will overwrite the approval amount for `spender`
* and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)
* @param spender The address of the account which may transfer tokens
* @param amount The number of tokens that are approved (-1 means infinite)
* @return Whether or not the approval succeeded
*/functionapprove(address spender, uint256 amount) externalreturns (bool) {
spender; amount; // Shh
delegateAndReturn();
}
/**
* @notice Get the current allowance from `owner` for `spender`
* @param owner The address of the account which owns the tokens to be spent
* @param spender The address of the account which may transfer tokens
* @return The number of tokens allowed to be spent (-1 means infinite)
*/functionallowance(address owner, address spender) externalviewreturns (uint) {
owner; spender; // Shh
delegateToViewAndReturn();
}
/**
* @notice Get the token balance of the `owner`
* @param owner The address of the account to query
* @return The number of tokens owned by `owner`
*/functionbalanceOf(address owner) externalviewreturns (uint) {
owner; // Shh
delegateToViewAndReturn();
}
/**
* @notice Get the underlying balance of the `owner`
* @dev This also accrues interest in a transaction
* @param owner The address of the account to query
* @return The amount of underlying owned by `owner`
*/functionbalanceOfUnderlying(address owner) externalreturns (uint) {
owner; // Shh
delegateAndReturn();
}
/**
* @notice Get a snapshot of the account's balances, and the cached exchange rate
* @dev This is used by comptroller to more efficiently perform liquidity checks.
* @param account Address of the account to snapshot
* @return (possible error, token balance, borrow balance, exchange rate mantissa)
*/functiongetAccountSnapshot(address account) externalviewreturns (uint, uint, uint, uint) {
account; // Shh
delegateToViewAndReturn();
}
/**
* @notice Returns the current per-block borrow interest rate for this sToken
* @return The borrow interest rate per block, scaled by 1e18
*/functionborrowRatePerBlock() externalviewreturns (uint) {
delegateToViewAndReturn();
}
/**
* @notice Returns the current per-block supply interest rate for this sToken
* @return The supply interest rate per block, scaled by 1e18
*/functionsupplyRatePerBlock() externalviewreturns (uint) {
delegateToViewAndReturn();
}
/**
* @notice Returns the current total borrows plus accrued interest
* @return The total borrows with interest
*/functiontotalBorrowsCurrent() externalreturns (uint) {
delegateAndReturn();
}
/**
* @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex
* @param account The address whose balance should be calculated after updating borrowIndex
* @return The calculated balance
*/functionborrowBalanceCurrent(address account) externalreturns (uint) {
account; // Shh
delegateAndReturn();
}
/**
* @notice Return the borrow balance of account based on stored data
* @param account The address whose balance should be calculated
* @return The calculated balance
*/functionborrowBalanceStored(address account) publicviewreturns (uint) {
account; // Shh
delegateToViewAndReturn();
}
/**
* @notice Accrue interest then return the up-to-date exchange rate
* @return Calculated exchange rate scaled by 1e18
*/functionexchangeRateCurrent() publicreturns (uint) {
delegateAndReturn();
}
/**
* @notice Calculates the exchange rate from the underlying to the SToken
* @dev This function does not accrue interest before calculating the exchange rate
* @return Calculated exchange rate scaled by 1e18
*/functionexchangeRateStored() publicviewreturns (uint) {
delegateToViewAndReturn();
}
/**
* @notice Get cash balance of this sToken in the underlying asset
* @return The quantity of underlying asset owned by this contract
*/functiongetCash() externalviewreturns (uint) {
delegateToViewAndReturn();
}
/**
* @notice Applies accrued interest to total borrows and reserves.
* @dev This calculates interest accrued from the last checkpointed block
* up to the current block and writes new checkpoint to storage.
*/functionaccrueInterest() publicreturns (uint) {
delegateAndReturn();
}
/**
* @notice Transfers collateral tokens (this market) to the liquidator.
* @dev Will fail unless called by another sToken during the process of liquidation.
* Its absolutely critical to use msg.sender as the borrowed sToken and not a parameter.
* @param liquidator The account receiving seized collateral
* @param borrower The account having collateral seized
* @param seizeTokens The number of sTokens to seize
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/functionseize(address liquidator, address borrower, uint seizeTokens) externalreturns (uint) {
liquidator; borrower; seizeTokens; // Shh
delegateAndReturn();
}
/*** Admin Functions ***//**
* @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.
* @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.
* @param newPendingAdmin New pending admin.
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/function_setPendingAdmin(addresspayable newPendingAdmin) externalreturns (uint) {
newPendingAdmin; // Shh
delegateAndReturn();
}
/**
* @notice Sets a new comptroller for the market
* @dev Admin function to set a new comptroller
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/function_setComptroller(ComptrollerInterface newComptroller) publicreturns (uint) {
newComptroller; // Shh
delegateAndReturn();
}
/**
* @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh
* @dev Admin function to accrue interest and set a new reserve factor
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/function_setReserveFactor(uint newReserveFactorMantissa) externalreturns (uint) {
newReserveFactorMantissa; // Shh
delegateAndReturn();
}
/**
* @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin
* @dev Admin function for pending admin to accept role and update admin
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/function_acceptAdmin() externalreturns (uint) {
delegateAndReturn();
}
/**
* @notice Accrues interest and adds reserves by transferring from admin
* @param addAmount Amount of reserves to add
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/function_addReserves(uint addAmount) externalreturns (uint) {
addAmount; // Shh
delegateAndReturn();
}
/**
* @notice Accrues interest and reduces reserves by transferring to admin
* @param reduceAmount Amount of reduction to reserves
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/function_reduceReserves(uint reduceAmount) externalreturns (uint) {
reduceAmount; // Shh
delegateAndReturn();
}
/**
* @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh
* @dev Admin function to accrue interest and update the interest rate model
* @param newInterestRateModel the new interest rate model to use
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/function_setInterestRateModel(InterestRateModel newInterestRateModel) publicreturns (uint) {
newInterestRateModel; // Shh
delegateAndReturn();
}
/**
* @notice Internal method to delegate execution to another contract
* @dev It returns to the external caller whatever the implementation returns or forwards reverts
* @param callee The contract to delegatecall
* @param data The raw data to delegatecall
* @return The returned bytes from the delegatecall
*/functiondelegateTo(address callee, bytesmemory data) internalreturns (bytesmemory) {
(bool success, bytesmemory returnData) = callee.delegatecall(data);
assembly {
ifeq(success, 0) {
revert(add(returnData, 0x20), returndatasize)
}
}
return returnData;
}
/**
* @notice Delegates execution to the implementation contract
* @dev It returns to the external caller whatever the implementation returns or forwards reverts
* @param data The raw data to delegatecall
* @return The returned bytes from the delegatecall
*/functiondelegateToImplementation(bytesmemory data) publicreturns (bytesmemory) {
return delegateTo(implementation, data);
}
/**
* @notice Delegates execution to an implementation contract
* @dev It returns to the external caller whatever the implementation returns or forwards reverts
* There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.
* @param data The raw data to delegatecall
* @return The returned bytes from the delegatecall
*/functiondelegateToViewImplementation(bytesmemory data) publicviewreturns (bytesmemory) {
(bool success, bytesmemory returnData) =address(this).staticcall(abi.encodeWithSignature("delegateToImplementation(bytes)", data));
assembly {
ifeq(success, 0) {
revert(add(returnData, 0x20), returndatasize)
}
}
returnabi.decode(returnData, (bytes));
}
functiondelegateToViewAndReturn() privateviewreturns (bytesmemory) {
(bool success, ) =address(this).staticcall(abi.encodeWithSignature("delegateToImplementation(bytes)", msg.data));
assembly {
let free_mem_ptr :=mload(0x40)
returndatacopy(free_mem_ptr, 0, returndatasize)
switch success
case0 { revert(free_mem_ptr, returndatasize) }
default { return(add(free_mem_ptr, 0x40), returndatasize) }
}
}
functiondelegateAndReturn() privatereturns (bytesmemory) {
(bool success, ) = implementation.delegatecall(msg.data);
assembly {
let free_mem_ptr :=mload(0x40)
returndatacopy(free_mem_ptr, 0, returndatasize)
switch success
case0 { revert(free_mem_ptr, returndatasize) }
default { return(free_mem_ptr, returndatasize) }
}
}
/**
* @notice Delegates execution to an implementation contract
* @dev It returns to the external caller whatever the implementation returns or forwards reverts
*/function () externalpayable{
require(msg.value==0,"SErc20Delegator:fallback: cannot send value to fallback");
// delegate all other functions to current implementation
delegateAndReturn();
}
}
Contract Source Code
File 4 of 4: STokenInterfaces.sol
pragmasolidity ^0.5.16;import"./ComptrollerInterface.sol";
import"./InterestRateModel.sol";
contractSTokenStorage{
/**
* @dev Guard variable for re-entrancy checks
*/boolinternal _notEntered;
/**
* @notice EIP-20 token name for this token
*/stringpublic name;
/**
* @notice EIP-20 token symbol for this token
*/stringpublic symbol;
/**
* @notice EIP-20 token decimals for this token
*/uint8public decimals;
/**
* @notice Maximum borrow rate that can ever be applied (.0005% / block)
*/uintinternalconstant borrowRateMaxMantissa =0.0005e16;
/**
* @notice Maximum fraction of interest that can be set aside for reserves
*/uintinternalconstant reserveFactorMaxMantissa =1e18;
/**
* @notice Administrator for this contract
*/addresspayablepublic admin;
/**
* @notice Pending administrator for this contract
*/addresspayablepublic pendingAdmin;
/**
* @notice Contract which oversees inter-sToken operations
*/
ComptrollerInterface public comptroller;
/**
* @notice Model which tells what the current interest rate should be
*/
InterestRateModel public interestRateModel;
/**
* @notice Initial exchange rate used when minting the first STokens (used when totalSupply = 0)
*/uintinternal initialExchangeRateMantissa;
/**
* @notice Fraction of interest currently set aside for reserves
*/uintpublic reserveFactorMantissa;
/**
* @notice Block number that interest was last accrued at
*/uintpublic accrualBlockNumber;
/**
* @notice Accumulator of the total earned interest rate since the opening of the market
*/uintpublic borrowIndex;
/**
* @notice Total amount of outstanding borrows of the underlying in this market
*/uintpublic totalBorrows;
/**
* @notice Total amount of reserves of the underlying held in this market
*/uintpublic totalReserves;
/**
* @notice Total number of tokens in circulation
*/uintpublic totalSupply;
/**
* @notice Official record of token balances for each account
*/mapping (address=>uint) internal accountTokens;
/**
* @notice Approved token transfer amounts on behalf of others
*/mapping (address=>mapping (address=>uint)) internal transferAllowances;
/**
* @notice Container for borrow balance information
* @member principal Total balance (with accrued interest), after applying the most recent balance-changing action
* @member interestIndex Global borrowIndex as of the most recent balance-changing action
*/structBorrowSnapshot {
uint principal;
uint interestIndex;
}
/**
* @notice Mapping of account addresses to outstanding borrow balances
*/mapping(address=> BorrowSnapshot) internal accountBorrows;
}
contractSTokenInterfaceisSTokenStorage{
/**
* @notice Indicator that this is a SToken contract (for inspection)
*/boolpublicconstant isSToken =true;
/*** Market Events ***//**
* @notice Event emitted when interest is accrued
*/eventAccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);
/**
* @notice Event emitted when tokens are minted
*/eventMint(address minter, uint mintAmount, uint mintTokens);
/**
* @notice Event emitted when tokens are redeemed
*/eventRedeem(address redeemer, uint redeemAmount, uint redeemTokens);
/**
* @notice Event emitted when underlying is borrowed
*/eventBorrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);
/**
* @notice Event emitted when a borrow is repaid
*/eventRepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);
/**
* @notice Event emitted when a borrow is liquidated
*/eventLiquidateBorrow(address liquidator, address borrower, uint repayAmount, address sTokenCollateral, uint seizeTokens);
/*** Admin Events ***//**
* @notice Event emitted when pendingAdmin is changed
*/eventNewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);
/**
* @notice Event emitted when pendingAdmin is accepted, which means admin is updated
*/eventNewAdmin(address oldAdmin, address newAdmin);
/**
* @notice Event emitted when comptroller is changed
*/eventNewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);
/**
* @notice Event emitted when interestRateModel is changed
*/eventNewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);
/**
* @notice Event emitted when the reserve factor is changed
*/eventNewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);
/**
* @notice Event emitted when the reserves are added
*/eventReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);
/**
* @notice Event emitted when the reserves are reduced
*/eventReservesReduced(address admin, uint reduceAmount, uint newTotalReserves);
/**
* @notice EIP20 Transfer event
*/eventTransfer(addressindexedfrom, addressindexed to, uint amount);
/**
* @notice EIP20 Approval event
*/eventApproval(addressindexed owner, addressindexed spender, uint amount);
/**
* @notice Failure event
*/eventFailure(uinterror, uint info, uint detail);
/*** User Interface ***/functiontransfer(address dst, uint amount) externalreturns (bool);
functiontransferFrom(address src, address dst, uint amount) externalreturns (bool);
functionapprove(address spender, uint amount) externalreturns (bool);
functionallowance(address owner, address spender) externalviewreturns (uint);
functionbalanceOf(address owner) externalviewreturns (uint);
functionbalanceOfUnderlying(address owner) externalreturns (uint);
functiongetAccountSnapshot(address account) externalviewreturns (uint, uint, uint, uint);
functionborrowRatePerBlock() externalviewreturns (uint);
functionsupplyRatePerBlock() externalviewreturns (uint);
functiontotalBorrowsCurrent() externalreturns (uint);
functionborrowBalanceCurrent(address account) externalreturns (uint);
functionborrowBalanceStored(address account) publicviewreturns (uint);
functionexchangeRateCurrent() publicreturns (uint);
functionexchangeRateStored() publicviewreturns (uint);
functiongetCash() externalviewreturns (uint);
functionaccrueInterest() publicreturns (uint);
functionseize(address liquidator, address borrower, uint seizeTokens) externalreturns (uint);
/*** Admin Functions ***/function_setPendingAdmin(addresspayable newPendingAdmin) externalreturns (uint);
function_acceptAdmin() externalreturns (uint);
function_setComptroller(ComptrollerInterface newComptroller) publicreturns (uint);
function_setReserveFactor(uint newReserveFactorMantissa) externalreturns (uint);
function_reduceReserves(uint reduceAmount) externalreturns (uint);
function_setInterestRateModel(InterestRateModel newInterestRateModel) publicreturns (uint);
}
contractSErc20Storage{
/**
* @notice Underlying asset for this SToken
*/addresspublic underlying;
}
contractSErc20InterfaceisSErc20Storage{
/*** User Interface ***/functionmint(uint mintAmount) externalreturns (uint);
functionredeem(uint redeemTokens) externalreturns (uint);
functionredeemUnderlying(uint redeemAmount) externalreturns (uint);
functionborrow(uint borrowAmount) externalreturns (uint);
functionrepayBorrow(uint repayAmount) externalreturns (uint);
functionrepayBorrowBehalf(address borrower, uint repayAmount) externalreturns (uint);
functionliquidateBorrow(address borrower, uint repayAmount, STokenInterface sTokenCollateral) externalreturns (uint);
/*** Admin Functions ***/function_addReserves(uint addAmount) externalreturns (uint);
}
contractSDelegationStorage{
/**
* @notice Implementation address for this contract
*/addresspublic implementation;
}
contractSDelegatorInterfaceisSDelegationStorage{
/**
* @notice Emitted when implementation is changed
*/eventNewImplementation(address oldImplementation, address newImplementation);
/**
* @notice Called by the admin to update the implementation of the delegator
* @param implementation_ The address of the new implementation for delegation
* @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation
* @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation
*/function_setImplementation(address implementation_, bool allowResign, bytesmemory becomeImplementationData) public;
}
contractSDelegateInterfaceisSDelegationStorage{
/**
* @notice Called by the delegator on a delegate to initialize it for duty
* @dev Should revert if any issues arise which make it unfit for delegation
* @param data The encoded bytes data for any initialization
*/function_becomeImplementation(bytesmemory data) public;
/**
* @notice Called by the delegator on a delegate to forfeit its responsibility
*/function_resignImplementation() public;
}