INSTAPOOL-V4 - Optimism
Inbuilt Flash Loan in DSA Instapool-v4 connector on optimism triggers methods like flashBorrowAndCast, flashPayback, flashMultiBorrowAndCast, flashMultiPayback. You can view details like source code, ABIs on Etherscan.
- Use
0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
to indicate ETH. - use -1 or
dsa.maxValue
for the maximum amount in function. - If not sure about the arguments
getId
andsetId
, pass 0.
FlashBorrowAndCast
Borrow Flashloan and Cast spells.
spells.add({ connector: "INSTAPOOL-C", method: "flashBorrowAndCast", args: [token, amt, route, data, extraData]});
Parameter | Type | Description |
---|---|---|
token | address | Token Address. |
amt | uint | Token Amount. |
route | uint | Flashloan source route. |
data | bytes | targets & data for cast. |
extraData | bytes | to be kept bytes(0) in most cases. Can be useful to decide data for some particular routes |
FlashPayback
Return token to InstaPool.
spells.add({ connector: "INSTAPOOL-C", method: "flashPayback", args: [token, amt, getId, setId]});
Parameter | Type | Description |
---|---|---|
token | address | Token Address. |
amt | uint | Token Amount. |
getId | uint | Get token amount at this ID from `InstaMemory` Contract. |
setId | uint | Set token amount at this ID in `InstaMemory` Contract. |
FlashMultiBorrowAndCast
Borrow multi-tokens Flashloan and Cast spells.
spells.add({ connector: "INSTAPOOL-C", method: "flashMultiBorrowAndCast", args: [tokens_, amts_, route, data, extraData]});
Parameter | Type | Description |
---|---|---|
tokens_ | address[] | Array of Token Addresses. |
amts_ | uint[] | Array of Token Amounts. |
route | uint | Flashloan source route. |
data | bytes | targets & data for cast. |
extraData | bytes | to be kept bytes(0) in most cases. Can be useful to decide data for some particular routes |
FlashMultiPayback
Return multi-tokens to InstaPool.
spells.add({ connector: "INSTAPOOL-C", method: "flashMultiPayback", args: [tokens_, amts_, getIds, setIds]});
Parameter | Type | Description |
---|---|---|
tokens_ | address[] | Array of Token Addresses. |
amts_ | uint[] | Array of Token Amounts. |
getIds | uint[] | Array of getId token amounts. |
setIds | uint[] | Array of setId token amounts. |
If you still can't find something you're looking for or have any questions, ask them at our developers community on Discord or simply send an Email.
Our team is excited about assisting you to build an application using Instadapp Developer Platform. Your questions and feedback help us make a better development environment for future developers.