Currency in the SDK
About ETH と MATIC
Regular shops do transactional process through currency such as ETH, which is processed in units of ether. (Just like a dollar)
For ETH, wei is the smallest amount of ETH that is calculatable.
1ether === 1000000000000000000wei
ETH in SDK
In the SDK, the ether unit is assigned to the number type.
In some parts, it is assigned as a BigNumber as wei causes overflow in some environments when assigned as number.
As a utility, the SDK provides ways to interchangably go from BigNumber to ether.
SDK.formatEtherformats aBigNumberto an ether unit, which is returned as astring.SDK.parseEtherformats astringas an ether unit, which is returned as a wei in theBigNumberformat.
Rinkeby 用の ETH の入手方法
テスト環境で使える ETH の入手方法は以下の通り
- Take note of the wallet address
- https://faucet.rinkeby.io/ のサイトにアクセス
- Tweet リンクをクリック
0x0000.....部分を 1 でメモしたアドレスに置換する- Tweet
- Add the Tweet URL to the input . Tweet の URL をコピーしサイトの Input に貼り付ける
- Press on the "Give me Ether" button.
- In due time, the amount will be deposited
Mumbai 用の MATIC の入手方法
テスト環境で使える MATIC の入手方法は以下の通り
- Take note of the wallet address
- https://faucet.matic.network/ のサイトにアクセス
Mumbaiを選択- ウォレットアドレスを入力し Submit ボタンを押す
- In due time, the amount will be deposited