Skip to content
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

fix: nft linker example #165

Merged
merged 6 commits into from
Jan 15, 2024
Merged

fix: nft linker example #165

merged 6 commits into from
Jan 15, 2024

Conversation

npty
Copy link
Member

@npty npty commented Jan 15, 2024

Description

The NFT Linker example doesn't work properly so this PR addresses these concerns by implementing the following:

  1. Fixing the Functional Issues:

    • The script has been revised to ensure proper operation, particularly focusing on the round trip transmission of the NFT token.
    • Addressed a deployment issue causing mismatched addresses across chains, which previously led to execution failures on the destination chain.
  2. Improving Readability: Modifications have been made to enhance the clarity and readability of the example script, make it easier to understand.

  3. nft-linker example is now added to the test script.

Example Output

==== Initially ====
Minted token ID: '552232130' for Avalanche
Token '552232130' was originally minted at Avalanche is at Avalanche.

==== Approve Original NFT to NFTLinker's contract if needed ====
Approved Original NFT (552232130) to NFTLinker's contract
Tx Approved Hash: 0xb4f199d17785141f933f58e26d62b646461fd18ac878f4c62be10beea7aeab3d

==== Send NFT to NFTLinker's contract ====
Sent NFT 552232130 to NFTLinker's contract 0xa7df30a120c4a99f1843f5df6b5de7cc71fb55046cc25e7bdab5b60def1463ab
Token ID at Fantom will be: '106441082702920043141391782483983459619906865214019059855714686922452481221015'

==== Verify Result ====
Token '106441082702920043141391782483983459619906865214019059855714686922452481221015' was originally minted at Avalanche is at Fantom.

==== Approve Remote NFT to NFTLinker's contract ====
Approved Remote NFT (106441082702920043141391782483983459619906865214019059855714686922452481221015) to NFTLinker's contract
Tx Approved Hash: 0xc2d9c3628ffafea2df0e990bb103a5e2aa5d08ebc5e6f039dec21f17a6cf8699

==== Send NFT back from 'Avalanche' to Fantom ====
Sent NFT 106441082702920043141391782483983459619906865214019059855714686922452481221015 back to Avalanche 0x528bf12f90ac1468dd655624be544ef55c6948bc32bdeb373b7bdec8bec3ff5d

==== Verify Result ====
Token '552232130' was originally minted at Avalanche is at Avalanche.

Thank you @benjamin852 for flagging this issue 🙏

@npty npty requested review from re1ro, Foivos, benjamin852 and canhtrinh and removed request for re1ro January 15, 2024 09:39
@npty npty changed the title Fix: nft linker example xix: nft linker example Jan 15, 2024
@npty npty changed the title xix: nft linker example fix: nft linker example Jan 15, 2024
@npty npty requested a review from StephenFluin January 15, 2024 09:47
@benjamin852 benjamin852 merged commit f78578a into main Jan 15, 2024
4 checks passed
@benjamin852 benjamin852 deleted the fix/nft-linker-example branch January 15, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants