Replies: 4 comments 6 replies
-
I'd like to know if we have any corresponding changes to the ABI file and the e.g:
How about the |
Beta Was this translation helpful? Give feedback.
-
@bbist @CyrusVorwald-ICON I could forsee a chance of a vulnerability, need your thoughts on this. This vulnerability can be exploited only if admin access is compromised in BTS of any connected chain. Consider a scenario where a user creates a HRC20 with Ticker BNB, and managed to get it registered. if user transfers this token to BTS of BSC wouldn’t that let user drain the BNB. |
Beta Was this translation helpful? Give feedback.
-
ABI for BTS Contracts BTS Java BTSPeriphery.sol |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Because of a need to make the service handlers consistent, we decided to merge
nativecoin bsh
andtoken bsh
. Now, we have a single BTPTokenService (BTS) that serves the same purpose of aforementioned two contracts. Here are the transfer cases:bts.transferNativeCoin { value } (String _to)
Get Token Address:
token = bts.coinAddress(String _coinName)
Approve:
token.approve(<bts_address>, <approval_amount>)
Transfer:
bts.transfer(String _coinName, BigInteger _value, String _to)
Get Token Address:
token = bts.coinAddress(String _coinName)
Transfer To BTS:
token.transfer(<bts_address>, <amount>)
Transfer:
bts.transfer(String _coinName, BigInteger _value, String _to)
Same as WrappedNativeCoin if the token has approve method, otherwise as IRC2.
BTSCore.transferNativeCoin { value } (string calldata _to) external payable
Get Token Address:
token = BTSCore.coinId(string calldata _coinName)
Approve:
token.approve(<bts_core_address>, <approval_amount>)
Transfer:
BTSCore.transfer(string calldata _coinName, uint256 _value, string calldata _to)
Same as WrappedNativeCoin.
Beta Was this translation helpful? Give feedback.
All reactions