nearprotocolnear

Write an NFT Contract & mint your NFT [Figment.io Learning]


Working through the learning document on figment.io and am wondering what I'm missing. My thought is that the doc here is in need of some updating, but I could be wrong. First, The GitHub repo that we download in this lesson does not have the path /contracts/rust/Cargo.toml. Second, the repo is also missing a package.json which causes the initial attempt at yarn build:rs to fail. Creating a simple package.json like the following:

        {
            "name": "my-supercool-package"
        }

Gets past the error indicating that the package.json cannot be found, but fails with the following:

yarn run v1.22.17
error Command "build:rs" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Is all of this a part of the test or is the doc on figment.io in need of updates?


Solution

  • You are right, the GitHub repo referred to on Figment does not contain the files and folders that you need to follow the tutorial. I'm guessing the original code on the GitHub repo has been updated since. It also looks like the tutorial on Figment is outdated. It refers to the NEP-4 standard

    NEP-4, which is defined in a language-independent way that is more compatible with NEAR.

    However, it is not recommended as it is out of date and does not follow the standards the NEAR SDK has set currently. It's better to follow the NEP-171 standard instead.

    That being said, I think I would follow the instructions on the GitHub repo directly. Maybe use the Figment tutorial as a supplement to understand the general principles (though the standard is different.)