InvestmentsManager
IInvestmentsManager
, LazyInitCapableElement
_organizationComponentKey
, executorRewardPercentage
, prestoAddress
, tokenFromETHToBurn
, _tokensFromETH
, firstSwapToETHBlock
, _swapToETHInterval
, _tokensToETH
, _tokensToETHPercentages
and LazyInitCapableElement
init dataโLazyInitCapableElement
, and must be initialized following the pattern explained here, passing the following parameters:bytes32
_organizationComponentKey
-> this represents the key of the component to which ETH acquired through the sale of other tokens will be sent (to learn more, see the organizationComponentKey section below).uint256
executorRewardPercentage
-> this represents the percentage that the caller--AKA the msg.sender
--of the swapFromETH
/ swapToETH
functions of the Investment Manager receives as a reward for calling the TreasurySplit
function.address
PrestoAddress
-> this is the address of the Presto contract [insert here]bytes
lazyInitResponse
-> this must contain the encoded parameters explained below.bytes
toETHData
-> this must contain the encoded parameters explained below.lazyInitResponse
parameter must be populated as follows:address
tokenFromETHToBurn
-> this represents the (optional) address to which the tokens will be burned after ETH has been swapped for them.address[]
_tokensFromETH
-> this represents the addresses of the tokens for which ETH will be swapped.toETHData
parameter must be populated as follows:uint256
firstSwapFromETHBlock
-> this is the first block from which swapToETH can be called.uint256
_swapFromETHInhis terval
-> this is the block-based interval that must pass between each execution of swapToETH
.address[]
_tokensToETH
-> this represents the addresses of the tokens that will be sold for ETH.uint256[]
_tokensToETHPercentages
-> this represents, for each token in the _tokensToETH array, the percentage of its balance in the Treasury Manager to sell._organizationComponentKey
parameter, which is set during initialization of the Investments Manager contract, define the address that will receive the ETH swapped out for ERC20s using the swapToETH
function._keys
parameter during initialization of the TreasurySplitter
) to receive the ETH, the entire amount is automatically sent to the Treasury Manager of the Organization to which the InvestmentsManager
is attached as a Component.PrestoOperation[]
tokensFromETHData
->this should be passed as empty; the PrestoOperation[]
struct(s) is automatically populated by the swapFromETH
function.PrestoOPeration
tokenFromEHToBurndata
-> this should be passed as empty; the PrestoOperation
struct is automatically populated by the swapFromETH
function.address
executorRewardReceiver
-> this is the receiver address for the executorReward
.executorReward
amount is calculated as (the amount to swap * executorReward percentage)
._tokensFromETH
a swap is performed. For example, if _tokensFromETH
consists of $OS, one swap is performed; if it consists of $OS and $UNI, two swaps are performed; and so on._tokensFromETH
consists of $OS), then the entire balance is spent for that operation; if it must swap ETH for $OS and $UNI (_tokensFromETH
consists of $OS and $UNI), the balance is divided by two; and so on.tokenToBurn
is set in the Investments Manager, a swap-and-burn operation is performed on the purchaesd token. The amount of ETH set aside for the operation is used to buy the token, which is then automatically burned.swapToETH
function is used to sell ERC20 tokens for ETH:PrestoOperation[]
tokensToETHData
-> this should be passed as empty; the PrestoOperation[]
struct(s) is automatically populated by the swapToETH
function.address
executorRewardReceiver
-> this is the receiver address for the executorReward
._swapToETHInterval
is has passed.executorReward
amount is calculated as (the amount to swap * executorReward percentage)
._tokensToETH
a swap is performed. For example, if _tokensToETH
consists of $OS, one swap is performed; if it consists of $OS and $UNI, two swaps are performed; and so on._organizationComponentKey
).