You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Short reason string can be used for saving more gas
Every reason string takes at least 32 bytes. Use short reason strings that fits in 32 bytes or it will become more expensive.
main/contracts/dnssec-oracle/RRUtils.sol#L307 "Long keys not permitted"
main/contracts/wrapper/Controllable.sol#L17 "Controllable: Caller is not a controller"
main/contracts/wrapper/BytesUtil.sol#L28 "namehash: Junk at end of name"
main/contracts/wrapper/BytesUtil.sol#L42 "readLabel: Index out of bounds"
main/contracts/wrapper/ERC1155Fuse.sol#L62 "ERC1155: balance query for the zero address"
main/contracts/wrapper/ERC1155Fuse.sol#L87 "ERC1155: accounts and ids length mismatch"
main/contracts/wrapper/ERC1155Fuse.sol#L109 "ERC1155: setting approval status for self"
main/contracts/wrapper/ERC1155Fuse.sol#L176 "ERC1155: transfer to the zero address"
main/contracts/wrapper/ERC1155Fuse.sol#L179 "ERC1155: caller is not owner nor approved"
main/contracts/wrapper/ERC1155Fuse.sol#L197"ERC1155: ids and amounts length mismatch"
main/contracts/wrapper/ERC1155Fuse.sol#L199 "ERC1155: transfer to the zero address"
main/contracts/wrapper/ERC1155Fuse.sol#L202 "ERC1155: transfer caller is not owner nor approved"
main/contracts/wrapper/ERC1155Fuse.sol#L217 "ERC1155: insufficient balance for transfer"
main/contracts/wrapper/ERC1155Fuse.sol#L322 "ERC1155: ERC1155Receiver rejected tokens"
main/contracts/wrapper/ERC1155Fuse.sol#L327 "ERC1155: transfer to non ERC1155Receiver implementer"
main/contracts/wrapper/ERC1155Fuse.sol#L354 "ERC1155: ERC1155Receiver rejected tokens"
main/contracts/wrapper/ERC1155Fuse.sol#L359 "ERC1155: transfer to non ERC1155Receiver implementer"
This implementation code can be saving more gas by removing = 0, it because If a variable was not set/initialized, it is assumed to have default value to 0
change uint256 i = 0 into uint i for saving more gas
using this implementation can saving more gas for each loops.
/main/contracts/wrapper/ERC1155Fuse.sol#L92 for (uint256 i = 0; i < accounts.length; ++i) {
/main/contracts/wrapper/ERC1155Fuse.sol#L205 for (uint256 i = 0; i < ids.length; ++i) {
/main/contracts/dnssec-oracle/BytesUtils.sol#L266 for(uint i = 0; i < len; i++) {
The text was updated successfully, but these errors were encountered:
Every reason string takes at least 32 bytes. Use short reason strings that fits in 32 bytes or it will become more expensive.
https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/dnssec-oracle/RRUtils.sol#L58
= 0
This implementation code can be saving more gas by removing = 0, it because If a variable was not set/initialized, it is assumed to have default value to 0
https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/wrapper/ERC1155Fuse.sol#L145
https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/dnssec-oracle/BytesUtils.sol#L264
uint256 i = 0
intouint i
for saving more gasusing this implementation can saving more gas for each loops.
The text was updated successfully, but these errors were encountered: