Superfluid Framework Class

Description

The entrypoint for the SDK-core, create an instance of this for full functionality.

Constructors

  • Returns Framework

Properties

_tryGetTokenAddress: any

Try to get the token address given an address (returns if valid) or the token symbol via the resolver.

Param: tokenAddressOrSymbol

Returns

token address

batchCall: ((operations) => BatchCall)

Create a BatchCall class from the Framework.

Type declaration

    • (operations): BatchCall
    • Create a BatchCall class from the Framework.

      Parameters

      • operations: Operation[]

        the list of operations to execute

      Returns BatchCall

      BatchCall class

Param: operations

the list of operations to execute

Returns

BatchCall class

contracts: IContracts
createSigner: ((options) => Signer)

Create a signer which can be used to sign transactions.

Type declaration

    • (options): Signer
    • Create a signer which can be used to sign transactions.

      Parameters

      Returns Signer

      ethers.Signer object

Param: options.web3Provider

a Web3Provider object (e.g. client side - metamask, web3modal)

Param: options.provider

an ethers Provider object (e.g. via Hardhat ethers)

Param: options.privateKey

a test account private key

Param: options.signer

a signer object (e.g. ethers.Wallet instance)

Returns

ethers.Signer object

governance: Governance
host: Host
loadNativeAssetSuperToken: ((tokenAddressOrSymbol) => Promise<NativeAssetSuperToken>)

Loads NativeAssetSuperToken class from the Framework. Will throw if token is not NativeAssetSuperToken.

Type declaration

    • (tokenAddressOrSymbol): Promise<NativeAssetSuperToken>
    • Loads NativeAssetSuperToken class from the Framework. Will throw if token is not NativeAssetSuperToken.

      Parameters

      • tokenAddressOrSymbol: string

      Returns Promise<NativeAssetSuperToken>

      NativeAssetSuperToken class

Param: tokenAddressOrSymbol

Returns

NativeAssetSuperToken class

loadPureSuperToken: ((tokenAddressOrSymbol) => Promise<_sdkCore.PureSuperToken>)

Loads PureSuperToken class from the Framework. Will throw if token is not PureSuperToken.

Type declaration

    • (tokenAddressOrSymbol): Promise<_sdkCore.PureSuperToken>
    • Loads PureSuperToken class from the Framework. Will throw if token is not PureSuperToken.

      Parameters

      • tokenAddressOrSymbol: string

      Returns Promise<_sdkCore.PureSuperToken>

      PureSuperToken class

Param: tokenAddressOrSymbol

Returns

PureSuperToken class

loadSuperToken: ((tokenAddressOrSymbol) => Promise<_sdkCore.SuperToken>)

Loads SuperToken class from the Framework. Use this when you're unsure of the token type.

Type declaration

    • (tokenAddressOrSymbol): Promise<_sdkCore.SuperToken>
    • Loads SuperToken class from the Framework. Use this when you're unsure of the token type.

      Parameters

      • tokenAddressOrSymbol: string

        the SuperToken address or symbol (if symbol, it must be on the resolver)

      Returns Promise<_sdkCore.SuperToken>

      SuperToken class

Param: tokenAddressOrSymbol

the SuperToken address or symbol (if symbol, it must be on the resolver)

Returns

SuperToken class

loadWrapperSuperToken: ((tokenAddressOrSymbol) => Promise<WrapperSuperToken>)

Loads WrapperSuperToken class from the Framework. Will throw if token is not WrapperSuperToken.

Type declaration

    • (tokenAddressOrSymbol): Promise<WrapperSuperToken>
    • Loads WrapperSuperToken class from the Framework. Will throw if token is not WrapperSuperToken.

      Parameters

      • tokenAddressOrSymbol: string

      Returns Promise<WrapperSuperToken>

      WrapperSuperToken class

Param: tokenAddressOrSymbol

Returns

WrapperSuperToken class

operation: ((txn, type) => Operation)

Create an Operation class from the Framework.

Type declaration

    • (txn, type): Operation
    • Create an Operation class from the Framework.

      Parameters

      • txn: Promise<PopulatedTransaction>

        the populated transaction to execute

      • type: OperationType

        the operation type

      Returns Operation

      Operation class

Param: txn

the populated transaction to execute

Param: type

the operation type

Returns

Operation class

query: Query
settings: IFrameworkSettings
userInputOptions: IFrameworkOptions
create: ((options) => Promise<Framework>)

Creates the Framework object based on user provided options.

Type declaration

    • (options): Promise<Framework>
    • Creates the Framework object based on user provided options.

      Parameters

      • options: IFrameworkOptions

      Returns Promise<Framework>

      Framework class

Param: options.chainId

the chainId of your desired network (e.g. 137 = matic)

Param: options.customSubgraphQueriesEndpoint

your custom subgraph endpoint

Param: options.resolverAddress

a custom resolver address (advanced use for testing)

Param: options.protocolReleaseVersion

a custom release version (advanced use for testing)

Param: options.provider

a provider object (injected web3, injected ethers, ethers provider) necessary for initializing the framework

Returns

Framework class

Generated using TypeDoc