Following instructions from https://docs.solana.com/cli/install-solana-cli-tools#build-from-source.
- rust toolchain
- >8GB disk space
# float_to_atomics(39.8319163, 9) = '39831916300' | |
# Does not handle integers e.g. 5000 | |
def float_to_atomics(n, atomics=9): | |
[w, d] = str(n).split(".") | |
if len(d) > atomics: | |
raise f"{n} atomics > {atomics}" | |
return "".join([w, d.ljust(atomics, '0')]) |
import base58 | |
import base64 | |
B64 = "<BASE64-STRING-TO-CONVERT>" | |
base58.b58encode(base64.b64decode(B64)) |
''' | |
Tested with: | |
- solana==0.34.3 | |
- solders==0.21.0 | |
Pre-requisites: | |
- grind out desired pubkey with base set to BASE and owner set to tokenkeg program | |
using a tool like https://github.com/cavemanloverboy/vanity | |
- set PAYER const to path to signing keypair file | |
- set BASE const to path to signing keypair file that the pubkey is derived from | |
- set MINT to desired pubkey and SEED to found seed |
import { type TransactionInstruction } from "@solana/web3.js"; | |
import { serializeInstructionToBase64 } from "@solana/spl-governance"; | |
const IX: TransactionInstruction = ...; // TODO by user | |
console.log(serializeInstructionToBase64(IX)); |
Following instructions from https://docs.solana.com/cli/install-solana-cli-tools#build-from-source.
Assuming you've installed git with default settings on Windows 10, and you have your ssh keys in ~/.ssh
(where ~
expands to something like C:/Users/user
) as something like id_rsa
and id_rsa.pub
, you'll be unable to use the git bash to clone repos with git clone [email protected]:user/project.git
. The git bash will always output some error log like
Cloning into 'project'...
\302\226\302\[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights