Get a User's Native Token Balance
Last updated
Use this method to get User's Native Balance (like BNB, ETH, MATIC)
GetUserBalance
.Initialize(destroyAtEnd: true)
.SetParameters(
chainId: "97",
userAddress: "0x01dw4...",
)
.OnError(error => Debug.Log(error))
.OnComplete(result => Debug.Log(result.balance))
.Run();.Initialize()
destroyAtEnd
bool
Optional
defines if this component will be destroyed after .Run()
.SetParameters()
chainId
String
Yes
The chain id
userAddress
String
Yes
address of the user
.onError()
Action on Error: returns error information.
.onComplete()
Action on successful: returns balance of user.
.Run()
Runs the API call and fills the corresponding model in the component on success.
Last updated