Skip to content

tylerottoup/terra_nft_escrow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository was used to migrate NFTs from Terra Classic to Terra 2.0 There are 3 parts to this :

  1. The escrow contract (located in the nft-escrow 1.0 directory)

  2. The minter authority (server located in the nft_migrator)

  3. The minter contract (located in the 3 contracts/minter folders)

  4. The first step of the migration is locking the tokens in the escrow contract (this contract version locks the NFT forever, so there is no going back) The contract allows to query easily who deposited each token and which token have been deposited by users. This ecrow contract allows user to deposit only from a collection (from a unique NFT address)

  5. The second step of the migration, is to provide to a user the migration message that allow them to mint on the new blockchain (Terra 2.0 in our case). Indeed, the users will be responsible of sending themselves the minting transaction to the new blockchain. In order to control what NFT can be minted, we use a centralized server. It provides (on demand) the message needed for minting an NFT, if it was indeed deposited in the escrow contract by the designated address. This message has 2 parts : - the minting message - the minting message signature (signed by a private key), that allows to authenticate the mint transaction

  6. The last step is for a user to execute a NFT minting transaction.

Migration Checklist :

  1. Check the contract type the NFT has (especially metadata structure)
  2. Check the nft-migrator/code_id.json file to see if the code id associated with the minted NFT exists
  3. If not, use the upload.js file for example to have the code ID on chain (you have to adapt it a little for new code)
  4. Fill the nft-migrator/.init_migration file with all the necessary details
  5. Call the nft-migrator/dist/init_migration.js file to init migration and change the contracts file (don't forget the chain argument)
  6. Git commit, push, pull on the server side and build
  7. Pass the mnemonics on to the server using the nft_migrator/add_private.ssh
  8. Restart server and we're good to go !

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 54.3%
  • TypeScript 45.5%
  • Shell 0.2%