-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates master from dev #273
base: master
Are you sure you want to change the base?
Conversation
RMRKTokenHolder (IERC7590-Draft Implementation) now reverts if transferred ERC-20 balance is not the specified amount. Improves @dev comment on IERC7401, directOwnerOf method.
…ions and tokenIds on setters and getters.
No long uses structs as return values for batch getters. If a single attribute is sent on batch getter/setters it will use it for all collections and tokens.
Bumps [squirrelly](https://github.com/squirrellyjs/squirrelly) from 8.0.8 to 9.0.0. - [Release notes](https://github.com/squirrellyjs/squirrelly/releases) - [Commits](squirrellyjs/squirrelly@v8.0.8...v9.0.0) --- updated-dependencies: - dependency-name: squirrelly dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](follow-redirects/follow-redirects@v1.15.5...v1.15.6) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
Interface was refactoring purely for ordering purposes.
Renames methods to set and get collection attributes metadata to make it explicit they are per collection.
Makes getAssetMetadata on MinifiedEquippable virtual.
The NFT to transfer can be equipped, nested or free. The destination must be an NFT. The NFT can be equipped into the destination. If destination slot is occupied, it will be unequipped. All these operations happen under a single transactions, given the right approvals.
This saves about 40% of gas since accept operation is not needed, and pending children array is not used. It also saves 4.5% of contract size.
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
if (tokenId != 0 && !_tokenAssets[tokenId][assetId]) | ||
revert RMRKTokenDoesNotHaveAsset(); |
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: rules.solidity.performance.use-nested-if Note
There are more advantages, such as easier to read code and better coverage reports.
if ( | ||
(parentId != 0 && _msgSender() != owner) || | ||
!(_msgSender() == owner || | ||
isApprovedForAll(owner, _msgSender()) || | ||
getApproved(tokenId) == _msgSender()) | ||
) { | ||
revert RMRKNotApprovedOrDirectOwner(); | ||
} |
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: rules.solidity.performance.use-nested-if Note
There are more advantages, such as easier to read code and better coverage reports.
if (to == address(this) && tokenId == destinationId) | ||
revert RMRKNestableTransferToSelf(); |
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: rules.solidity.performance.use-nested-if Note
There are more advantages, such as easier to read code and better coverage reports.
tokenId, | ||
data | ||
); | ||
_balances[from] -= 1; |
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: rules.solidity.security.basic-arithmetic-underflow Note
if (nextOwner == address(this) && nextOwnerTokenId == currentId) { | ||
revert RMRKNestableTransferToDescendant(); | ||
} |
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: rules.solidity.performance.use-nested-if Note
There are more advantages, such as easier to read code and better coverage reports.
if ( | ||
_msgSender() != owner && | ||
!isApprovedForAllForAssets(owner, _msgSender()) | ||
) revert RMRKApproveForAssetsCallerIsNotOwnerNorApprovedForAll(); |
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: rules.solidity.performance.use-nested-if Note
There are more advantages, such as easier to read code and better coverage reports.
_equipCountPerChild[tokenId][equipment.childEquippableAddress][ | ||
equipment.childId | ||
] -= 1; |
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: rules.solidity.security.basic-arithmetic-underflow Note
if (tokenId != 0 && !_tokenAssets[tokenId][assetId]) | ||
revert RMRKTokenDoesNotHaveAsset(); |
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: rules.solidity.performance.use-nested-if Note
There are more advantages, such as easier to read code and better coverage reports.
if ( | ||
parentData.parentEquippedAssetId != 0 && | ||
parentData.parentEquippedSlotPartId != 0 | ||
) { | ||
IERC6220(parentData.parentCollection).unequip( | ||
parentData.parentTokenId, | ||
parentData.parentEquippedAssetId, | ||
parentData.parentEquippedSlotPartId | ||
); | ||
} |
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: rules.solidity.performance.use-nested-if Note
There are more advantages, such as easier to read code and better coverage reports.
if ( | ||
child.contractAddress == childCollection && | ||
child.tokenId == childId | ||
) { | ||
destination.acceptChild(parentId, i, childCollection, childId); | ||
return; | ||
} |
Check notice
Code scanning / Semgrep OSS
Semgrep Finding: rules.solidity.performance.use-nested-if Note
There are more advantages, such as easier to read code and better coverage reports.
No description provided.