-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
contracts/other-contracts/opensea-wrapper/OpenSeaWrapperFactory.sol
Outdated
Show resolved
Hide resolved
contracts/other-contracts/opensea-wrapper/OpenSeaWrapperFactory.sol
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
contracts/other-contracts/opensea-wrapper/OpenSeaWrapperFactory.sol
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: albertfolch-redeemeum <102516373+albertfolch-redeemeum@users.noreply.github.com>
contractAddress: nftContract | ||
}); | ||
if (!isApprovedForAll1) { | ||
const approveTx = await coreSDK.approveProtocolForAll({ |
There was a problem hiding this comment.
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.
…ween WETH and Wrapped Native currency token (which are equivalent on Ethereum, but different on other chains)
Description
OpenSeaWrapper
got from https://github.com/bosonprotocol/boson-protocol-contracts/blob/openSeaWrapper/contracts/example/Wrappers/OpenSeaWrapper.solwith main difference is that constant environment configuration (seaport address, ...) has been replaced with constructor arguments (to allow running on dummy environments).
Now an
OpenSeaWrapperFactory
allows a user to create a wrapper for an existing voucher contract. Only the seller (assistant or admin) is allowed to create such a wrapper for one of their voucher contracts.TO BE DECIDED: If the
OpenSeaWrapper
andOpenSeaWrapperFactory
contracts code stay in thecore-components
repo or will be moved to theprotocol-contracts
one.How to test
A few tests have been created to check the factory: