Skip to content
Cive

getSponsorInfo

Get the contract sponsor info by address

Usage

import {  } from "./client";
const  = await .({
  : "cfx:...",
});

Returns

Sponsor

The sponsor info

Parameters

Address

  • Type: Address
const sponsorInfo = await publicClient.getSponsorInfo({
  address: "cfx:...",
});

epochTag (optional)

  • Type: latest_state| latest_confirmed| latest_checkpoint | earliest
  • Defaut: latest_state
import { http, createPublicClient } from 'cive'
import { mainnet } from 'cive/chains'
 
export const publicClient = createPublicClient({
  chain: mainnet,
  transport: http(),
})
// ---cut---
const sponsorInfo = await publicClient.getSponsorInfo({
  address: "cfx:...",
  epochTag: "latest_state", 
});

epochNumber (optional)

  • Type: bigint
import { http, createPublicClient } from 'cive'
import { mainnet } from 'cive/chains'
 
export const publicClient = createPublicClient({
  chain: mainnet,
  transport: http(),
})
// ---cut---
const sponsorInfo = await publicClient.getSponsorInfo({
  address: "cfx:...",
  epochNumber: 1n, 
});

JSON-RPC Method

cfx_getSponsorInfo