1

I was trying to build a NEP141 token with assemblyscript and to deploy it on the Near Network, but, after the deployment, I'm not able to see it on the wallet. I checked my work with the one in this video from the Near YouTube channel and our projects looks similar.

After looking how NEP141 are made with Rust I have 3 questions:

  1. In the Rust SDK, we have a module to define some contract standards (link to near-sdk-rs standars). Do we have something like that for the as-sdk?

  2. In the NEP141 documentation, the types of the variables returned by some methods are not aligned with the types returned in the near-sdk-rs standard. For example, the method ft_balance_of in the Near documentation should return a string variable (documentation link), but in the Rust SDK it returns a U128 (near-rs-sdk link to standards). Which one is the right one? (I guess is the rust one)

  3. Is the near-sdk-as still supported? There are some pull requests open from 2020 and they are still not merged. In particular, I had a problem trying to compile the source code in the Near Youtube Video. The problem would be fixed if this pull request would be merged.

thanks!

Doc_failure
  • 94
  • 1
  • 8
  • AssemblyScript doesn't have U128, so I believe `string` is used to be able to use large "numbers". – John Feb 24 '22 at 11:44
  • I'm not sure about your answer because we don't have U128 in assemblyscript, but we do have u128 in near-sdk-as, so I think it would be better to use that type to be aligned with rs. – Doc_failure Feb 25 '22 at 08:46
  • I can confirm. If you try to implement the NEP141 methods as strings, the near wallet will give you the error: "Error: [big.js] Invalid number". You have to implement those methods as u128/U128. – Doc_failure Feb 25 '22 at 10:54

0 Answers0