Comment on page
check-allowance returns the allowed spending of tokens by an address on behalf of the token holder.
- Socket contracts need spending allowance of a user's sending token in order to swap/bridge it
- This endpoint is used to check whether the contracts have the allowance needed to bridge the sending token
- This is only applicable to ERC-20 tokens and not native tokens (gas paying asset) of a chain.
NOTE :Token allowance needs to be re-checked every time a user updates the input amount of token they want to bridge
API-KEY param needs to be passed in the headers while making the
Returns the value of tokens approved
NOTE :The token allowance is granted to Socket implementation contracts of bridges and DEXs, but bridging transactions need to be initiated via the Socket Registry contract
TEST QUERY :
- If the Socket contracts have allowance to spend user token, the transaction data for bridging from the route chosen by the user needs to be generated from
- In case
valueis 0 or less than the amount the user is trying to bridge, an approval transaction is needed to give Socket contracts approval to spend user tokens. Transaction data for this transaction can be generated from