Returned accounts returned by Sorana: Step -by -step Guide

Solana: What to do with recovered account from failed deployment / deployment 2nd signer?

As a programmer of Soran, you will probably encounter scenarios that fails to arrange your anchor, which has led to a middle account or lost. Fortunately, the “Solan -Keygen” tool provided an effective solution for returning the returned accounts.

In this article, we will go through the return of the returned account from the failed implementation and use it as another signator.

Step 1: Return of the seed keyboard

First, you need to restore the keyboard of the phrase seed used for original implementation. You can use the “Sorana -Keygen” tool with the following command:

`Bash

Solana -kegen Recovery -o Recovery.Json

`

ReplaceThe path restored on the track.

Step 2: Returning the short keyboard

Then you need to return the keyboard with a short time from the intermediate account. The short -term keyboard is a random key used to sign an event and interact with the Soran network.

To re -use the "Sorana -Keygen" tool to return a short keyboard:

Bash

Sorana -kegen Recovery -o Recovery.json

`

ReplaceThe path renewed on the seed file.

Step 3: Re -Trexue Renewed Keyboard

Now that you have both seeds and short -term keyboards, you can reuse them as other signatories to arrange anchor.

Create a new script implementation that uses these keyboard:

Python

Solan.publiscy impy pubKey

Brings Soran

Def Main ():

Download the seeds from the file

Open (‘Returned_sephrases_file.json’) as F:

Returned_sephrases = json.load (f)

Create a new set of commands for implementation that uses a short -term keyboard as another signatory

Program_id = ‘Your_program_id’

Account_keyid = PubKey.from_secret_Key (returned_sephrases [‘second_signer’] [‘secret’]))

ARGS = {

“Program_id”: Program_id,

“Accounts”: [

(Account_keyid, 0),

(Returned_sephrasit [‘seed_frase’], 1)

Iche

Fill in the set of commands to release

Print (F “Implementation {Program_id} with seed phrase: {Return_sephrasit [‘seed_phrase’]} and short -Termoena keyboard: {Return_sephsit [‘second_signer’] [‘Public_key’]}”)

`

Replaceyour_Program_idwith your real soran ID.

Example of use

Here's an example of how to use this script to let go into work to introduce anchors:

Yaml

Version: '3'

Services:

Start:

Photo: $ picture_name

Volumes:

-.:/Application

Command: SH -C "$ Shell Ript/Deploment.sh"

`

This will introduce a program with a seed phrase and returned the short -term keyboard.

Conclusion

Returning a returned account in Solana can be an effective way to return anchor access. Following these steps, you can use renewed seeds and short -term keyboards as other signature signs, ensuring that your program remains safe and functional.