Skip to content
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

Daniil Krizhanovskyi <[email protected]> #850

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

dkrizhanovskyi
Copy link

Summary

This PR resolves the compilation issues in NFTSwap.sol and improves its functionality by:

  • Correcting undeclared variable _order by mapping it correctly to nftList.
  • Updating and fixing import paths for ERC721 dependencies to match the directory structure.
  • Implementing proper validations for key functions:
    • list: Ensures only the owner can list NFTs and validates the approval.
    • purchase: Checks sufficient payment and proper transfer logic.
    • revoke: Verifies the ownership before revoking an order.
    • update: Ensures only the owner can update the price.
  • Successfully compiled the contract and verified output artifacts.

What type of PR is this (这是什么类型的PR)

  • BUG(程序错误)

Which issue(s) this PR fixes(Optional) (这个PR 修复了什么问题 (可选择))

What this PR does / why we need it (这个PR 做了什么/ 我们为什么需要这个PR)

This PR fixes the issues that caused the NFTSwap.sol contract to fail compilation and ensures proper functioning of its core methods for listing, purchasing, revoking, and updating NFT orders.
It is critical to fix these issues to maintain functionality and compatibility in the repository.

Fix NFTSwap.sol

- Resolved undeclared variable `_order` issues by mapping it correctly to `nftList`.
- Corrected import paths for ERC721 dependencies.
- Implemented proper validations for `list`, `purchase`, `revoke`, and `update` methods.
- Compiled the contract successfully and verified output artifacts.

This closes issue #830.
@AmazingAng AmazingAng merged commit 162c1c1 into AmazingAng:main Dec 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] [Languages/pt-br] Some code compile errors.
2 participants