0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

solanaで独自トークンを発行しSerumに上場させてみた

Posted at

基本的に参考したのはこのサイト
https://www.zappycode.com/tutorials/create-your-own-token-and-nft-on-solana

まず、Solana ToolSuiteでインストール、もしくは、v1.7.11なら以下のコマンドからインストール。(macOSでやってます)

sh -c "$(curl -sSfL https://release.solana.com/v1.7.11/install)"

インストールが完了しPATHも通したら、PC上の適当な場所にウォレットの秘密鍵を入れたフォルダを作成して、コマンドを実行しウォレットを作成する。

cd Desktop
mkdir SolanaWallet
solana-keygen new --outfile SolanaWallet/my-keypair.json

作成後に表示されるpubkeyが公開鍵。(以下、YOUR_ADDRESSの部分はそれをコピペする)

以下のコマンドで、1SOLのエアドロップを要求して獲得することができるのでトークン発行用に獲得しておく。

solana airdrop 1 YOUR_ADDRESS --url https://api.devnet.solana.com

ただ、上の記事では、
RPC URL: https://devnet.solana.com に設定すると書いてあるが、そうすると以下のようなエラーが出る。

error sending request for url (https://devnet.solana.com/): error trying to connect: invalid certificate: CertExpired

https://api.devnet.solana.com
にすると、無事先に進める。
設定のコマンドは以下。

solana config set --url https://api.devnet.solana.com

Screen Shot 2021-09-03 at 3.18.05.png

送金コマンド(50トークン送金する場合。前者のアドレスがトークンのアドレス、後者が送信先の公開鍵)

spl-token transfer E8aVZ4RvVZHHFAaqdNjUNudkqZuaGxQNDeWGbbZx99Hf 50 8tpnnn9gkQxit4zzE7CNQg8nDKaoEWUk7GuznTFjMyFT

ミントを今後禁止にするコマンド

spl-token authorize token_address mint --disable
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?