SDKs@solio/coreContractsFactorylaunchMixedToken

launchMixedToken()

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

Deploys a mixed token with specified properties and optional hooks.

This function handles the deployment of a mixed token on the blockchain using provided parameters such as bonding curve, token type, tax rates, and hooks. If the token type is ‘LOL’, default parameters are used for bonding curve and tax rates.

Parameters

ParameterTypeDescription
clientWriteClientWriteClient The write client to use.
propsFactoryLaunchMixedTokenPropsFactoryLaunchMixedTokenProps The properties required to launch the mixed token.
type FactoryLaunchMixedTokenProps: WriteContractBaseProps & {
  address: Address;
  mixedToken: MixedTokenParam;
};

Returns

Promise<`0x${string}`>

A promise that resolves to the transaction result.

Examples

factory.ts
// launch hodl token
import { factory } from '@solio/core';
import { createWalletClient, custom } from 'viem';
import { sepolia } from 'viem/chains';
const writeClient = createWalletClient({
 chain: sepolia,
 transport: custom(window.ethereum),
});
const mixedTokenParam: MixedTokenParam = { type: 'HODL', ... };
const hash = await factory.write.launchMixedToken(writeClient, {
 address: '0x...', // factory contract address
 mixedToken: mixedTokenParam
});
console.log(hash);
factory.ts
// launch lol token
import { factory } from '@solio/core';
import { createWalletClient, custom } from 'viem';
import { sepolia } from 'viem/chains';
const writeClient = createWalletClient({
 chain: sepolia,
 transport: custom(window.ethereum),
});
const mixedTokenParam: MixedTokenParam = { type: 'LOL', ... };
const hash = await factory.write.launchMixedToken(writeClient, {
 address: '0x...', // factory contract address
 mixedToken: mixedTokenParam
});
console.log(hash);