SDKs@solio/coreContractsMixedTokensetAdmin

setAdmin()

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

Sets the project admin of a mixed token contract.

Parameters

ParameterTypeDescription
clientWriteClientWriteClient The write client to use.
propsMixedTokenSetAdminPropsMixedTokenSetAdminProps The properties to use for setting the admin.
type MixedTokenSetAdminProps: WriteContractBaseProps & {
  address: Address;
  adminAddress: Address;
};

Returns

Promise<`0x${string}`>

A promise that resolves to the result of the write contract.

Example

mixed-token.ts
import { mixedToken } from '@solio/core';
import { createWalletClient, custom } from 'viem';
import { sepolia } from 'viem/chains';
const writeClient = createWalletClient({
 chain: sepolia,
 transport: custom(window.ethereum),
});
const hash = await mixedToken.write.setAdmin(writeClient, {
 address: '0x...', // mixed token contract address
 adminAddress: '0x...'
});
console.log(hash);