Approval Step for BTP Message transfer on ICON #740
Replies: 3 comments 5 replies
-
IRC2 is the token standard on ICON (similar to ERC20, but with a few differences). However, on IRC2, there is no allowance and approval. The transfer function of IRC2 checks if the |
Beta Was this translation helpful? Give feedback.
-
If a user accidentally transfers wrapped coin to BTS using transfer method, the amount user transfers is sent to the BTS Contract. The amount will be set as User can claim the amount back by calling |
Beta Was this translation helpful? Give feedback.
-
Currently, the logic for approval on wrapped tokens is coded on the BTS Contract itself. The javascore BTS should be changed for respective logic and should be updated. |
Beta Was this translation helpful? Give feedback.
-
Terms Used: NativeCoin, NativeToken, WrappedCoin
NativeCoin: ICX for ICON
NativeToken: IRC2 Token created on ICON (sICX, bnUSD)
WrappedCoin: Tokens created on other chains and which has been registered as IRC2 token on ICON (BNB, ICZ, BUSD, etc)
Current Implementation:
Approve step is different for native token and wrapped coin in ICON side of contract.
For native token, transfer() method of token contract is called with BTS Contract address as "_to" argument
For wrapped coin, approve() method of token contract is called with argument "spender" as BTS Contract address
For EVM chains (SNOW, BSC), approve step is simply done by calling approve() method.
Questions:
@izyak @sdpisreddevil @bbist
I'd like to request you to check the queries above.
Beta Was this translation helpful? Give feedback.
All reactions