Get a User's Item Balance

Use this method to get user item balance

Usage in your script

GetUserItemBalance
  .Initialize(destroyAtEnd: true)
  .SetParameters(
    userAddress: "0x...",
    collectionAddress: "0x...",
    tokenId: 1,
    chainId: 56,
  )
  .OnError(error => Debug.Log(error))
  .OnComplete(result => Debug.Log(result))
  .Run();

Member Functions

.Initialize()

ParameterTypeRequiredDescription

destroyAtEnd

bool

Optional

defines if this component will be destroyed after .Run()

.SetParameters()

ParameterTypeRequiredDescription

userAddress

String

True

User wallet address

collectionAddress

String

True

Item collection Address

tokenId

Int

True

Item token ID

chainId

Int

True

Network ID

.onError()

Action on Error: returns error information.

.onComplete()

Action on successful: returns item balance of user.

.Run()

Runs the API call and fills the corresponding model in the component on success.

Last updated