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

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?

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.)

Related

Attempting to build a custom terraform provider, encountering errors with the helpers/schema module

I'll start off by saying I'm completely new to Go and having a lot of trouble figuring out its environment.
I'm attempting to make a custom terraform provider by following the instructions in this guide.
When attemping to run go mod tidy after setting up the project files, it is unable to pull in the required modules. This is the error I get:
github.com/hashicorp/terraform/terraform: module github.com/hashicorp/terraform#latest found (v.1.3.2), but does not contain package github.com/hashicorp/terraform/terraform
I get this same error for pretty much all the requirements.
Can someone ELI5 how I'm supposed to setup my Go environment so that I can write a custom tf provider? Thanks.
The guide you are following is terribly outdated (from 2014). Since it was written, they reorganized plugin SDK several times, slightly newer is I believe terraform-plugin-sdk which I don't recommend learning at all. Latest and recommended SDK is called terraform-plugin-framework.
Up to date documentation with examples is here: Implement a Provider with the Terraform Plugin Framework. It will walk you trough environment setup and bootstrapping a new custom provider.

Hyperledger composer generator: Trying to copy from a source that doesn't exist (no concepts support for Angular)

I have a composer-rest-server running on localhost:3000. To go with that, I tried to generate an Angular 2 app using yo hyperledger-composer. My business network models also have a abstract concept Spray{...} present.
I believe the documentation is outdated as I was presented with slightly different options than on the documentation. After choosing Angular and following through the steps, I got an
AssertionError: Trying to copy from source that does not exist ... /concept/concept.component.ts
Based on some quick google searches, I was able to find this issue on their Github - https://github.com/hyperledger/composer/issues/3927 however in my case, I am not even able to build the Angular app so I don't even get to the compilation stage.
Is there any way to build the app right now where it's at?
I've created a Github issue explaining steps to reproduce this and also included a hacky fix which is to comment out the lines in the generator code which copy over the concept files.
Link - https://github.com/hyperledger/composer/issues/4328

Why IntelliJ Idea cannot find location of GO SDK?

I downloaded go1.4.darwin-amd64-osx10.8.tar.gz and extract it on my local directory.
Based on what Installing to a custom location says I added GOROOT in env variable.
Based on what Test your installation says I created a go file.
I finally ran it and I got expected result as following screenshot.
I actually have IntelliJ v.14 however, based on this article I installed Go Language (golang.org) version 0.9.15.3 in my IntelliJ Idea.
I created a Go project and during creation it asked me to add GO SDK. I gave it ~/Desktop/go/sdk however it wasn't able to recognise it. I got this error in Event Log:
14:03:02 IllegalArgumentException: Argument for #NotNull parameter
'virtualFile' of
com/intellij/openapi/projectRoots/impl/ProjectRootContainerImpl.addRoot
must not be null
Any idea how IntelliJ Idea is able to recognize it would be appreciated. Thanks.
Please consider using one of the alpha releases for 0.9.16. I believe that alpha7 could be the more stable one rather than alpha9. You can get them from GitHub releases
The v1.0.0-alpha0 branch is, as the name implies, an alpha release and it's in the early stages of development, that's why there's no release done yet for it as well.
P.S. I'm one of the contributors to the plugin.
Does not allow to use SDK placed in /usr/local/go (perfectly valid and recent SDK) under Mac Yosemite.
Google App Engine does not recognise last valid GAE GO SDK either.
~Desktop/go/sdk doesn't seems a valid path (as it refers to the homedir of the 'Desktop' user): ~/Desktop/go/sdk should work better.
As long as you see in that ~/Desktop/go/sdk folders the subfolders 'api', 'bin', 'blog', ..., that should be the right one for the GO SDK expected by the "golang support plugin".
Some issues exist with that plugin and IntelliJ 14: issues 1169, PR 1172 (fixed for for 1.0.0-alpha).
The other approach is to recompile and install that plugin.
The end result of specifying the Go SDK path should look like:

Getting prototypejs into the bower registry

I am trying to move some code into a bower package, and my code depends on prototypejs. Prototypejs is not in the bower registry (or it wasn't-- actually I just added it incorrectly, so this question is a bit like asking how to avoid spilling milk after it is already running off the table). What is the proper way to go about getting it there?
I thought I could just point the registry to the prototypejs repo on github, but that resulted in a checkout of files which did not include a built prototype.js file, and it seems it can't be built with the latest version of ruby/rake. So, one option would be to create a new github repo with the built version (downloaded from the website) and a bower.json file. Development on prototypejs seems to have stalled (according to github), so it is unlikely the author(s) would be doing that anytime soon.
DISCLAIMER
I'm beating my own drum but this should help
My PrototypeJS repo has updates in it as well as can be built using grunt and has the actual finished build files in it. Please take a look and see if it works for you.
https://github.com/jwestbrook/prototype
I would create a repo with as you suggested for now, but still try to submit a PR on the upstream repo.

Tutorial on GIT with Xcode

I'm trying to understand how to use GIT with Xcode 4.2.
I haven't been using GIT actively, but while I was walking through a couple of git operations mentioned in this link it appears that I have a single repository with many projects in it and a recent project in a repository all by itself.
I want to carefully take the project I am currently working on and put it into its own repository so I can safely leverage some of the branching capabilities.
I'm hesitant to begin until I have a better understanding of what's going on. I'd like to know how much is handled within Xcode and what I have to do at the command line.
#manojids comment to learn a source control system (like git) outside of a specific editors integration is a good point. Try to understand the source control system. The integration is a convenience, not a crutch.
Outside of that advice, apple has some docs outlining specifics of how XCode works with git. Here's the link:
http://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/SCM/SCM.html
A good online resource is the pro git book available here:
http://git-scm.com/book
If you want to learn and understand Git and its concepts in detail then this book would be best for you here is the link.
Or you can have a drill on it practically if you follow this tutorial.
I hope you will get help.

Resources