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

chore: implement OpenSeaWrapper and OpenSeaWrapperFactory contracts #721

Merged
merged 13 commits into from
Jun 14, 2024

Conversation

levalleux-ludo
Copy link
Member

Description

TO BE DECIDED: If the OpenSeaWrapper and OpenSeaWrapperFactory contracts code stay in the core-components repo or will be moved to the protocol-contracts one.

How to test

A few tests have been created to check the factory:

cd contracts
npm ci
npx hardhat test

Copy link
Member

@zajck zajck left a comment

Choose a reason for hiding this comment

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

TO BE DECIDED: If the OpenSeaWrapper and OpenSeaWrapperFactory contracts code stay in the core-components repo or will be moved to the protocol-contracts one.

At some point they will for sure become a part of the protocol-contracts repo. You can even move them to examples already if you wish (examples are not audited).
But if it's more convenient for testing, you can leave them here for now.

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

Attention: Patch coverage is 95.45455% with 5 lines in your changes missing coverage. Please review.

Project coverage is 90.03%. Comparing base (7cbdbb0) to head (3cece54).
Report is 61 commits behind head on main.

Files Patch % Lines
packages/core-sdk/src/marketplaces/opensea.ts 95.04% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #721      +/-   ##
==========================================
+ Coverage   89.47%   90.03%   +0.56%     
==========================================
  Files         163      163              
  Lines        5893     6004     +111     
  Branches      889      910      +21     
==========================================
+ Hits         5273     5406     +133     
+ Misses        620      598      -22     
Flag Coverage Δ
common 92.11% <100.00%> (-3.54%) ⬇️
core-sdk 57.90% <23.30%> (-0.60%) ⬇️
e2e 86.58% <95.45%> (+0.63%) ⬆️
eth-connect-sdk 97.33% <ø> (ø)
ethers-sdk 70.03% <ø> (ø)
ipfs-storage 90.90% <ø> (ø)
metadata 94.70% <ø> (ø)
unittests 61.55% <28.18%> (-0.59%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@levalleux-ludo levalleux-ludo marked this pull request as ready for review May 1, 2024 16:54
contracts/hardhat.config.js Outdated Show resolved Hide resolved
contracts/hardhat.config.js Outdated Show resolved Hide resolved
contracts/hardhat.config.js Outdated Show resolved Hide resolved
contracts/hardhat.config.js Outdated Show resolved Hide resolved
contracts/scripts/deploy.js Outdated Show resolved Hide resolved
contractAddress: nftContract
});
if (!isApprovedForAll1) {
const approveTx = await coreSDK.approveProtocolForAll({
Copy link
Member

Choose a reason for hiding this comment

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

Just a note - I have in my backlog to do a security analysis, whether approve for all is safe or should approval be done per tokenId.

@levalleux-ludo levalleux-ludo merged commit 56d16c8 into main Jun 14, 2024
9 of 11 checks passed
@levalleux-ludo levalleux-ludo deleted the opensea-with-vouchers branch June 14, 2024 16:36
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