- detector id:
transfer
- severity: info
Find all transfer actions.
This detector can help to locate all the transfer actions for both native tokens and NEP 141 tokens.
// Promise::transfer
Promise::new(env::predecessor_account_id()).transfer(amount);
// NPE141 ft_transfer
// https://github.com/ref-finance/ref-contracts/blob/c580d8742d80033a630a393180163ab70f9f3c94/ref-exchange/src/account_deposit.rs#L446
ext_fungible_token::ft_transfer(
sender_id.clone(),
U128(amount),
None,
token_id,
1,
GAS_FOR_FT_TRANSFER,
)
.then(ext_self::exchange_callback_post_withdraw(
token_id.clone(),
sender_id.clone(),
U128(amount),
&env::current_account_id(),
0,
GAS_FOR_RESOLVE_TRANSFER,
))
In these samples, both the native token transfer and the NEP 141 token transfer can be detected by Rustle.