Proposal for the unbundling process#1
Open
yobro5878 wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Adventure Cards project has cards packs issued on mainnet and is considering unbundling them. Unbundling on mainnet would be expensive for the users, therefore this repository provides mechanisms for unbundling the contracts on the Polygon network.
The directory
snapshotincludes a standalone web3 script that scans mainnet for owners of the individual cards and creates a CSV. A mild modification of this script would be use to snapshot the pack owners and to create transactions for the polygon network.The
polygon-contractsdirectory contains smart contracts for issuing the packs of Adventure Cards on Polygon, and handle further unbundling. The following sequence of steps should be followed to unbundle the cards:The
Pack.solcontract is a verbatim copy ofCard.solon mainnet (0x329Fd5E0d9aAd262b13CA07C87d001bec716ED39) with some added functionality for the drop handling. The implementation is done via inheriting from theCard.solcontract to guarantee the functionality transfer.The
Snapshot.solcontract is to be loaded with the snapshot data from mainnet. When the data is present, it can be frozen and used to replay the data into the drop onPack.solpurely off-chain (which minimizes the error opportunity). Push pattern is assumed as transacting on Polygon is cheap. At this moment, the card packs are re-issued.The
AdventureCard.solcontract is a standalone ERC1155 contract that can be linked with thePack.solcontract. The holders of packs will be able to burn their packs and will be issued theAdventureCard.soltokens instead. These tokens represent the individual cards. It is assumed that the owner of the contract will define the cards from the packs prior to the unbundling process starting. The contract allows setting individual URLs with art for each card type in order to support the art that is currently uploaded to arweave. The contract also provides a hook for card semantics which can be useful for the future development of the game.