[go: up one dir, main page]

Etherlink: Scenario 2 - ERC-721 (token)

Context

The live-testing-protocols external repository answers the following task of the End-to-end, real world scenarios project:

Scenario 2: ERC-721 (token)

  • Basic scenario for using the ERC-721 token: NFT (Non-Fungible Token).

The code for the scenario can be found in 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.

As files are kept on a separate repository, we are not putting too many efforts on reviewing code quality. Reviews should focus more on whether the scenario covers interactions between ERC-721 standard and Etherlink.

Manually testing the MR

Follow these instructions specialized with the ERC-721 test.

  • Local: npx hardhat test test/ERC721/BasicNFT.ts.
  • Ghostnet: npx hardhat test --network etherlink test/ERC721/BasicNFT.ts.

The test should go through, even if the interaction actually fails because of some issues in Etherlink, not the scenario. (Fixing Etherlink would be the purpose of the next task.)

Checklist

  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Camille Bouzerand

Merge request reports

Loading