SDKs@solio/coreContractsMixedTokengetTreasury

getTreasury()

function getTreasury(client, props): Promise<`0x${string}`>

Reads the project treasury address of a mixed token.

Parameters

ParameterTypeDescription
clientReadClientReadClient The read client to use.
propsMixedTokenGetTreasuryPropsMixedTokenGetTreasuryProps The properties to use.
type MixedTokenGetTreasuryProps: {
  address: Address;
};

Returns

Promise<`0x${string}`>

The project treasury address.

Example

mixed-token.ts
import { mixedToken } from '@solio/core';
import { createClient, http } from 'viem';
import { sepolia } from 'viem/chains';
const readClient = createClient({
 chain: sepolia,
 transport: http(),
});
const treasury = await mixedToken.read.getTreasury(readClient, {
 address: '0x...' // mixed token address
});