VeridaToken.enableTransfer() should be called enableMint.
The isTransferEnabled variable is only used to check if the transfer is a mint not if the token is being transfered so the name should be changed to match the functionality:
if (!isTransferEnabled) {
assembly {
if eq(iszero(sender), 0) {
if eq(iszero(recipient), 0) {
let ptr := mload(0x40)
mstore(ptr, 0x69126dbd00000000000000000000000000000000000000000000000000000000)
revert(ptr, 0x4) //revert TransferLimited()
}
}
}
}
@ITStar10 I'd prefer the functionality be changed to check if the token is being transferred, it shouldn't care about mint.
Feedback from Hashlock audit.
[QA-01] Function should be named enableMint()
VeridaToken.enableTransfer()
should be called enableMint.The isTransferEnabled variable is only used to check if the transfer is a mint not if the token is being transfered so the name should be changed to match the functionality:
@ITStar10 I'd prefer the functionality be changed to check if the token is being transferred, it shouldn't care about
mint
.