Permit2
In this section, we will introduce the Permit2 SDK interface, which provides developers with a convenient and efficient way to interact with the Permit2 protocol. These interfaces are related to pull token and are designed to be used easily and flexibly.
The following section will introduce the interfaces related to the Permit2 protocol, which can be accessed through the api.protocols.permit2.
prefix.
PullToken
The following code defines interfaces and functions related to the Permit2 pull token logic:
Types
PullTokenFields: A type that represents the fields required for the Permit2 pull token logic.
PullTokenLogic: An interface that extends the
Logic
interface and represents the Permit2 pull token logic. It includes therid
, andfields
properties.
Functions
getPullTokenTokenList(chainId: number): An asynchronous function that retrieves the list of tokens supported by the Permit2 pull token logic on the specified
chainId
.newPullTokenLogic(fields: PullTokenFields): A function that creates the Permit2 pull token logic data with the given
fields
object.
Example Code
Last updated