Install SDK
Here, we will explain how to install the library using the SDK of ERC20Basic as an example.
Environmental preparation
To prepare for development with Node.js, create an empty folder and initialize it.
1.Prepare folder for development
Create empty folder
mkdir test-erc20
cd test-erc20
Initialize to use npm. It's okay to have each question skipped with Enter.
npm init
If the package.json file is created, it's successful.
2. Setting npm server of G.U.SDK
Create .npmrc in same directory
echo > .npmrc
echo @gusdk:registry=https://gusdk.gu.net/ >> .npmrc
Using your text editor, write the following in .npmrc and save it.
@gusdk:registry=https://gusdk.gu.net/
At this point, the contents of the directory are as follows.
DIRECTORY ROOT
├── .npmrc
└── package.json
Then execute the following command.
npm install @gusdk/erc20-basic
The erc20-basic library uses ethers.js, which is widely used in Ethereum programming, so install it at the same time.
npm install ethers@v5
Once the installation is complete, proceed to the next step.