-
Notifications
You must be signed in to change notification settings - Fork 7
FLIP-318: VM Bridge Support for Cross-VM NFTs #188
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
Conversation
* remove NFT escrow Locker.erc721address field * update FlowEVMBridgeNFTEscrow to use string interpolation * update cadence_test github action dependency
… support (#173) * update dependencies and implement FlowEVMBridgeCustomAssociations * update FlowEVMBridgeCustomAssociations.CustomAssociationEstablished event & emit * move CadenceNativeERC721.sol * add EVMNativeERC721.sol, update tests & config * update EVMNativeERC721.sol example to include ICrossVM conformance * add draft custom cross-vm NFT registration path * update transaction comments * add utils for cross-VM EVM contract conformance checks * utilize new methods in FlowEVMBridgeUtils for cross-VM registration * add test coverage for net new EVM native NFT * update test setup * add FlowEVMBridgeNFTEscrow.isInitialized() * add comments * Updates to Go Package (#169) * 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 * remove NFT escrow Locker.erc721address field * update FlowEVMBridgeNFTEscrow to use string interpolation * update cadence_test github action dependency * update code comments * add custom association types contract * implement CustomAssociationTypes contract & update tests * update messages to use string interpolation * check consistent native VM on cross-VM NFT registration * fix failing test case * tie cross-VM registration into legacy onboarding path * update comments * update ExampleEVMNativeNFT path storage patterns * add tokenURI assignment to example CadenceNativeERC721.sol & update tests * add initial ExampleCadenceNativeNFT implementation * update CadenceNativeERC721 constructor args * add ICrossVM conformance to CadenceNativeERC721 * resolve EVMBridgedMetadata & deploy ERC721 from Cadence contract init args * initialize escrow on cross-VM NFT registration * update EVM native cross-VM NFT registration tests * fix Cadence-native NFT native VM * fix crossVM interface detection in utils contract * add Cadence-native cross-VM NFT tests * add evm-native cross-VM NFT registration test case * add test cases covering update from bridged to cross-VM NFT * update test case * update comments * add EVM asset conformance check on custom association registration * update cross-vm registration tests * update contract comments * fix NFTFulfillmentMinter pre-condition * update custom associations event types * update test_helpers bytecodes * update utils methods & comments * rename getEVMPointer() to getEVMPointerView() * add getter for CustomConfig supported standard types * Apply suggestions from code review Co-authored-by: Joshua Hannan <[email protected]> * removed unused methods from ExampleCadenceNativeNFT * fix registerCrossVMNFT vulnerability on unchecked minter definition * remove redundant test assertions * consolidate test setup * consolidate test setup in handler tests * update pre-condition err message based on PR feedback * add test coverage for new utils methods * update pre-condition error message * update dependencies to pull from mainnet sources * update go package and fix failing template tests * add Cadence test to Makefile ci command * update go.mod * update flow-cli dependency install command in cadence_test workflow --------- Co-authored-by: Joshua Hannan <[email protected]>
* update cross-VM NFT registration native-VM consistency conditions * fix error message typo
* update pause by type to include custom associations * update conditional to assertion * Apply suggestions from code review Co-authored-by: Joshua Hannan <[email protected]> * fix failing test case on pausing by type * update isTypePaused to include CustomConfig status * fix and reduce isTypePaused logic --------- Co-authored-by: Joshua Hannan <[email protected]>
* update pause by type to include custom associations * update conditional to assertion * Apply suggestions from code review Co-authored-by: Joshua Hannan <[email protected]> * fix failing test case on pausing by type * draft updates to bridgeNFTToEVM() * add mustBurnERC721 util method * add path for Cadence-native cross-VM NFT to EVM * add EVM-native cross-VM NFT to EVM path * update ExampleCadenceNativeNFT minting process * fix ExampleCadenceNativeNFT collection data resolution * begin test coverage for Cadence-native NFT to EVM * update isTypePaused to include CustomConfig status * fix and reduce isTypePaused logic * add FulfilledFromEVM event to NFTFulfillmentMinter * fix bridge cross-VM NFT to EVM errors * add coverage for Cadence-native cross-VM NFT to EVM * add Cadence-native cross-VM NFT test case * add draft EVM-native cross-VM test case - blocked by from EVM route * update EVM call transaction interface * update bridge contract comments * add test_helper methods to consolidate test code * restructure update_nft_from_bridged_tests to allow for control over sequence of events * remove contract comment --------- Co-authored-by: Joshua Hannan <[email protected]>
* update pause by type to include custom associations * update conditional to assertion * Apply suggestions from code review Co-authored-by: Joshua Hannan <[email protected]> * fix failing test case on pausing by type * draft updates to bridgeNFTToEVM() * add mustBurnERC721 util method * add path for Cadence-native cross-VM NFT to EVM * add EVM-native cross-VM NFT to EVM path * update ExampleCadenceNativeNFT minting process * fix ExampleCadenceNativeNFT collection data resolution * begin test coverage for Cadence-native NFT to EVM * update isTypePaused to include CustomConfig status * fix and reduce isTypePaused logic * add FulfilledFromEVM event to NFTFulfillmentMinter * fix bridge cross-VM NFT to EVM errors * add coverage for Cadence-native cross-VM NFT to EVM * add Cadence-native cross-VM NFT test case * add draft EVM-native cross-VM test case - blocked by from EVM route * update EVM call transaction interface * update bridge contract comments * add test_helper methods to consolidate test code * restructure update_nft_from_bridged_tests to allow for control over sequence of events * remove contract comment * update COA callback in FlowEVMBridgeAccessor.withdrawNFT * add EVM-native cross-VM bridging from EVM * add Cadence-native cross-VM NFT from EVM path * consolidate bridgeNFTFromEVM logic for cross-VM NFTs * fix EVM-native cross-VM NFT from EVM path * add internal handler for bridging updated NFTs from EVM * add EVM-native cross-VM NFT test coverage * consolidate test code * add updated cross-VM NFT test case bridging from EVM * add test coverage for Cadence-native updated cross-VM NFTs * update code doc comments * simplify FlowEVMBridgeAccessor.isValidEVMTarget * move internal bridge helpers * update contract comments * add Cadence-native migration transaction & test case * add Cadence-native ERC721 wrapper example * fix bug in handling wrapped ERC721 from EVM & add test case * add balance script * update EVM dependency hash after latest HCU * Update cadence/contracts/bridge/FlowEVMBridge.cdc Co-authored-by: Joshua Hannan <[email protected]> * remove unused method from FlowEVMBridge --------- Co-authored-by: Joshua Hannan <[email protected]>
* update pause by type to include custom associations * update conditional to assertion * Apply suggestions from code review Co-authored-by: Joshua Hannan <[email protected]> * fix failing test case on pausing by type * draft updates to bridgeNFTToEVM() * add mustBurnERC721 util method * add path for Cadence-native cross-VM NFT to EVM * add EVM-native cross-VM NFT to EVM path * update ExampleCadenceNativeNFT minting process * fix ExampleCadenceNativeNFT collection data resolution * begin test coverage for Cadence-native NFT to EVM * update isTypePaused to include CustomConfig status * fix and reduce isTypePaused logic * add FulfilledFromEVM event to NFTFulfillmentMinter * fix bridge cross-VM NFT to EVM errors * add coverage for Cadence-native cross-VM NFT to EVM * add Cadence-native cross-VM NFT test case * add draft EVM-native cross-VM test case - blocked by from EVM route * update EVM call transaction interface * update bridge contract comments * add test_helper methods to consolidate test code * restructure update_nft_from_bridged_tests to allow for control over sequence of events * remove contract comment * update COA callback in FlowEVMBridgeAccessor.withdrawNFT * add EVM-native cross-VM bridging from EVM * add Cadence-native cross-VM NFT from EVM path * consolidate bridgeNFTFromEVM logic for cross-VM NFTs * fix EVM-native cross-VM NFT from EVM path * add internal handler for bridging updated NFTs from EVM * add EVM-native cross-VM NFT test coverage * consolidate test code * add updated cross-VM NFT test case bridging from EVM * add test coverage for Cadence-native updated cross-VM NFTs * update code doc comments * simplify FlowEVMBridgeAccessor.isValidEVMTarget * move internal bridge helpers * update contract comments * add Cadence-native migration transaction & test case * add Cadence-native ERC721 wrapper example * fix bug in handling wrapped ERC721 from EVM & add test case * add balance script * update EVM dependency hash after latest HCU * update view only calls to EVM to use dryCall to reduce computation costs --------- Co-authored-by: Joshua Hannan <[email protected]>
* fix dual-onboarded cross-VM registration edge case * update legacy association check in cross-VM NFT registration
* update pause by type to include custom associations * update conditional to assertion * Apply suggestions from code review Co-authored-by: Joshua Hannan <[email protected]> * fix failing test case on pausing by type * draft updates to bridgeNFTToEVM() * add mustBurnERC721 util method * add path for Cadence-native cross-VM NFT to EVM * add EVM-native cross-VM NFT to EVM path * update ExampleCadenceNativeNFT minting process * fix ExampleCadenceNativeNFT collection data resolution * begin test coverage for Cadence-native NFT to EVM * update isTypePaused to include CustomConfig status * fix and reduce isTypePaused logic * add FulfilledFromEVM event to NFTFulfillmentMinter * fix bridge cross-VM NFT to EVM errors * add coverage for Cadence-native cross-VM NFT to EVM * add Cadence-native cross-VM NFT test case * add draft EVM-native cross-VM test case - blocked by from EVM route * update EVM call transaction interface * update bridge contract comments * add test_helper methods to consolidate test code * restructure update_nft_from_bridged_tests to allow for control over sequence of events * remove contract comment * update COA callback in FlowEVMBridgeAccessor.withdrawNFT * add EVM-native cross-VM bridging from EVM * add Cadence-native cross-VM NFT from EVM path * consolidate bridgeNFTFromEVM logic for cross-VM NFTs * fix EVM-native cross-VM NFT from EVM path * add internal handler for bridging updated NFTs from EVM * add EVM-native cross-VM NFT test coverage * consolidate test code * add updated cross-VM NFT test case bridging from EVM * add test coverage for Cadence-native updated cross-VM NFTs * update code doc comments * simplify FlowEVMBridgeAccessor.isValidEVMTarget * move internal bridge helpers * update contract comments * add Cadence-native migration transaction & test case * add Cadence-native ERC721 wrapper example * fix bug in handling wrapped ERC721 from EVM & add test case * add balance script * update EVM dependency hash after latest HCU * add openzepplin-contracts-upgradeable dependency & update remappings * update solidity dependencies * add upgradeable EVM-native NFT solidity contracts & initial tests * rename Cadence test suite file * add initial tests covering EVM-native NFT updating to cross-VM * add FlowEVMBridge.BridgedNFTBurned event * add getters for new and old asset type associations * move Solidity contract * add util method isBridgeDefined * add migration test cases covering EVM-native NFTs * update legacy x cross-vm type getters * add test coverage for legacy x cross-vm type getters * add legacy x cross-vm EVM address getters * include test coverage for new legacy x cross-VM EVM address getters * add uuid value to BridgedNFTBurned event --------- Co-authored-by: Joshua Hannan <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #188 +/- ##
==========================================
- Coverage 86.19% 81.46% -4.74%
==========================================
Files 18 24 +6
Lines 884 1597 +713
==========================================
+ Hits 762 1301 +539
- Misses 122 296 +174 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Thanks for approving @joshuahannan. Waiting on a new Flow CLI release with fix for onflow/flow-cli#1947 before deploying changes to Testnet. |
* add script to get combined Cadence and COA balance * change to return zero balance if not successful and return all balances * use identifier * add decimals and use UFix64 for Cadence balance
Unblocked by latest Flow CLI v2.2.14. However, I'm going to be traveling and unavailable this afternoon and would like to be available should any post-deployment issues come up. The plan then is to deploy to Testnet on Monday, May 12th. |
@sisyphusSmiling Can we merge this now that testnet is deployed? |
Related: #143
Description
For contributor use:
main
branchFiles changed
in the Github PR explorer