现实生活中,有人追求手机号“111111”,而在区块链中,大家也追求“靓号地址”。靓号地址(Vanity Address)指的是包含特定字符或字符序列的加密货币地址,这些地址通常具有某种特殊的含义或美观性。
JPv1rCqrhagNNmJVM5J1he7msQ5ybtvE1nNuHpDHMNU是 https://jetprotocol.io/ 的合约地址。 jpv1
就是一个靓号地址前缀,表示是 jet protocol v1 版本。
如何生成自己的靓号地址呢?solana 很贴心,已经为我们准备好了工具。
solana cli 安装好后,还会有个 solana-keygen
命令
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
solana -V
solana-keygen -V
生成已 sos 开头的地址
solana-keygen grind --starts-with sos:1
# sosqy9REQD9fjFUwa4VQBYAnSHq6nV6PsiKL9ADD9Ng
生成以 111 结尾的地址
solana-keygen grind --ends-with 111:1
# epkcYU58Bj9so3fh9GpV87fzJRtthFm9vLoTZEbb111
生成以 a 开头,z 结尾的地址
solana-keygen grind --starts-and-ends-with A:Z:1 --ignore-case
# AfwSyFuGd6dQ39y1T9cpqseZfBSSAV39i8P76tG2bThz
还有更复杂的命令
solana-keygen grind --starts-and-ends-with A:M:1 --ignore-case --use-mnemonic --word-count 12 --language english --no-outfile --no-bip39-passphrase
Searching with 12 threads for:
1 pubkey that starts with 'a' and ends with 'm'
================================================================================
Found matching key AYgp1PVZ8BavYqQYuKqC6VP44RgHCzeKn2AwTFKpi6Hm
Save this seed phrase to recover your new keypair:
afraid glove catalog lens cattle garbage perfect dignity happy curve flip address
================================================================================
如果你的靓号太苛刻,则需要大量的计算时间
solana-keygen grind --starts-with 1111:1
Searching with 12 threads for:
1 pubkey that starts with '1111' and ends with ''
Searched 1000000 keypairs in 3s. 0 matches found.
Searched 2000000 keypairs in 7s. 0 matches found.
Searched 3000000 keypairs in 11s. 0 matches found.
Searched 4000000 keypairs in 16s. 0 matches found.
Searched 5000000 keypairs in 20s. 0 matches found.
Searched 6000000 keypairs in 25s. 0 matches found.
Searched 7000000 keypairs in 31s. 0 matches found.
Searched 8000000 keypairs in 36s. 0 matches found.
Searched 9000000 keypairs in 41s. 0 matches found.
Searched 10000000 keypairs in 45s. 0 matches found.
这时候需要使用 GPU 来帮你生成地址,可以参考下面的链接
https://smith-mcf.medium.com/solana-vanity-address-using-gpus-5a68ad94d1d4