From 3c0d3802108f49f1527aaa666fdd4629d5e23ff6 Mon Sep 17 00:00:00 2001 From: pecornilleau Date: Fri, 26 Jan 2024 16:00:07 +0100 Subject: [PATCH] Etherlink: doc: scenario 2 (NFT) --- etherlink/E2E_SCENARIOS.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/etherlink/E2E_SCENARIOS.md b/etherlink/E2E_SCENARIOS.md index 3580cdc1f56f..edc3ad89053e 100644 --- a/etherlink/E2E_SCENARIOS.md +++ b/etherlink/E2E_SCENARIOS.md @@ -38,6 +38,29 @@ Follow [these instructions](https://github.com/trilitech/live-testing-protocols/ ## Scenario 2: ERC-721 (NFT) +Basic scenario for using the ERC-721 token: NFT (Non-Fungible Token). + +The code for the scenario can be found in [BasicNFT.sol](https://github.com/trilitech/live-testing-protocols/blob/main/contracts/ERC721/BasicNFT.sol). + +### Actions + +1. Owner can create a token + * The creation event is emitted + * The owner balance is increased +2. Owner can transfer a token + * The transfer event is emitted + * The receiver balance is increased + * The sender balance is decreased + +The code for the actions can be found in [BasicNFT.ts](https://github.com/trilitech/live-testing-protocols/blob/main/test/ERC721/BasicNFT.ts). + +### Testing + +Follow [these instructions](https://github.com/trilitech/live-testing-protocols/tree/main#tests) specialized with the ERC-721 test. + +* Local: `npx hardhat test test/ERC721/BasicNFT.ts`. +* Ghostnet: `npx hardhat test --network etherlink test/ERC721/BasicNFT.ts`. + ## Scenario 3: ERC-1967 (transparent proxy pattern) ## Scenario 4: conventional NFT dApp -- GitLab