The function TSender.sol__airdropERC20
does not validate if tokenAddress
is a valid ERC20 token contract address. If an invalid address is passed, it might lead to unexpected behavior or errors.
The function Tsender.sol__airdropERC20
accepts a parameter tokenAddress
, which is supposed to be the address of an ERC20 token contract. The function does not validate if tokenAddress
is a valid ERC20 token contract address. This omission can lead to the following issues :
If an invalid non-contract address is passed, the function may try to interact with an address that does not support the ERC20 interface, this can result in a failed transaction and unexpected behavior.
If the address corresponds to a malicious contract it might lead to more severe issues.
The function TSender.sol__airdropERC20
does not validate if tokenAddress
is a valid ERC20 token contract address. If an invalid address is passed, it might lead to unexpected behavior or errors.
Add a Check to ensure tokenAddress
is a valid contract address.
we can use Address
library from OpenZeppelin, which provides a function isContract
to check if an address is a contract.
This check can be performed in the beginning of TSender.sol__airdropERC20
function to ensure the tokenAddress
is indeed a contract.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.