Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: pallet-proxy introduction #346

Merged
merged 7 commits into from
May 30, 2023
Merged

docs: pallet-proxy introduction #346

merged 7 commits into from
May 30, 2023

Conversation

gitofdeepanshu
Copy link
Contributor

Pull Request Summary

This PR contains docs regarding pallet-proxy: proxytypes, extrinsics, storage method and constants.

@gitofdeepanshu gitofdeepanshu added the documentation Improvements or additions to documentation label May 11, 2023
@github-actions
Copy link

github-actions bot commented May 11, 2023

Visit the preview URL for this PR (updated for commit 4cf142f):

https://astar-docs--pr346-pallet-proxy-intro-zut1mz6q.web.app

(expires Mon, 05 Jun 2023 08:52:19 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f2f13e9b593d211faae6343d67a88fac3fd7268d


* **announcements**(AccountId20) - retrieves all announcements made by the specified proxy account.

* **palletVersion**() - retrieves the current version of the pallet.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem relevant for this docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed.

Comment on lines 65 to 79
**Constants**
---
The proxy pallet provides the following read-only functions to retrieve pallet constants:

* **announcementDepositBase()** - retrieves the base amount of currency required to reserve when creating an announcement.

* **announcementDepositFactor()** - retrieves the amount of currency required per announcement made.

* **maxPending()** - retrieves the maximum number of time-delayed announcements allowed to be pending.

* **maxProxies()** - retrieves the maximum number of proxies permitted for a single account.

* **proxyDepositBase()** - retrieves the base amount of currency required to reserve when creating a proxy.

* **proxyDepositFactor()** - retrieves the amount of currency required per proxy added.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to cover these, I'd suggest putting info inside a table with a short explanation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure.

@@ -0,0 +1,79 @@
---
sidebar_position: 16
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall impression is that you have the text to explain features on a high level, but I'm not sure if this would be sufficient for user to start using proxies.

Some thing should be explained in more depth, and some things should be better visualized.
Comparing it to Polkadot's doc or Moonbeam's doc we are lacking.

You can provide links to the official Polkadot docs to supplement info provided on this page (e.g. for pure proxies).

The guideline should be - if user comes to this page, reads it - will they need to google proxy accounts again and go read about them on Polkadot's or Moonbeam's page, or is the info here sufficient?

@gitofdeepanshu gitofdeepanshu marked this pull request as ready for review May 22, 2023 09:41
@gitofdeepanshu gitofdeepanshu requested a review from a team May 22, 2023 09:41
@gitofdeepanshu gitofdeepanshu requested a review from a team as a code owner May 22, 2023 09:41
Copy link
Member

@Dinonard Dinonard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much better than before! Good work!

6. **CancelProxy** - This proxy type allows delegate account to to reject and remove any announced proxy calls.

7. **DappsStaking** - This proxy type allows delegate account to perform DappStaking related transactions such as register, unregister contracts, claim rewards etc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the dApp staking reward?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot about that, will update.


| Constant | Description |
|--------------------------|--------------------------------------------------------------------------------------------------------------|
| announcementDepositBase | Retrieves the base amount of currency required to reserve when creating an announcement. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange choice of words with Retrieves. 🤔


**Why Proxy Deposits ?**
---
To create proxies within the network, it is necessary to provide deposits in the native currency (like ASTR or SHD). The deposit is required because adding a proxy requires some storage space on-chain, which must be replicated across every peer in the network. Due to the costly nature of this, these functions could open up the network to a Denial-of-Service attack
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHD -> SDN

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad.
will update.


**Why use Proxy?**
---
Pallet Proxy enables accounts to grant specific permissions to other accounts, empowering them to make calls on their behalf, thereby safeguarding the security of the underlying accounts.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add an introduction block of anonymous (= pure) proxy?
This is for sure more dangerous for non experimented users but it's also the best security since it's the only way to have a proxy that can't be controlled from private keys.
https://wiki.polkadot.network/docs/learn-proxies#anonymous-proxy-pure-proxy

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do.


![38](img/38.png)

Congratulations! You've completed the entire process successfully. You have created a proxy account, reviewed all the proxy accounts linked to your primary account, performed a proxy transaction, and even removed a proxy account. Well done!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: add this video as external resource that covers pure proxy from use case
https://youtu.be/MqY6yU-YLO0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the suggestion.

docs/user-guides/pallet-proxy.md Outdated Show resolved Hide resolved
docs/user-guides/pallet-proxy.md Outdated Show resolved Hide resolved
docs/user-guides/pallet-proxy.md Outdated Show resolved Hide resolved
@midegdugarova midegdugarova self-requested a review May 29, 2023 08:45
Co-authored-by: midegdugarova <59020389+midegdugarova@users.noreply.github.com>
@gitofdeepanshu gitofdeepanshu merged commit 6a7624f into main May 30, 2023
3 checks passed
@gitofdeepanshu gitofdeepanshu deleted the pallet-proxy-intro branch May 30, 2023 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants