Some useful command on spl-token cli



Create token 2022 with enable metadata and transfer hook:
bash
spl-token --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb create-token --transfer-hook 8jrHqruA8nfn6DHdZAbvke8nyEjT5d7DeADwhVonbin --enable-metadata

Create account:

bash

spl-token create-account 4H8juZinep8VM8PJ4aFsedK2WJtwCamGyufxAwiccwCV

Mint token:

bash

spl-token mint 4H8juZinep8VM8PJ4aFsedK2WJtwCamGyufxAwiccwCV 12344321

Initialize metadata:

bash

spl-token initialize-metadata  4H8juZinep8VM8PJ4aFsedK2WJtwCamGyufxAwiccwCV Huan HTT https://raw.githubusercontent.com/solana-developers/opos-asset/main/assets/DeveloperPortal/metadata.json

Update metadata:

bash

spl-token update-metadata 4H8juZinep8VM8PJ4aFsedK2WJtwCamGyufxAwiccwCV name BitcoinSolana   

Display information:

bash
spl-token display 4H8juZinep8VM8PJ4aFsedK2WJtwCamGyufxAwiccwCV 


Note 

Mint address: 4H8juZinep8VM8PJ4aFsedK2WJtwCamGyufxAwiccwCV

Previous Post Next Post