Rewrite assembly slot offset for consistency (#5325)

This commit is contained in:
Hadrien Croubois
2025-05-07 21:54:42 +02:00
committed by GitHub
parent bdf8affec3
commit 633a1c85ca
8 changed files with 12 additions and 13 deletions

View File

@ -42,7 +42,7 @@ library ERC1155Utils {
revert IERC1155Errors.ERC1155InvalidReceiver(to);
} else {
assembly ("memory-safe") {
revert(add(32, reason), mload(reason))
revert(add(reason, 0x20), mload(reason))
}
}
}
@ -79,7 +79,7 @@ library ERC1155Utils {
revert IERC1155Errors.ERC1155InvalidReceiver(to);
} else {
assembly ("memory-safe") {
revert(add(32, reason), mload(reason))
revert(add(reason, 0x20), mload(reason))
}
}
}

View File

@ -53,7 +53,7 @@ library ERC1363Utils {
revert ERC1363InvalidReceiver(to);
} else {
assembly ("memory-safe") {
revert(add(32, reason), mload(reason))
revert(add(reason, 0x20), mload(reason))
}
}
}
@ -87,7 +87,7 @@ library ERC1363Utils {
revert ERC1363InvalidSpender(spender);
} else {
assembly ("memory-safe") {
revert(add(32, reason), mload(reason))
revert(add(reason, 0x20), mload(reason))
}
}
}

View File

@ -41,7 +41,7 @@ library ERC721Utils {
revert IERC721Errors.ERC721InvalidReceiver(to);
} else {
assembly ("memory-safe") {
revert(add(32, reason), mload(reason))
revert(add(reason, 0x20), mload(reason))
}
}
}