Skip to content

Conversation

@arec1b0
Copy link

@arec1b0 arec1b0 commented Dec 6, 2024

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