Learn how to use the checkApprove JSON-RPC method.
checkApprove
checkApprove
returns a Boolean based upon whether a given address has approved spending of a specified amount for a particular ERC-20 token. It takes:
address
- string.tokenAddress
- string.amount
- string.Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Request to check if a token is approved for swapping.
The body is of type object
.
Successful response with approval status.
The response is of type object
.