Skip to content

XP-NETWORK/testing-icp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Testing Dfinity integration

This project is a part of the Dfinity grant

Project initiation

yarn init -y
yarn add "git+https://github.com/xp-network/xpjs#bleeding-edge" @elrondnetwork/erdjs ethers @taquito/taquito @temple-wallet/dapp dotenv
yarn add @dfinity/agent @dfinity/candid @dfinity/identity @dfinity/nns @dfinity/principal
mkdir src

Populate the environment variables

Rename the .env.example to .env

mv .env.example .env

Populate the keys of the .env file with the relevant values.

Minting a testnet NFT

Before we can test, we need at least one NFT on our account, so let's mint it.

yarn mint

Example of the expected output:

$ tsc && node ./dist/mint.js
{
  requestId: ArrayBuffer {
    [Uint8Contents]: <f7 55 2b 32 37 4c ea 46 1a 40 0c 89 dc 56 8b a3 85 e1 68 8f 12 14 2f 5c 45 27 56 96 f4 79 44 29>,
    byteLength: 32
  },
  response: { ok: true, status: 202, statusText: 'Accepted' }
}
✨  Done in 31.54s.

Listing NFTs on the ICP Testnet

To be sure we're bridging the right NFT, let's see that we have it on the chain:

yarn nft-index

Approving an NFT for Transfer

Before the bridge is allowed to transfer an NFT, it must be given the right to do so:

yarn approve

Transferring an NFT

Make sure to run the steps above before transferring.

yarn transfer

The present repository explains transferring NFTs FROM Dfinity.
Sending TO Dfinity from other chains is as easy as selecting the Dfinity as the target chain & providing a relevat receiver address.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors