Skip to main content

Address Book

If you repeatedly transfer tokens to the same recipients or if you just want to store an arbitrary address for future use, you can use the addressbook command to name the address and store it in your address book. Entries in your address book are behaving similarly to the accounts stored in your wallet, for example when checking the balance of the account or sending tokens to. Of course, you cannot sign any transactions with the address stored in your address book since you do not possess the private key of that account. Both the Oasis native and the Ethereum-compatible addresses can be stored.

info

The name of the address book entry may not clash with any of the account names in your wallet. The Oasis CLI will prevent you from doing so.

Add a New Entry

Use addressbook add <name> <address> to name the address and store it in your address book.

oasis addressbook add mike oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw
oasis addressbook add meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1

Then, you can for example use the entry name in you address book to send the tokens to. In this case, we're sending 2.5 TEST to meghan on Sapphire Testnet:

oasis account transfer 2.5 meghan
You are about to sign the following transaction:
Format: plain
Method: accounts.Transfer
Body:
To: meghan (oasis1qrjzcve7y6qp3nqs3n7ghavw68vkdh3epcv64ega)
Amount: 2.5 ROSE
Authorized signer(s):
1. ArEjDxsPfDvfeLlity4mjGzy8E/nI4umiC8vYQh+eh/c (secp256k1eth)
Nonce: 0
Fee:
Amount: 0.0002316 ROSE
Gas limit: 2316
(gas price: 0.0000001 ROSE per gas unit)

Network: mainnet
ParaTime: emerald
Account: eugene

List Entries

You can list all entries in your address book by invoking addressbook list.

oasis addressbook list
NAME  	ADDRESS                                        
meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1
mike oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw

Show Entry Details

You can check the details such as the native Oasis address of the Ethereum account or simply check, if an entry exists in the address book, by running addressbook show <name>:

oasis addressbook show meghan
Name:             meghan
Ethereum address: 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1
Native address: oasis1qrjzcve7y6qp3nqs3n7ghavw68vkdh3epcv64ega
oasis addressbook show mike
Name:             mike
Native address: oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw

Rename an Entry

You can always rename the entry in your address book by using addressbook rename <old_name> <new_name>:

oasis addressbook list
NAME  	ADDRESS                                        
meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1
mike oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw
oasis addressbook rename mike mark
oasis addressbook list
NAME  	ADDRESS                                        
mark oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw
meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1

Remove an Entry

To delete an entry from your address book invoke addressbook remove <name>.

oasis addressbook list
NAME  	ADDRESS                                        
meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1
mike oasis1qrtrpg56l6y2cfudwtgfuxmq5e5cyhffcsfpdqvw
oasis addressbook remove mike
oasis addressbook list
NAME  	ADDRESS                                    
meghan 0xBe8B38ED9b0794e7ab9EbEfC1e710b4F4EC6F6C1