分类 Solana 下的文章

Octane 是 Solana 的无 gas 交易中继器


什么是 Octane?

Octane 是 Solana 的无 gas 交易中继器。Octane 通过 HTTP API 接受交易,如果交易满足某些条件,则对其进行签名并广播到网络。

它旨在让任何人都能够作为无服务器 Node.js API 函数集合在 Vercel 上免费运行。

Solana 上的交易费用非常便宜,但用户仍然需要 SOL 来支付,而且他们通常不知道(或忘记)这一点。

github: https://github.com/anza-xyz/octane
demo: https://github.com/sevazhidkov/octane-demo


Solana CLI工具使用


安装CLI

sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
downloading stable installer
  stable commit 20a8749 initialized
Adding
export PATH="/home/surou/.local/share/solana/install/active_release/bin:$PATH" to /home/surou/.profile

根据返回信息,添加path

export PATH="/home/surou/.local/share/solana/install/active_release/bin:$PATH" to /home/surou/.profile

测试查看版本

solana --version

创建钱包

solana-keygen new
Generating a new keypair

For added security, enter a BIP39 passphrase

NOTE! This passphrase improves security of the recovery seed phrase NOT the
keypair file itself, which is stored as insecure plain text

BIP39 Passphrase (empty for none):

Wrote new keypair to /home/surou/.config/solana/id.json
=================================================================================
pubkey: Aq46qVyLKFWWCCu7EpSfmMQ5YEYH31o78UJFqPmTDwvF
=================================================================================
Save this seed phrase and your BIP39 passphrase to recover your new keypair:
tourist useful danger situate sadness sentence answer know guilt paper merry draw
=================================================================================

为Aq46qVyLKFWWCCu7EpSfmMQ5YEYH31o78UJFqPmTDwvF当前钱包地址转一些SOL
当前keypair路径为:/home/surou/.config/solana/id.json

测试转账

solana transfer --from /home/surou/.config/solana/id.json FwybPcg9rMjYcyM5kJSzeDrdtTebch6WdV7k1vzCC6Wq 0.5 --allow-unfunded-recipient --url https://api.devnet.solana.io --fee-payer /home/surou/.config/solana/id.json