-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add EVM-native cross-vm NFT interfaces & custom cross-vm registration support #173
Conversation
* update to core-contracts v1.6.0 * add deploy utils transaction and update deps * refactor go pkg * update Makefile and require correct package * add accessor deploy transaction and make sure it is included in templateS * fix bug in import replacement * fix accessor replace
@sisyphusSmiling Can you also make sure that you pull the latest changes from |
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.
Most of the contract code looks good! I'll do another pass on the contracts and tests once you've finished writing all the tests
|
||
access(all) | ||
fun testRegisterAgainFails() { | ||
Test.reset(to: snapshot) |
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 another comment to save code. Maybe we could take a snapshot after we register in the previous test also and then just reset to that so we don't have to copy all the same code here
var addrRequiresOnboarding = evmAddressRequiresOnboarding(erc721AddressHex) | ||
?? panic("Problem getting onboarding requirement by address") | ||
var typeRequiresOnboarding = typeRequiresOnboardingByIdentifier(exampleCadenceNativeNFTIdentifier) | ||
?? panic("Problem getting onboarding requirement by identifier") |
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.
Where was the custom erc721 contract deployed? I'm not seeing it
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.
The ERC721 bytecode is passed on deployment of the ExampleCadenceNativeNFT
contract and deployed within that contract's init.
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.
It seems like you are still working on adding more test cases, so I assume you were planning on adding these, but it would be nice to have a test case for each pre-condition and assertion in the register cross-vm nft function. A few examples are verifying that the type checks work for non-NFTs, trying to update a bridge-defined contract, trying to register contracts that don't actually point to each other from either side, or trying to register a cross-VM nft for a cadence contract that has been deployed but the solidity contract has not been configured properly, but there are probably more
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.
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.
Similar comments as the cadence native tests. Seems like there are a decent amount more edge cases to test, but I'm sure you're planning on getting to it
Co-authored-by: Joshua Hannan <[email protected]>
3f8b8f6
to
2e3245a
Compare
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.
Looks pretty good! Looks like CI is failing because of github diff, so that should hopefully be easy to fix
oh, also can you add the new contracts to the |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## flip-318 #173 +/- ##
===========================================
Coverage ? 79.13%
===========================================
Files ? 23
Lines ? 1337
Branches ? 0
===========================================
Hits ? 1058
Misses ? 279
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@joshuahannan updated go package files in c922464 and ba61ad3 and I got CI passing |
Closes: #167 #144 #145 #146
Description
registerCrossVMNFT
if detected. Note that EVM-native cross-VM NFTs which require anNFTFulfillmentMinter
Capability will revert on permissionless onboarding. This is viewed as preferential to onboarding via the permissionless path and later requiring an custom association as cross-VM conformance clearly indicates an intention by the project to onboard as a cross-VM NFT.For contributor use:
main
branchFiles changed
in the Github PR explorer