Tooling
Module SDK
Modules
getAutoSavingAccountTokenConfig

⚠️ Deprecation Notice

ModuleSDK was developed by Rhinestone and is no longer actively supported. For new projects, we recommend using the Rhinestone SDK instead.

Rhinestone SDK Documentation (opens in a new tab)

getAutoSavingAccountTokenConfig

Get the configuration of the auto-save module for a specific token.

Usage

const config = await getAutoSavingAccountTokenConfig({
  client,
  account,
  token: '0x123...',
})

Parameters

client

  • Type: PublicClient

The rpc client to use for the chain you want to query.

account

The account to get the auto-save configuration for.

token

The address of the token to get the auto-save configuration for.

Returns

config

  • Type: Promise<[number, Address, number]>

The config for the auto-save module for the token. The array contains the following values:

  1. The percentage of the received token to save.
  2. The address of the vault to save the token to.