Balancer V2
Last updated
Last updated
In this section, we will introduce the Balancer V2 SDK interfaces, which provide developers with a convenient and efficient way to interact with the Balancer V2 protocol. These interfaces are related to flash loan, and are designed to be used easily and flexibly.
The following section will introduce the interfaces related to the Balancer V2 protocol, which can be accessed through the api.protocols.balancerv2.
prefix.
The following code defines functions related to the Balancer V2 flash loan logic:
Please refer to the section for more information.
getFlashLoanTokenList(chainId: number): An asynchronous function that retrieves the list of tokens supported by the Balancer V2 flash loan logic on the specified chainId
.
getFlashLoanQuotation(chainId: number, params: FlashLoanParams): An asynchronous function that retrieves a quotation for flash loaning assets on the Balancer V2 protocol with the specified params
object on the specified chainId
.
newFlashLoanLogic(fields: FlashLoanFields): A function that creates the Balancer V2 flash loan logic data with the given fields
object.
newFlashLoanLogicPair(loans: FlashLoanFields['loans']): A function that creates the Balancer V2 flash loan logic data pair with the given loans
object.