ประเภทหนัง
ตัวอย่างหนัง Solana: How to specify PDA owned by different program in anchor?
I can provide an article about specifying the PDA (the title of a program demon), which is owned by various anchoring programs.
Title: How to determine the PDA that is owned by various anchor programs
Introduction:
Anchor, the popular decentralized stock exchange (DEX), allows users to keep multiple devices and treat them in various portfolios. When defining the route of the Demon (PDA) program, which is owned by various programs, it can become complicated. In this article we translate you to anchor.
Step 1: Create a PDA account
To determine the PDA owned by various programs, you must first create an anchor PDA account. So it is:
- Login to your anchor account.
- Click the “Pallete” tab and select “Create Wallet”.
- Select “PDA” as a portfolio type and click “Create”.
- Complete the necessary information including:
* Account name
* Programmag (ie the titles of the programs that own your wealth)
- Click to create a PDA to create a new PDA account.
Step 2: Add programs to your PDA account
Once you have created your PDA account, you need to add the programs to which your wealth has. So it is:
- Enter the anchor portfolio.
- Select the PDA account you created.
- Click the “Programs” tab and select “Add Program”.
- Enter the cores of the program for all devices you want to handle (such as SOL, SPL).
- Repeat this process for each device you want to handle.
Step 3: Protein the PDA that is owned by different programs
Now that you have added programs to your PDA account, you can show which PDA you have and which tools have:
- Enter the anchor portfolio.
- Select the PDA account you created.
- Click the “Programs” tab and select “Manage”.
- In the “PDA” section, click the “Edit PDA” button.
- Add all devices as a tool as a separate shot in the “Action” field, determining which program holds it (for example, Sol: My_fst_seed, SPL: My_Snd_seed).
- Repeat this process for each device you want to handle.
Step 4: Check your property for PDA -N
Finally, check that the PDA property is correct by checking the “PDA” tab of each account:
- Enter the anchor portfolio.
- Select the PDA account you created.
- Click the “Programs” tab and select “Manage”.
- According to the “PDA” section, make sure that each device is properly mapped to your relevant program.
Conclusion:
Mark that PDAs owned by various anchor programs may seem complicated, but these steps must be capable of this. Be sure to add programs to your PDA account and indicate which PDA you have for accurate device management in multiple portfolios.