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.
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
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
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.
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:
- Call
create
to create an NFTAA collection (similar to creating a standard NFT collection). - Mint an NFTAA using the
mint
function (similar to minting a standard NFT). - Find the address of the created NFTAA in the event list.
- Using the same account as the NFTAA owner, use
proxy_call
to perform actions via the new NFTAA. For example, you can callsystem remark
. - Change to a random account (one that is not the NFTAA owner) and try step 4 again. You should encounter an error.
- 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. - Switch to the new owner of the NFTAA and retry step 4. This should work without any errors.
To run automatic tests, follow these steps:
-
Check your Rust version:
rustc --version rustc 1.84.0 (9fc6b4312 2025-01-07)
-
Clone our
polkadot-sdk
fork along with its submodules:git clone https://github.com/decenzio/polkadot-sdk.git --branch dev --recurse-submodules
-
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