Skip to content

w3f-grants-archive/polkadot-nftaa-proposal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NFTAA Proposal

This is the proposal for the NFTAA pallet. For more information, as well as details on the required runtime configuration, please refer to the README in the pallet repository.

How to run?

Docker

For dockerized version you need to build image first using:

docker build --platform linux/x86_64 -t polkadot-sdk-image:latest .

And than run zombienet instance with:

docker run --platform linux/x86_64 -p 9910-9913:9910-9913 -p 9920-9921:9920-9921 --rm -it polkadot-sdk-image:latest

Local development

Alternatively for local development we recommend download our fork of polkadot-sdk

git clone https://github.com/decenzio/polkadot-sdk.git --branch dev --recurse-submodules

Inside folder binaries download zombienet instance. Then add execution rights:

cd binaries
chmod +x ./zombienet

Then you need to build relay node:

cargo b -r -p polkadot

And parachain template:

cargo build --release -p parachain-template-node

After that we can launch nodes with zombienet:

cd binaries
./zombienet -p native -c 1 spawn config.toml

App interaction

For now, you can interact with the pallet using the following link: Polkadot.js Explorer. Later, interaction through a web app will also be possible.

Testing

Manual

Manual testing can currently be performed by directly calling pallet methods following the procedure outlined in the App Interaction section.

Here is an example of the basic flow:

  1. Call create to create an NFTAA collection (similar to creating a standard NFT collection).
  2. Mint an NFTAA using the mint function (similar to minting a standard NFT).
  3. Find the address of the created NFTAA in the event list.
  4. Using the same account as the NFTAA owner, use proxy_call to perform actions via the new NFTAA. For example, you can call system remark.
  5. Change to a random account (one that is not the NFTAA owner) and try step 4 again. You should encounter an error.
  6. Transfer the NFTAA via transfer (similar to transferring a standard NFT) to a new account. Then try step 4 from the old account; you should encounter an error.
  7. Switch to the new owner of the NFTAA and retry step 4. This should work without any errors.

Run Automatic Tests

image

To run automatic tests, follow these steps:

  1. Check your Rust version:

    rustc --version           
    rustc 1.84.0 (9fc6b4312 2025-01-07)
  2. Clone our polkadot-sdk fork along with its submodules:

    git clone https://github.com/decenzio/polkadot-sdk.git --branch dev --recurse-submodules
  3. Navigate to the polkadot-sdk folder and run:

    cargo test -p pallet-nftaa

In case of problems, check the Rust version (point 0.) and use the following commands to update if necessary:

rustup default stable
rustup update
rustup target add wasm32-unknown-unknown
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly

About

All related to NFTAA on the Polkadot W3F proposal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 100.0%