There is no check whether for and to address are the same.
function _transfer(
address from,
address to,
uint256 id,
uint256 amount
) internal virtual override {
uint128 _amount = uint128(amount);
@> if (from != address(0)) {
uint128 fromBalance = _balances[id][from].amount;
require(uint256(fromBalance) >= amount, "ERC1155: insufficient balance for transfer");
// Because we know fromBalance >= amount, we know amount < type(uint128).max
_balances[id][from].amount = fromBalance - _amount;
}
_balances[id][to].amount = _balances[id][to].amount.add(_amount);
}
There is o check whether both address are same or not.It will cost Gas.
require(from!=to);
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.