🔑
New Bitcoin City Developers
  • Keys API
    • Get Top Key Holders
    • Search Key Holders
    • Track New Key Holders
    • Get Trade History Data
    • Get Trade History by Address
    • Get Chart Key by Address
    • Get Chart Token by Address
    • Get List Token Balance by Address
    • Get User Profile
    • Get Tweet Like Retweet
    • Get Number Tweet Post Comment
    • Get List Bull Bear (Mr Market)
    • Get Bull Bear Detail
    • Get List Raffle
    • Get Raffle Detail
    • Get List Spin Wheel
    • Get Spin Wheel Detail
  • Keys Contract Interaction
    • Get Keys Holding by User
    • Get Buying Price
    • Get Selling Price
    • Buy Key
    • Sell Key
    • Estimate Swap Key
    • Execute Swap Key
    • Multicall
    • Staking Open
    • Staking Close
    • Staking Order Create
    • Staking Order Close
  • PlaceHolder Chrome Extension
  • Prompts
  • Demo site
    • Demo
Powered by GitBook
On this page
  • Contract function
  • Contract address
  • Parameters
  • Sample code
  1. Keys Contract Interaction

Get Keys Holding by User

Get a list of the user's key holdings.

Contract function

balanceOf

Contract address

Key address

Parameters

address: User address

Sample code

 const { data: ownedAmount }: { data: BigInt | undefined } = useContractRead({
    address: user.tokenaddress as `0x${string}`,
    abi: TOKEN_ABI,
    functionName: "balanceOf",
    args: [address],
  });
PreviousKeys Contract InteractionNextGet Buying Price

Last updated 1 year ago