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

feat(contracts): 454 single transaction ownership verifications #377

Merged
merged 14 commits into from
Jun 10, 2024

Conversation

ptisserand
Copy link
Contributor

@ptisserand ptisserand commented May 27, 2024

Description

This PR add verifications in starknet contract.

create_order

  • check if caller is the offerer.
  • ERC20->ERC721: check if offerer currency balance is at least start_amount.
  • ERC721->ERC20: check if offerer is owner of NFT.

fulfill_order

  • check if caller is the fulfiller.
  • ERC20->ERC721: check if fulfiller is owner of NFT.
  • ERC721->ERC20: check if fulfiller currency balance is at least start_amount.

What type of PR is this? (check all applicable)

  • 🍕 Feature (feat:)
  • 🐛 Bug Fix (fix:)
  • 📝 Documentation Update (docs:)
  • 🎨 Style (style:)
  • 🧑‍💻 Code Refactor (refactor:)
  • 🔥 Performance Improvements (perf:)
  • ✅ Test (test:)
  • 🤖 Build (build:)
  • 🔁 CI (ci:)
  • 📦 Chore (chore:)
  • ⏩ Revert (revert:)
  • 🚀 Breaking Changes (BREAKING CHANGE:)

Related Tickets & Documents

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 README.md
  • 📓 Documentation
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

PR Title and Description Guidelines:

  • Ensure your PR title follows semantic versioning standards. This helps automate releases and changelogs.
  • Use types like feat:, fix:, chore:, BREAKING CHANGE: etc. in your PR title.
  • Your PR title will be used as a commit message when merging. Make sure it adheres to Conventional Commits standards.

Closing Issues

Copy link

linear bot commented May 27, 2024

Copy link

vercel bot commented May 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ark-project-sdk-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2024 3:11pm

Copy link

changeset-bot bot commented May 27, 2024

⚠️ No Changeset found

Latest commit: a20d12c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ptisserand ptisserand requested a review from kwiss May 29, 2024 13:42
@ptisserand ptisserand marked this pull request as ready for review May 29, 2024 13:43

let order_hash = order.compute_order_hash();
let order_info = order.into();
self.orders.write(order_hash, order_info);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would add the original creator from the caller to be sure here so we can find it back i don't think we need the full order wdyt ?

just a key value:
order_hash: order_creator

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creator of the order added in struct.

@kwiss kwiss changed the title Feature/dev 454 single transaction ownership verifications feat(contracts): 454 single transaction ownership verifications Jun 1, 2024
@kwiss kwiss merged commit 17cc161 into main Jun 10, 2024
4 checks passed
@kwiss kwiss deleted the feature/dev-454-single-transaction-ownership-verifications branch June 10, 2024 15:14
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.

3 participants