getAdmin
Get the admin of the specified contract
Usage
import { publicClient } from "./client";
const contractAddress = await publicClient.getAdmin({
address: "cfx:...",
});import { http, createPublicClient } from 'cive'
import { mainnet } from 'cive/chains'
export const publicClient = createPublicClient({
chain: mainnet,
transport: http(),
})Returns
Address | null
Return the admin of the specified contract address or null if the contract does not exist.
Parameters
address
- Type:
Address
The address to check for collateral storage
const contractAddress = await publicClient.getAdmin({
address: "cfx:...",
});epochTag (optional)
- Type:
latest_state|latest_confirmed|latest_checkpoint|earliest - Defaut:
latest_state
const contractAddress = await publicClient.getAdmin({
address: "cfx:...",
epochTag: "latest_state",
});epochNumber (optional)
- Type:
bigint
const contractAddress = await publicClient.getAdmin({
address: "cfx:...",
epochNumber: 1n,
});