diff --git a/404.html b/404.html index 2984e5c7e4f7..c4f76631ab3e 100644 --- a/404.html +++ b/404.html @@ -21,8 +21,8 @@ - - + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

diff --git a/assets/js/06597bc8.869a1d13.js b/assets/js/06597bc8.869a1d13.js new file mode 100644 index 000000000000..7e3ce78e59cf --- /dev/null +++ b/assets/js/06597bc8.869a1d13.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6417],{52877:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var o=n(74848),a=n(28453),s=n(67141);const i={id:"learn-treasury",title:"Governance v1 Treasury",sidebar_label:"Gov1 Treasury",description:"The Polkadot's On-chain Treasury during Gov1.",keywords:["treasury","funds","funding","tips","tipping"],slug:"../learn-treasury"},r=void 0,l={id:"learn/archive/learn-treasury",title:"Governance v1 Treasury",description:"The Polkadot's On-chain Treasury during Gov1.",source:"@site/../docs/learn/archive/learn-treasury.md",sourceDirName:"learn/archive",slug:"/learn/learn-treasury",permalink:"/docs/learn/learn-treasury",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-treasury.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-treasury",title:"Governance v1 Treasury",sidebar_label:"Gov1 Treasury",description:"The Polkadot's On-chain Treasury during Gov1.",keywords:["treasury","funds","funding","tips","tipping"],slug:"../learn-treasury"},sidebar:"docs",previous:{title:"Governance V1",permalink:"/docs/learn/learn-governance"},next:{title:"Polkadot Launch Phases",permalink:"/docs/learn/learn-launch"}},h={},d=[{value:"Funding the Treasury",id:"funding-the-treasury",level:2},{value:"Tipping",id:"tipping",level:2},{value:"Example",id:"example",level:3},{value:"Bounties Spending",id:"bounties-spending",level:2},{value:"Creating a Bounty Proposal",id:"creating-a-bounty-proposal",level:3},{value:"Closing a bounty",id:"closing-a-bounty",level:3},{value:"FAQ",id:"faq",level:2},{value:"What prevents the Treasury from being captured by a majority of the Council?",id:"what-prevents-the-treasury-from-being-captured-by-a-majority-of-the-council",level:3},{value:"Further Reading",id:"further-reading",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{message:"The content on this page is archived. For up-to-date information about treasury, see the\n[Polkadot OpenGov Treasury page](../learn-polkadot-opengov-treasury)."}),"\n",(0,o.jsxs)(t.p,{children:["The Treasury is a pot of funds collected through a portion of block production rewards,\n",(0,o.jsx)(t.a,{href:"/docs/learn-transactions#transaction-fees",children:"transaction fees"}),", ",(0,o.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashing"}),",\n",(0,o.jsx)(t.a,{href:"/docs/learn-staking#inflation",children:"staking inefficiencies"}),", etc."]}),"\n",(0,o.jsxs)(t.p,{children:["The Treasury funds are held in a ",(0,o.jsx)(t.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"})," not\naccessible by anyone; only the system internal logic can access it. Funds can be spent by making a\nspending proposal that, if approved by the ",(0,o.jsx)(t.a,{href:"/docs/learn/learn-governance#council",children:"Council"}),", will enter a\nwaiting period before distribution. This waiting period is known as the\n",(0,o.jsx)(t.a,{href:"/docs/chain-state-values#treasury-spending-period",children:(0,o.jsx)(t.em,{children:"spend period"})}),", and its duration is\nsubject to ",(0,o.jsx)(t.a,{href:"/docs/learn/learn-governance",children:"governance"}),". The Treasury attempts to spend as many proposals in\nthe queue as it can without running out of funds."]}),"\n",(0,o.jsx)(t.p,{children:"Treasury payout is an automatic process:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"If the Treasury funds run out with approved proposals left to fund, those proposals are kept in\nthe approved queue, and will receive funding in the following spend period."}),"\n",(0,o.jsxs)(t.li,{children:["If the Treasury ends a spend period without spending all of its funds, it suffers a burn of\n",(0,o.jsx)(t.a,{href:"/docs/chain-state-values#treasury-burn-factor",children:"a percentage of its funds"})," - thereby\ncausing deflationary pressure. This encourages the spending of the funds in the Treasury by\nPolkadot's governance system."]}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"When a stakeholder wishes to propose a spend from the Treasury, they must reserve a deposit of at\nleast 5% of the proposed spend (see below for variations). This deposit will be slashed if the\nproposal is rejected, and returned if it is accepted."}),"\n",(0,o.jsx)(t.p,{children:"Proposals may consist of (but are not limited to):"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Infrastructure deployment and continued operation."}),"\n",(0,o.jsx)(t.li,{children:"Network security operations (monitoring services, continuous auditing)."}),"\n",(0,o.jsx)(t.li,{children:"Ecosystem provisions (collaborations with friendly chains)."}),"\n",(0,o.jsx)(t.li,{children:"Marketing activities (advertising, paid features, collaborations)."}),"\n",(0,o.jsx)(t.li,{children:"Community events and outreach (meetups, pizza parties, hackerspaces)."}),"\n",(0,o.jsx)(t.li,{children:"Software development (wallets and wallet integration, clients and client upgrades)."}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.a,{href:"learn-governance#council",children:"Council"})," governs the Treasury and how the funds are spent is up to\ntheir judgment."]}),"\n",(0,o.jsx)(t.admonition,{type:"caution",children:(0,o.jsx)(t.p,{children:"The Council does not approve or deny Treasury Proposals based on the available funds. Proposals are\nnot approved just because there are funds ready to spend but are subject to a burn."})}),"\n",(0,o.jsx)(t.h2,{id:"funding-the-treasury",children:"Funding the Treasury"}),"\n",(0,o.jsxs)(t.p,{children:["For more information about how the Polkadot Treasury is funded, see the\n",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury#treasury-inflow-and-outflow",children:"treasury page"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"tipping",children:"Tipping"}),"\n",(0,o.jsx)(t.p,{children:"Next to the proposals process, a separate system for making tips exists for the Treasury. Tips can\nbe suggested by anyone and are supported by members of the Council. Tips do not have any definite\nvalue, and the final value of the tip is decided based on the median of all tips issued by the\ntippers."}),"\n",(0,o.jsx)(t.p,{children:"Currently, the tippers are the same as the members of the Council. However, being a tipper is not\nthe direct responsibility of the Council, and at some point the Council and the tippers may be\ndifferent groups of accounts."}),"\n",(0,o.jsxs)(t.p,{children:["A tip will enter a closing phase when more than a half plus one of the tipping group have endorsed a\ntip. During that time frame, the other members of the tipping group can still issue their tips, but\ndo not have to. Once the window closes, anyone can call the ",(0,o.jsx)(t.code,{children:"close_tip"})," extrinsic, and the tip will\nbe paid out."]}),"\n",(0,o.jsx)(t.p,{children:"There are two types of tips:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"public: A small bond is required to place them. This bond depends on the tip message length, and a\nfixed bond constant defined on chain, currently 1 DOT (0.166 KSM on Kusama). Public tips carry a\nfinder's fee of 20% (same on Polkadot and Kusama) which is paid out from the total amount."}),"\n",(0,o.jsx)(t.li,{children:"tipper-initiated: Tips that a Council member published, do not have a finder's fee or a bond."}),"\n"]}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["For information about how to submit a tip from the Treasury you can read\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181971",children:"this support article"}),"."]})}),"\n",(0,o.jsx)(t.p,{children:"To better understand the process a tip goes through until it is paid out, let's consider the example\nbelow."}),"\n",(0,o.jsx)(t.h3,{id:"example",children:"Example"}),"\n",(0,o.jsx)(t.p,{children:"Bob has done something great for Polkadot. Alice has noticed this and decides to report Bob as\ndeserving a tip from the Treasury. The Council is composed of three members Charlie, Dave, and Eve."}),"\n",(0,o.jsxs)(t.p,{children:["Alice begins the process by issuing the ",(0,o.jsx)(t.code,{children:"report_awesome"})," extrinsic. This extrinsic requires two\narguments, a reason and the beneficiary. Alice submits Bob's address with the reason being a UTF-8\nencoded URL to a post on ",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io",children:"Polkassembly"})," that explains her\nreasoning for why Bob deserves the tip."]}),"\n",(0,o.jsx)(t.p,{children:"As mentioned above, Alice must also lock up a deposit for making this report. The deposit is the\nbase deposit as set in the chain's parameter list, plus the additional deposit per byte contained in\nthe reason. This is why Alice submitted a URL as the reason instead of the explanation directly: it\nwas cheaper for her to do so. For her trouble, Alice is able to claim the eventual finder's fee if\nthe tip is approved by the tippers."}),"\n",(0,o.jsx)(t.p,{children:"Since the tipper group is the same as the Council, the Council must now collectively (but also\nindependently) decide on the value of the tip that Bob deserves. Charlie, Dave, and Eve all review\nthe report and make tips according to their personal valuation of the benefit Bob has provided to\nthe network. Charlie tips 10 DOT, Dave tips 30 DOT, and Eve tips 100 DOT."}),"\n",(0,o.jsx)(t.p,{children:"The tip could have been closed out with only two of the three tippers. Once more than half of the\ntippers group have issued tip valuations, the countdown to close the tip will begin. In this case,\nthe third tipper issued their tip before the end of the closing period, so all three were able to\nmake their tip valuations known."}),"\n",(0,o.jsxs)(t.p,{children:["The actual tip that will be paid out to Bob is the median of these tips, so Bob will be paid out 30\nDOT from the Treasury. In order for Bob to be paid his tip, some account must call the ",(0,o.jsx)(t.code,{children:"close_tip"}),"\nextrinsic at the end of the closing period for the tip. This extrinsic may be called by anyone."]}),"\n",(0,o.jsx)(t.h2,{id:"bounties-spending",children:"Bounties Spending"}),"\n",(0,o.jsx)(t.p,{children:"There are practical limits to Council Members curation capabilities when it comes to treasury\nproposals: Council members likely do not have the expertise to make a proper assessment of the\nactivities described in all proposals. Even if individual Councillors have that expertise, it is\nhighly unlikely that a majority of members are capable in such diverse topics."}),"\n",(0,o.jsx)(t.p,{children:"Bounties Spending proposals aim to delegate the curation activity of spending proposals to experts\ncalled Curators: They can be defined as addresses with agency over a portion of the Treasury with\nthe goal of fixing a bug or vulnerability, developing a strategy, or monitoring a set of tasks\nrelated to a specific topic: all for the benefit of the Polkadot ecosystem."}),"\n",(0,o.jsx)(t.p,{children:"A proposer can submit a bounty proposal for the Council to pass, with a curator to be defined later,\nwhose background and expertise is such that they are capable of determining when the task is\ncomplete. Curators are selected by the Council after the bounty proposal passes, and need to add an\nupfront payment to take the position. This deposit can be used to punish them if they act\nmaliciously. However, if they are successful in their task of getting someone to complete the bounty\nwork, they will receive their deposit back and part of the bounty reward."}),"\n",(0,o.jsx)(t.p,{children:"When submitting the value of the bounty, the proposer includes a reward for curators willing to\ninvest their time and expertise in the task: this amount is included in the total value of the\nbounty. In this sense, the curator's fee can be defined as the result of subtracting the value paid\nto the bounty rewardee from the total value of the bounty."}),"\n",(0,o.jsx)(t.p,{children:"In general terms, curators are expected to have a well-balanced track record related to the issues\nthe bounty tries to resolve: they should be at least knowledgeable on the topics the bounty touches,\nand show project management skills or experience. These recommendations ensure an effective use of\nthe mechanism. A Bounty Spending is a reward for a specified body of work - or specified set of\nobjectives - that needs to be executed for a predefined treasury amount to be paid out. The\nresponsibility of assigning a payout address once the specified set of objectives is completed is\ndelegated to the curator."}),"\n",(0,o.jsx)(t.p,{children:"After the Council has activated a bounty, it delegates the work that requires expertise to the\ncurator who gets to close the active bounty. Closing the active bounty enacts a delayed payout to\nthe payout address and a payout of the curator fee. The delay phase allows the Council to act if any\nissues arise."}),"\n",(0,o.jsxs)(t.p,{children:["To minimize storage on chain in the same way as any proposal, bounties don't contain contextual\ninformation. When a user submits a bounty spending proposal, they will probably need to find an\noff-chain way to explain the proposal (any of the available community forums serve this purpose).\n",(0,o.jsx)(t.a,{href:"https://docs.google.com/document/d/1-IBz_owspV5OcvezWXpksWDQReWowschD0TFuaVKKcU/edit?usp=sharing",children:"This template"}),"\ncan help as a checklist of all needed information for the Council to make an informed decision."]}),"\n",(0,o.jsx)(t.p,{children:"The bounty has a predetermined duration of 90 days with the possibility of being extended by the\ncurator. Aiming to maintain flexibility on the tasks\u2019 curation, the curator will be able to create\nsub-bounties for more granularity and allocation in the next iteration of the mechanism."}),"\n",(0,o.jsx)(t.h3,{id:"creating-a-bounty-proposal",children:"Creating a Bounty Proposal"}),"\n",(0,o.jsx)(t.p,{children:"Anyone can create a Bounty proposal using Polkadot-JS Apps: Users are able to submit a proposal on\nthe dedicated Bounty section under Governance. The development of a robust user interface to view\nand manage bounties in the Polkadot Apps is still under development and it will serve Council\nmembers, Curators and Beneficiaries of the bounties, as well as all users observing the on-chain\ntreasury governance. For now, the help of a Councillor is needed to open a bounty proposal as a\nmotion to be voted."}),"\n",(0,o.jsxs)(t.p,{children:["To submit a bounty, please visit ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS Apps"})," and click on the\ngovernance tab in the options bar on the top of the site. After, click on 'Bounties' and find the\nbutton '+ Add Bounty' on the upper-right side of the interface. Complete the bounty title, the\nrequested allocation (including curator's fee) and confirm the call."]}),"\n",(0,o.jsxs)(t.p,{children:["After this, a Council member will need to assist you to pass the bounty proposal for vote as a\nmotion. You can contact the Council by joining the main\n",(0,o.jsx)(t.a,{href:"/docs/community",children:"Direction Element Channel and Discord server"})," and publishing a short\ndescription of your bounty, with a link to one of the ",(0,o.jsx)(t.a,{href:"#announcing-the-proposal",children:"forums"})," for\ncontextual information."]}),"\n",(0,o.jsx)(t.p,{children:"A bounty can be cancelled by deleting the earmark for a specific treasury amount or be closed if the\ntasks have been completed. On the opposite side, the 90 days life of a bounty can be extended by\namending the expiry block number of the bounty to stay active."}),"\n",(0,o.jsx)(t.h3,{id:"closing-a-bounty",children:"Closing a bounty"}),"\n",(0,o.jsx)(t.p,{children:"The curator can close the bounty once they approve the completion of its tasks. The curator should\nmake sure to set up the payout address on the active bounty beforehand. Closing the Active bounty\nenacts a delayed payout to the payout address and a payout of the curator fee."}),"\n",(0,o.jsxs)(t.p,{children:["A bounty can be closed by using the extrinsics tab and selecting the Treasury pallet, then\n",(0,o.jsx)(t.code,{children:"Award_bounty"}),", making sure the right bounty is to be closed and finally sign the transaction. It is\nimportant to note that those who received a reward after the bounty is completed, must claim the\nspecific amount of the payout from the payout address, by calling ",(0,o.jsx)(t.code,{children:"Claim_bounty"})," after the curator\nclosed the allocation."]}),"\n",(0,o.jsxs)(t.p,{children:["To understand more about Bounties and how this new mechanism works, read this\n",(0,o.jsx)(t.a,{href:"https://polkadot.network/kusama-and-polkadot-now-reward-curators-helping-to-scale-councils-functions-join-the-force-moving-the-community-forward/",children:"Polkadot Blog post"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"faq",children:"FAQ"}),"\n",(0,o.jsx)(t.h3,{id:"what-prevents-the-treasury-from-being-captured-by-a-majority-of-the-council",children:"What prevents the Treasury from being captured by a majority of the Council?"}),"\n",(0,o.jsx)(t.p,{children:"The majority of the Council can decide the outcome of a treasury spend proposal. In an adversarial\nmindset, we may consider the possibility that the Council may at some point go rogue and attempt to\nsteal all of the treasury funds. It is a possibility that the treasury pot becomes so great, that a\nlarge financial incentive would present itself."}),"\n",(0,o.jsx)(t.p,{children:"For one, the Treasury has deflationary pressure due to the burn that is suffered every spend period.\nThe burn aims to incentivize the complete spend of all treasury funds at every burn period, so\nideally the treasury pot doesn't have time to accumulate mass amounts of wealth. However, it is the\ncase that the burn on the Treasury could be so little that it does not matter - as is the case\ncurrently on Kusama with a 0.2% burn."}),"\n",(0,o.jsx)(t.p,{children:"However, it is the case on Kusama that the Council is composed of mainly well-known members of the\ncommunity. Remember, the Council is voted in by the token holders, so they must do some campaigning\nor otherwise be recognized to earn votes. In the scenario of an attack, the Council members would\nlose their social credibility. Furthermore, members of the Council are usually externally motivated\nby the proper operation of the chain. This external motivation is either because they run businesses\nthat depend on the chain, or they have direct financial gain (through their holdings) of the token\nvalue remaining steady."}),"\n",(0,o.jsx)(t.p,{children:"Concretely, there are a couple on-chain methods that resist this kind of attack. One, the Council\nmajority may not be the token majority of the chain. This means that the token majority could vote\nto replace the Council if they attempted this attack - or even reverse the treasury spend. They\nwould do this through a normal referendum. Two, there are time delays to treasury spends. They are\nonly enacted every spend period. This means that there will be some time to observe this attack is\ntaking place. The time delay then allows chain participants time to respond. The response may take\nthe form of governance measures or - in the most extreme cases a liquidation of their holdings and a\nmigration to a minority fork. However, the possibility of this scenario is quite low."}),"\n",(0,o.jsx)(t.h2,{id:"further-reading",children:"Further Reading"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/treasury/src/lib.rs",children:"Substrate's Treasury Pallet"})}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_treasury/index.html",children:"Documentation of the Rust implementation of the Treasury"})}),"\n"]}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(96540),a=n(74848);const s=function(e){var t,n=e.message,s=(0,o.useState)(!0),i=s[0],r=s[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const a={},s=o.createContext(a);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/06597bc8.e7e42c19.js b/assets/js/06597bc8.e7e42c19.js deleted file mode 100644 index ceee58f2bcad..000000000000 --- a/assets/js/06597bc8.e7e42c19.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6417],{52877:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var o=n(74848),a=n(28453),s=n(67141);const i={id:"learn-treasury",title:"Governance v1 Treasury",sidebar_label:"Gov1 Treasury",description:"The Polkadot's On-chain Treasury during Gov1.",keywords:["treasury","funds","funding","tips","tipping"],slug:"../learn-treasury"},r=void 0,l={id:"learn/archive/learn-treasury",title:"Governance v1 Treasury",description:"The Polkadot's On-chain Treasury during Gov1.",source:"@site/../docs/learn/archive/learn-treasury.md",sourceDirName:"learn/archive",slug:"/learn/learn-treasury",permalink:"/docs/learn/learn-treasury",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-treasury.md",tags:[],version:"current",lastUpdatedBy:"Radha",lastUpdatedAt:1729674841e3,frontMatter:{id:"learn-treasury",title:"Governance v1 Treasury",sidebar_label:"Gov1 Treasury",description:"The Polkadot's On-chain Treasury during Gov1.",keywords:["treasury","funds","funding","tips","tipping"],slug:"../learn-treasury"},sidebar:"docs",previous:{title:"Governance V1",permalink:"/docs/learn/learn-governance"},next:{title:"Polkadot Launch Phases",permalink:"/docs/learn/learn-launch"}},h={},d=[{value:"Funding the Treasury",id:"funding-the-treasury",level:2},{value:"Tipping",id:"tipping",level:2},{value:"Example",id:"example",level:3},{value:"Bounties Spending",id:"bounties-spending",level:2},{value:"Creating a Bounty Proposal",id:"creating-a-bounty-proposal",level:3},{value:"Closing a bounty",id:"closing-a-bounty",level:3},{value:"FAQ",id:"faq",level:2},{value:"What prevents the Treasury from being captured by a majority of the Council?",id:"what-prevents-the-treasury-from-being-captured-by-a-majority-of-the-council",level:3},{value:"Further Reading",id:"further-reading",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{message:"The content on this page is archived. For up-to-date information about treasury, see the\n[Polkadot OpenGov Treasury page](../../learn/learn-polkadot-opengov-treasury)."}),"\n",(0,o.jsxs)(t.p,{children:["The Treasury is a pot of funds collected through a portion of block production rewards,\n",(0,o.jsx)(t.a,{href:"/docs/learn-transactions#transaction-fees",children:"transaction fees"}),", ",(0,o.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashing"}),",\n",(0,o.jsx)(t.a,{href:"/docs/learn-staking#inflation",children:"staking inefficiencies"}),", etc."]}),"\n",(0,o.jsxs)(t.p,{children:["The Treasury funds are held in a ",(0,o.jsx)(t.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"})," not\naccessible by anyone; only the system internal logic can access it. Funds can be spent by making a\nspending proposal that, if approved by the ",(0,o.jsx)(t.a,{href:"/docs/learn/learn-governance#council",children:"Council"}),", will enter a\nwaiting period before distribution. This waiting period is known as the\n",(0,o.jsx)(t.a,{href:"/docs/chain-state-values#treasury-spending-period",children:(0,o.jsx)(t.em,{children:"spend period"})}),", and its duration is\nsubject to ",(0,o.jsx)(t.a,{href:"/docs/learn/learn-governance",children:"governance"}),". The Treasury attempts to spend as many proposals in\nthe queue as it can without running out of funds."]}),"\n",(0,o.jsx)(t.p,{children:"Treasury payout is an automatic process:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"If the Treasury funds run out with approved proposals left to fund, those proposals are kept in\nthe approved queue, and will receive funding in the following spend period."}),"\n",(0,o.jsxs)(t.li,{children:["If the Treasury ends a spend period without spending all of its funds, it suffers a burn of\n",(0,o.jsx)(t.a,{href:"/docs/chain-state-values#treasury-burn-factor",children:"a percentage of its funds"})," - thereby\ncausing deflationary pressure. This encourages the spending of the funds in the Treasury by\nPolkadot's governance system."]}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"When a stakeholder wishes to propose a spend from the Treasury, they must reserve a deposit of at\nleast 5% of the proposed spend (see below for variations). This deposit will be slashed if the\nproposal is rejected, and returned if it is accepted."}),"\n",(0,o.jsx)(t.p,{children:"Proposals may consist of (but are not limited to):"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Infrastructure deployment and continued operation."}),"\n",(0,o.jsx)(t.li,{children:"Network security operations (monitoring services, continuous auditing)."}),"\n",(0,o.jsx)(t.li,{children:"Ecosystem provisions (collaborations with friendly chains)."}),"\n",(0,o.jsx)(t.li,{children:"Marketing activities (advertising, paid features, collaborations)."}),"\n",(0,o.jsx)(t.li,{children:"Community events and outreach (meetups, pizza parties, hackerspaces)."}),"\n",(0,o.jsx)(t.li,{children:"Software development (wallets and wallet integration, clients and client upgrades)."}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.a,{href:"learn-governance#council",children:"Council"})," governs the Treasury and how the funds are spent is up to\ntheir judgment."]}),"\n",(0,o.jsx)(t.admonition,{type:"caution",children:(0,o.jsx)(t.p,{children:"The Council does not approve or deny Treasury Proposals based on the available funds. Proposals are\nnot approved just because there are funds ready to spend but are subject to a burn."})}),"\n",(0,o.jsx)(t.h2,{id:"funding-the-treasury",children:"Funding the Treasury"}),"\n",(0,o.jsxs)(t.p,{children:["For more information about how the Polkadot Treasury is funded, see the\n",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury#treasury-inflow-and-outflow",children:"treasury page"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"tipping",children:"Tipping"}),"\n",(0,o.jsx)(t.p,{children:"Next to the proposals process, a separate system for making tips exists for the Treasury. Tips can\nbe suggested by anyone and are supported by members of the Council. Tips do not have any definite\nvalue, and the final value of the tip is decided based on the median of all tips issued by the\ntippers."}),"\n",(0,o.jsx)(t.p,{children:"Currently, the tippers are the same as the members of the Council. However, being a tipper is not\nthe direct responsibility of the Council, and at some point the Council and the tippers may be\ndifferent groups of accounts."}),"\n",(0,o.jsxs)(t.p,{children:["A tip will enter a closing phase when more than a half plus one of the tipping group have endorsed a\ntip. During that time frame, the other members of the tipping group can still issue their tips, but\ndo not have to. Once the window closes, anyone can call the ",(0,o.jsx)(t.code,{children:"close_tip"})," extrinsic, and the tip will\nbe paid out."]}),"\n",(0,o.jsx)(t.p,{children:"There are two types of tips:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"public: A small bond is required to place them. This bond depends on the tip message length, and a\nfixed bond constant defined on chain, currently 1 DOT (0.166 KSM on Kusama). Public tips carry a\nfinder's fee of 20% (same on Polkadot and Kusama) which is paid out from the total amount."}),"\n",(0,o.jsx)(t.li,{children:"tipper-initiated: Tips that a Council member published, do not have a finder's fee or a bond."}),"\n"]}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["For information about how to submit a tip from the Treasury you can read\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181971",children:"this support article"}),"."]})}),"\n",(0,o.jsx)(t.p,{children:"To better understand the process a tip goes through until it is paid out, let's consider the example\nbelow."}),"\n",(0,o.jsx)(t.h3,{id:"example",children:"Example"}),"\n",(0,o.jsx)(t.p,{children:"Bob has done something great for Polkadot. Alice has noticed this and decides to report Bob as\ndeserving a tip from the Treasury. The Council is composed of three members Charlie, Dave, and Eve."}),"\n",(0,o.jsxs)(t.p,{children:["Alice begins the process by issuing the ",(0,o.jsx)(t.code,{children:"report_awesome"})," extrinsic. This extrinsic requires two\narguments, a reason and the beneficiary. Alice submits Bob's address with the reason being a UTF-8\nencoded URL to a post on ",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io",children:"Polkassembly"})," that explains her\nreasoning for why Bob deserves the tip."]}),"\n",(0,o.jsx)(t.p,{children:"As mentioned above, Alice must also lock up a deposit for making this report. The deposit is the\nbase deposit as set in the chain's parameter list, plus the additional deposit per byte contained in\nthe reason. This is why Alice submitted a URL as the reason instead of the explanation directly: it\nwas cheaper for her to do so. For her trouble, Alice is able to claim the eventual finder's fee if\nthe tip is approved by the tippers."}),"\n",(0,o.jsx)(t.p,{children:"Since the tipper group is the same as the Council, the Council must now collectively (but also\nindependently) decide on the value of the tip that Bob deserves. Charlie, Dave, and Eve all review\nthe report and make tips according to their personal valuation of the benefit Bob has provided to\nthe network. Charlie tips 10 DOT, Dave tips 30 DOT, and Eve tips 100 DOT."}),"\n",(0,o.jsx)(t.p,{children:"The tip could have been closed out with only two of the three tippers. Once more than half of the\ntippers group have issued tip valuations, the countdown to close the tip will begin. In this case,\nthe third tipper issued their tip before the end of the closing period, so all three were able to\nmake their tip valuations known."}),"\n",(0,o.jsxs)(t.p,{children:["The actual tip that will be paid out to Bob is the median of these tips, so Bob will be paid out 30\nDOT from the Treasury. In order for Bob to be paid his tip, some account must call the ",(0,o.jsx)(t.code,{children:"close_tip"}),"\nextrinsic at the end of the closing period for the tip. This extrinsic may be called by anyone."]}),"\n",(0,o.jsx)(t.h2,{id:"bounties-spending",children:"Bounties Spending"}),"\n",(0,o.jsx)(t.p,{children:"There are practical limits to Council Members curation capabilities when it comes to treasury\nproposals: Council members likely do not have the expertise to make a proper assessment of the\nactivities described in all proposals. Even if individual Councillors have that expertise, it is\nhighly unlikely that a majority of members are capable in such diverse topics."}),"\n",(0,o.jsx)(t.p,{children:"Bounties Spending proposals aim to delegate the curation activity of spending proposals to experts\ncalled Curators: They can be defined as addresses with agency over a portion of the Treasury with\nthe goal of fixing a bug or vulnerability, developing a strategy, or monitoring a set of tasks\nrelated to a specific topic: all for the benefit of the Polkadot ecosystem."}),"\n",(0,o.jsx)(t.p,{children:"A proposer can submit a bounty proposal for the Council to pass, with a curator to be defined later,\nwhose background and expertise is such that they are capable of determining when the task is\ncomplete. Curators are selected by the Council after the bounty proposal passes, and need to add an\nupfront payment to take the position. This deposit can be used to punish them if they act\nmaliciously. However, if they are successful in their task of getting someone to complete the bounty\nwork, they will receive their deposit back and part of the bounty reward."}),"\n",(0,o.jsx)(t.p,{children:"When submitting the value of the bounty, the proposer includes a reward for curators willing to\ninvest their time and expertise in the task: this amount is included in the total value of the\nbounty. In this sense, the curator's fee can be defined as the result of subtracting the value paid\nto the bounty rewardee from the total value of the bounty."}),"\n",(0,o.jsx)(t.p,{children:"In general terms, curators are expected to have a well-balanced track record related to the issues\nthe bounty tries to resolve: they should be at least knowledgeable on the topics the bounty touches,\nand show project management skills or experience. These recommendations ensure an effective use of\nthe mechanism. A Bounty Spending is a reward for a specified body of work - or specified set of\nobjectives - that needs to be executed for a predefined treasury amount to be paid out. The\nresponsibility of assigning a payout address once the specified set of objectives is completed is\ndelegated to the curator."}),"\n",(0,o.jsx)(t.p,{children:"After the Council has activated a bounty, it delegates the work that requires expertise to the\ncurator who gets to close the active bounty. Closing the active bounty enacts a delayed payout to\nthe payout address and a payout of the curator fee. The delay phase allows the Council to act if any\nissues arise."}),"\n",(0,o.jsxs)(t.p,{children:["To minimize storage on chain in the same way as any proposal, bounties don't contain contextual\ninformation. When a user submits a bounty spending proposal, they will probably need to find an\noff-chain way to explain the proposal (any of the available community forums serve this purpose).\n",(0,o.jsx)(t.a,{href:"https://docs.google.com/document/d/1-IBz_owspV5OcvezWXpksWDQReWowschD0TFuaVKKcU/edit?usp=sharing",children:"This template"}),"\ncan help as a checklist of all needed information for the Council to make an informed decision."]}),"\n",(0,o.jsx)(t.p,{children:"The bounty has a predetermined duration of 90 days with the possibility of being extended by the\ncurator. Aiming to maintain flexibility on the tasks\u2019 curation, the curator will be able to create\nsub-bounties for more granularity and allocation in the next iteration of the mechanism."}),"\n",(0,o.jsx)(t.h3,{id:"creating-a-bounty-proposal",children:"Creating a Bounty Proposal"}),"\n",(0,o.jsx)(t.p,{children:"Anyone can create a Bounty proposal using Polkadot-JS Apps: Users are able to submit a proposal on\nthe dedicated Bounty section under Governance. The development of a robust user interface to view\nand manage bounties in the Polkadot Apps is still under development and it will serve Council\nmembers, Curators and Beneficiaries of the bounties, as well as all users observing the on-chain\ntreasury governance. For now, the help of a Councillor is needed to open a bounty proposal as a\nmotion to be voted."}),"\n",(0,o.jsxs)(t.p,{children:["To submit a bounty, please visit ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS Apps"})," and click on the\ngovernance tab in the options bar on the top of the site. After, click on 'Bounties' and find the\nbutton '+ Add Bounty' on the upper-right side of the interface. Complete the bounty title, the\nrequested allocation (including curator's fee) and confirm the call."]}),"\n",(0,o.jsxs)(t.p,{children:["After this, a Council member will need to assist you to pass the bounty proposal for vote as a\nmotion. You can contact the Council by joining the main\n",(0,o.jsx)(t.a,{href:"/docs/community",children:"Direction Element Channel and Discord server"})," and publishing a short\ndescription of your bounty, with a link to one of the ",(0,o.jsx)(t.a,{href:"#announcing-the-proposal",children:"forums"})," for\ncontextual information."]}),"\n",(0,o.jsx)(t.p,{children:"A bounty can be cancelled by deleting the earmark for a specific treasury amount or be closed if the\ntasks have been completed. On the opposite side, the 90 days life of a bounty can be extended by\namending the expiry block number of the bounty to stay active."}),"\n",(0,o.jsx)(t.h3,{id:"closing-a-bounty",children:"Closing a bounty"}),"\n",(0,o.jsx)(t.p,{children:"The curator can close the bounty once they approve the completion of its tasks. The curator should\nmake sure to set up the payout address on the active bounty beforehand. Closing the Active bounty\nenacts a delayed payout to the payout address and a payout of the curator fee."}),"\n",(0,o.jsxs)(t.p,{children:["A bounty can be closed by using the extrinsics tab and selecting the Treasury pallet, then\n",(0,o.jsx)(t.code,{children:"Award_bounty"}),", making sure the right bounty is to be closed and finally sign the transaction. It is\nimportant to note that those who received a reward after the bounty is completed, must claim the\nspecific amount of the payout from the payout address, by calling ",(0,o.jsx)(t.code,{children:"Claim_bounty"})," after the curator\nclosed the allocation."]}),"\n",(0,o.jsxs)(t.p,{children:["To understand more about Bounties and how this new mechanism works, read this\n",(0,o.jsx)(t.a,{href:"https://polkadot.network/kusama-and-polkadot-now-reward-curators-helping-to-scale-councils-functions-join-the-force-moving-the-community-forward/",children:"Polkadot Blog post"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"faq",children:"FAQ"}),"\n",(0,o.jsx)(t.h3,{id:"what-prevents-the-treasury-from-being-captured-by-a-majority-of-the-council",children:"What prevents the Treasury from being captured by a majority of the Council?"}),"\n",(0,o.jsx)(t.p,{children:"The majority of the Council can decide the outcome of a treasury spend proposal. In an adversarial\nmindset, we may consider the possibility that the Council may at some point go rogue and attempt to\nsteal all of the treasury funds. It is a possibility that the treasury pot becomes so great, that a\nlarge financial incentive would present itself."}),"\n",(0,o.jsx)(t.p,{children:"For one, the Treasury has deflationary pressure due to the burn that is suffered every spend period.\nThe burn aims to incentivize the complete spend of all treasury funds at every burn period, so\nideally the treasury pot doesn't have time to accumulate mass amounts of wealth. However, it is the\ncase that the burn on the Treasury could be so little that it does not matter - as is the case\ncurrently on Kusama with a 0.2% burn."}),"\n",(0,o.jsx)(t.p,{children:"However, it is the case on Kusama that the Council is composed of mainly well-known members of the\ncommunity. Remember, the Council is voted in by the token holders, so they must do some campaigning\nor otherwise be recognized to earn votes. In the scenario of an attack, the Council members would\nlose their social credibility. Furthermore, members of the Council are usually externally motivated\nby the proper operation of the chain. This external motivation is either because they run businesses\nthat depend on the chain, or they have direct financial gain (through their holdings) of the token\nvalue remaining steady."}),"\n",(0,o.jsx)(t.p,{children:"Concretely, there are a couple on-chain methods that resist this kind of attack. One, the Council\nmajority may not be the token majority of the chain. This means that the token majority could vote\nto replace the Council if they attempted this attack - or even reverse the treasury spend. They\nwould do this through a normal referendum. Two, there are time delays to treasury spends. They are\nonly enacted every spend period. This means that there will be some time to observe this attack is\ntaking place. The time delay then allows chain participants time to respond. The response may take\nthe form of governance measures or - in the most extreme cases a liquidation of their holdings and a\nmigration to a minority fork. However, the possibility of this scenario is quite low."}),"\n",(0,o.jsx)(t.h2,{id:"further-reading",children:"Further Reading"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/treasury/src/lib.rs",children:"Substrate's Treasury Pallet"})}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_treasury/index.html",children:"Documentation of the Rust implementation of the Treasury"})}),"\n"]}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(96540),a=n(74848);const s=function(e){var t,n=e.message,s=(0,o.useState)(!0),i=s[0],r=s[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const a={},s=o.createContext(a);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0eeb7a68.02ae9d02.js b/assets/js/0eeb7a68.02ae9d02.js deleted file mode 100644 index 70b858aeb5a8..000000000000 --- a/assets/js/0eeb7a68.02ae9d02.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6869],{5824:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>l,frontMatter:()=>r,metadata:()=>d,toc:()=>u});var a=t(74848),n=t(28453),o=t(67141);const r={id:"learn-guides-dot-ksm-bridge",title:"Polkadot and Kusama Bridge Guides",sidebar_label:"DOT <> KSM Bridge",description:"Polkadot-JS Guides about Polkadot and Kusama Bridge.",keywords:["Bridge","XCM","Bridge Hub","polkadot-js"],slug:"../learn-guides-dot-ksm-bridge"},i=void 0,d={id:"learn/learn-guides-dot-ksm-bridge",title:"Polkadot and Kusama Bridge Guides",description:"Polkadot-JS Guides about Polkadot and Kusama Bridge.",source:"@site/../docs/learn/learn-guides-DOT-KSM-bridge.md",sourceDirName:"learn",slug:"/learn-guides-dot-ksm-bridge",permalink:"/docs/learn-guides-dot-ksm-bridge",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-DOT-KSM-bridge.md",tags:[],version:"current",lastUpdatedBy:"Radha",lastUpdatedAt:1716295516e3,frontMatter:{id:"learn-guides-dot-ksm-bridge",title:"Polkadot and Kusama Bridge Guides",sidebar_label:"DOT <> KSM Bridge",description:"Polkadot-JS Guides about Polkadot and Kusama Bridge.",keywords:["Bridge","XCM","Bridge Hub","polkadot-js"],slug:"../learn-guides-dot-ksm-bridge"},sidebar:"docs",previous:{title:"Bridge Hub Guides",permalink:"/docs/learn-guides-bridges"},next:{title:"Claim Guides",permalink:"/docs/learn-guides-claims"}},c={},u=[{value:"Transfer DOT to Kusama Asset Hub",id:"transfer-dot-to-kusama-asset-hub",level:2},{value:"Transfer DOT from Kusama Asset Hub to Polkadot Asset Hub",id:"transfer-dot-from-kusama-asset-hub-to-polkadot-asset-hub",level:2},{value:"Transfer KSM to Polkadot Asset Hub",id:"transfer-ksm-to-polkadot-asset-hub",level:2},{value:"Transfer KSM from Polkadot Asset Hub to Kusama Asset Hub",id:"transfer-ksm-from-polkadot-asset-hub-to-kusama-asset-hub",level:2},{value:"Transfer of arbitrary assets between Polkadot Asset Hub and Kusama Asset Hub",id:"transfer-of-arbitrary-assets-between-polkadot-asset-hub-and-kusama-asset-hub",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",p:"p",pre:"pre",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,a.jsxs)(s.p,{children:["The fully functional Polkadot < > Kusama bridge facilitates secure asset transfers between the\nchains in both the ecosystems. The progress of Polkadot < > Kusama bridge implementation can be\ntracked ",(0,a.jsx)(s.a,{href:"https://forum.polkadot.network/t/polkadot-kusama-bridge/2971/1",children:"here"}),"."]}),"\n",(0,a.jsx)(s.h2,{id:"transfer-dot-to-kusama-asset-hub",children:"Transfer DOT to Kusama Asset Hub"}),"\n",(0,a.jsx)(s.p,{children:"This tutorial shows how to transfer DOT on Polkadot Asset Hub to Kusama Asset Hub. The first step is\nto ensure that your account on Polkadot Asset Hub has enough DOT to cover the XCM transfer fee and\nthe bridge fee (which is around 2 DOT). The next step is to craft an XCM message to be sent from\nPolkadot Asset Hub."}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.a,{href:"https://xcmsend.com/#/builder",children:"BagPipes (formerly called xcmsend)"})," is an opensource application\nthat lets you create workflows in a drag and drop style interface in order to build execution flows\nof cross chain assets transfers using XCM. Check\n",(0,a.jsx)(s.a,{href:"https://xcmsend.github.io/workflows/dotksm.html",children:"Bagpipes docs"})," for more information on how to\ncreate workflows for crafting XCM transfers. The snapshot below shows a workflow on BagPipes that is\ndesigned to send 3 DOT from an account Polkadot Asset Hub to Kusama Asset Hub."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"BagPipes Snapshot DOT Transfer",src:t(35918).A+"",width:"2035",height:"962"})}),"\n",(0,a.jsx)(s.p,{children:"This workflow crafts an XCM transfer as shown below."}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{children:'{\n "isSigned": false,\n "method": {\n "args": {\n "dest": {\n "V3": {\n "parents": "2",\n "interior": {\n "X2": [\n {\n "GlobalConsensus": "Kusama"\n },\n {\n "Parachain": "1,000"\n }\n ]\n }\n }\n },\n "beneficiary": {\n "V3": {\n "parents": "0",\n "interior": {\n "X1": {\n "AccountId32": {\n "network": null,\n "id": "0x9e4e7009937c56d267338762a60ed004293afd40e7c2081847c12cb63c76a818"\n }\n }\n }\n }\n },\n "assets": {\n "V3": [\n {\n "id": {\n "Concrete": {\n "parents": "1",\n "interior": "Here"\n }\n },\n "fun": {\n "Fungible": "30,000,000,000"\n }\n }\n ]\n },\n "fee_asset_item": "0",\n "weight_limit": "Unlimited"\n },\n "method": "limitedReserveTransferAssets",\n "section": "polkadotXcm"\n }\n}\n'})}),"\n",(0,a.jsxs)(s.p,{children:["Once this ",(0,a.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/6028374-2",children:"extrinsic"})," is signed and\nsubmitted, it is broadcast to Polkadot Asset Hub nodes. As this is a reserve asset transfer, the DOT\nis transferred to the destination's sovereign account on Polkadot Asset Hub and\n",(0,a.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/6758392-0?event=6758392-1",children:"DOT is issued"})," as a foreign\nasset and deposited onto the destination account on Kusama Asset Hub. The foreign asset balances of\nany account on Kusama Asset Hub can be queried on-chain through the ",(0,a.jsx)(s.code,{children:"foreignAssets"}),"pallet as shown\nbelow."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"DOT Balance Kusama Asset Hub",src:t(13777).A+"",width:"2820",height:"1874"})}),"\n",(0,a.jsx)(s.h2,{id:"transfer-dot-from-kusama-asset-hub-to-polkadot-asset-hub",children:"Transfer DOT from Kusama Asset Hub to Polkadot Asset Hub"}),"\n",(0,a.jsx)(s.p,{children:"This tutorial shows how to transfer DOT on Kusama Asset Hub to Polkadot Asset Hub. The first step is\nto ensure that your account on Kusama Asset Hub has enough KSM to cover the XCM transfer fee and the\nbridge fee (which is around 0.4 KSM). The next step is to craft an XCM message to be sent from\nKusama Asset Hub."}),"\n",(0,a.jsxs)(s.p,{children:["DOT which is registered as a foreign asset on Kusama Asset Hub can be transferred to Polkadot Asset\nHub through an extrinsic like the one below, whose call data is\n",(0,a.jsx)(s.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-asset-hub-rpc.polkadot.io#/extrinsics/decode/0x1f0b040202090200a10f04000101009e4e7009937c56d267338762a60ed004293afd40e7c2081847c12cb63c76a818040402010902000700e40b54020000000000",children:(0,a.jsx)(s.code,{children:"0x1f0b040202090200a10f04000101009e4e7009937c56d267338762a60ed004293afd40e7c2081847c12cb63c76a818040402010902000700e40b54020000000000"})}),"."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"DOT transferred out from Kusama Asset Hub",src:t(51308).A+"",width:"2834",height:"5018"})}),"\n",(0,a.jsxs)(s.p,{children:["For reference, this ",(0,a.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/7015118-2",children:"extrinsic"})," is signed\nand submitted successfully, and the destination account on Polkadot Asset Hub received DOT."]}),"\n",(0,a.jsx)(s.h2,{id:"transfer-ksm-to-polkadot-asset-hub",children:"Transfer KSM to Polkadot Asset Hub"}),"\n",(0,a.jsx)(s.p,{children:"This tutorial shows how to transfer KSM on Kusama Asset Hub to Polkadot Asset Hub. The first step is\nto ensure that your account on Kusama Asset Hub has enough KSM to cover the XCM transfer fee and the\nbridge fee (which is around 0.4 KSM). The next step is to craft an XCM message to be sent from\nKusama Asset Hub."}),"\n",(0,a.jsxs)(s.p,{children:["The XCM transfer extrinsic shown below can be accessed\n",(0,a.jsx)(s.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-asset-hub-rpc.polkadot.io#/extrinsics/decode/0x1f08030202090200a10f03000101008479c8ea5480acca5a847133cd97a87801b6e698a98f2eab0e8e9d5c51b14a33030400010000070088526a740000000000",children:"here."}),"\nIf you plan on reusing this extrinsic, ensure that you change the Account ID and the transfer amount\nhighlighted in the snapshot below."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"PJS Snapshot KSM Transfer",src:t(65604).A+"",width:"2858",height:"4398"})}),"\n",(0,a.jsxs)(s.p,{children:["Once this ",(0,a.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/6761480-2",children:"extrinsic"})," is signed and\nsubmitted, it is broadcast to Kusama Asset Hub nodes. As this is a reserve asset transfer, the KSM\nis transferred to the sovereign account on Kusama Asset Hub and\n",(0,a.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/6031467-0?event=6031467-6",children:"KSM is issued"})," as a\nforeign asset and deposited onto the destination account on Kusama Asset Hub. The foreign asset\nbalances of any account on Kusama Asset Hub can be queried on-chain through the\n",(0,a.jsx)(s.code,{children:"foreignAssets"}),"pallet as shown below."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"KSM Balance on Polkadot Asset Hub",src:t(41412).A+"",width:"2854",height:"1960"})}),"\n",(0,a.jsx)(s.h2,{id:"transfer-ksm-from-polkadot-asset-hub-to-kusama-asset-hub",children:"Transfer KSM from Polkadot Asset Hub to Kusama Asset Hub"}),"\n",(0,a.jsx)(s.p,{children:"This tutorial shows how to transfer KSM on Polkadot Asset Hub to Kusama Asset Hub. The first step is\nto ensure that your account on Polkadot Asset Hub has enough DOT to cover the XCM transfer fee and\nthe bridge fee (which is around 2 DOT). The next step is to craft an XCM message to be sent from\nPolkadot Asset Hub."}),"\n",(0,a.jsxs)(s.p,{children:["KSM which is registered as a foreign asset on Polkadot Asset Hub can be transferred to Kusama Asset\nHub through an extrinsic like the one below, whose call data is\n",(0,a.jsx)(s.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-asset-hub-rpc.polkadot.io#/extrinsics/decode/0x1f0b040202090300a10f04000101008479c8ea5480acca5a847133cd97a87801b6e698a98f2eab0e8e9d5c51b14a33040402010903000700a0db215d0000000000",children:(0,a.jsx)(s.code,{children:"0x1f0b040202090300a10f04000101008479c8ea5480acca5a847133cd97a87801b6e698a98f2eab0e8e9d5c51b14a33040402010903000700a0db215d0000000000"})})]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"KSM transferred out from Polkadot Asset Hub",src:t(25728).A+"",width:"2854",height:"4784"})}),"\n",(0,a.jsxs)(s.p,{children:["For reference, this ",(0,a.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/6303823-2",children:"extrinsic"})," was signed\nand submitted successfully, and the destination account on Kusama Asset Hub received KSM."]}),"\n",(0,a.jsx)(s.h2,{id:"transfer-of-arbitrary-assets-between-polkadot-asset-hub-and-kusama-asset-hub",children:"Transfer of arbitrary assets between Polkadot Asset Hub and Kusama Asset Hub"}),"\n",(0,a.jsx)(s.p,{children:"Transfer functionality of assets other than DOT and KSM between Asset Hubs is yet to be enabled.\nOnce this functionality is enabled, assets which are sufficient or non-sufficient on the Asset Hubs\ncan be bridged."}),"\n",(0,a.jsx)(s.admonition,{title:"Avoid Asset Traps",type:"caution",children:(0,a.jsxs)(s.p,{children:["To avoid issues on the receiving side for non-sufficient assets, make sure to call\n",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/0ef37c75401b78b61ed35ce27af8b964da27bb3c/substrate/frame/assets/src/lib.rs#L1531",children:"pallet_assets::touch()"}),"\nor\n",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/0ef37c75401b78b61ed35ce27af8b964da27bb3c/substrate/frame/assets/src/lib.rs#L1616",children:"pallet_assets::touch_other()"}),"\neffectively guaranteeing the ability to successfully receive and accept the bridged assets in your\naccount on the destination chain. This eliminates issues like your account on destination not\nexisting or not having enough ED or having reached the maximum limit of different assets it can\nhold. Without this sanity step, you risk that the bridged assets will make their way to the\ndestination chain but will not be accepted by your account, and instead get trapped in the Asset\nTrap on the destination chain."]})}),"\n",(0,a.jsx)(s.p,{children:"Once arbitrary asset transfers are enabled by the Asset Hubs, a guide will be posted to this Wiki\npage."})]})}function l(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},67141:(e,s,t)=>{t.d(s,{A:()=>o});var a=t(96540),n=t(74848);const o=function(e){var s,t=e.message,o=(0,a.useState)(!0),r=o[0],i=o[1];return(0,n.jsx)(n.Fragment,{children:r&&(0,n.jsxs)("div",{className:"message-box",children:[(0,n.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,n.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=t,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},13777:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/KAH-DOT-Balance-f587755f88564c19d1578f162d9dd0ff.png"},51308:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/KAH-DOT-transfer-PAH-a6dd9187db4d6f449092d026c726a8c6.png"},65604:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/KAH-PAH-KSM-Transfer-PJS-Extrinsic-55c8a01313cec43f8119b6aca8904e23.png"},41412:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/PAH-KSM-Balance-ffa6f6093f73aa45b0c1bc7b6d0c78c7.png"},25728:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/PAH-KSM-Transfer-KAH-0d8843fc681b2cce6939cc6e607ff122.png"},35918:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/PAH-to-KAH-DOT-transfer-b97431dce4c4cd85c5dc17007357fb9a.png"},28453:(e,s,t)=>{t.d(s,{R:()=>r,x:()=>i});var a=t(96540);const n={},o=a.createContext(n);function r(e){const s=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),a.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0eeb7a68.f6cf6746.js b/assets/js/0eeb7a68.f6cf6746.js new file mode 100644 index 000000000000..4c69dee10ca2 --- /dev/null +++ b/assets/js/0eeb7a68.f6cf6746.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6869],{5824:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>l,frontMatter:()=>r,metadata:()=>d,toc:()=>u});var a=t(74848),n=t(28453),o=t(67141);const r={id:"learn-guides-dot-ksm-bridge",title:"Polkadot and Kusama Bridge Guides",sidebar_label:"DOT <> KSM Bridge",description:"Polkadot-JS Guides about Polkadot and Kusama Bridge.",keywords:["Bridge","XCM","Bridge Hub","polkadot-js"],slug:"../learn-guides-dot-ksm-bridge"},i=void 0,d={id:"learn/learn-guides-dot-ksm-bridge",title:"Polkadot and Kusama Bridge Guides",description:"Polkadot-JS Guides about Polkadot and Kusama Bridge.",source:"@site/../docs/learn/learn-guides-DOT-KSM-bridge.md",sourceDirName:"learn",slug:"/learn-guides-dot-ksm-bridge",permalink:"/docs/learn-guides-dot-ksm-bridge",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-DOT-KSM-bridge.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-dot-ksm-bridge",title:"Polkadot and Kusama Bridge Guides",sidebar_label:"DOT <> KSM Bridge",description:"Polkadot-JS Guides about Polkadot and Kusama Bridge.",keywords:["Bridge","XCM","Bridge Hub","polkadot-js"],slug:"../learn-guides-dot-ksm-bridge"},sidebar:"docs",previous:{title:"Bridge Hub Guides",permalink:"/docs/learn-guides-bridges"},next:{title:"Claim Guides",permalink:"/docs/learn-guides-claims"}},c={},u=[{value:"Transfer DOT to Kusama Asset Hub",id:"transfer-dot-to-kusama-asset-hub",level:2},{value:"Transfer DOT from Kusama Asset Hub to Polkadot Asset Hub",id:"transfer-dot-from-kusama-asset-hub-to-polkadot-asset-hub",level:2},{value:"Transfer KSM to Polkadot Asset Hub",id:"transfer-ksm-to-polkadot-asset-hub",level:2},{value:"Transfer KSM from Polkadot Asset Hub to Kusama Asset Hub",id:"transfer-ksm-from-polkadot-asset-hub-to-kusama-asset-hub",level:2},{value:"Transfer of arbitrary assets between Polkadot Asset Hub and Kusama Asset Hub",id:"transfer-of-arbitrary-assets-between-polkadot-asset-hub-and-kusama-asset-hub",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",p:"p",pre:"pre",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,a.jsxs)(s.p,{children:["The fully functional Polkadot < > Kusama bridge facilitates secure asset transfers between the\nchains in both the ecosystems. The progress of Polkadot < > Kusama bridge implementation can be\ntracked ",(0,a.jsx)(s.a,{href:"https://forum.polkadot.network/t/polkadot-kusama-bridge/2971/1",children:"here"}),"."]}),"\n",(0,a.jsx)(s.h2,{id:"transfer-dot-to-kusama-asset-hub",children:"Transfer DOT to Kusama Asset Hub"}),"\n",(0,a.jsx)(s.p,{children:"This tutorial shows how to transfer DOT on Polkadot Asset Hub to Kusama Asset Hub. The first step is\nto ensure that your account on Polkadot Asset Hub has enough DOT to cover the XCM transfer fee and\nthe bridge fee (which is around 2 DOT). The next step is to craft an XCM message to be sent from\nPolkadot Asset Hub."}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.a,{href:"https://xcmsend.com/#/builder",children:"BagPipes (formerly called xcmsend)"})," is an opensource application\nthat lets you create workflows in a drag and drop style interface in order to build execution flows\nof cross chain assets transfers using XCM. Check\n",(0,a.jsx)(s.a,{href:"https://xcmsend.github.io/workflows/dotksm.html",children:"Bagpipes docs"})," for more information on how to\ncreate workflows for crafting XCM transfers. The snapshot below shows a workflow on BagPipes that is\ndesigned to send 3 DOT from an account Polkadot Asset Hub to Kusama Asset Hub."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"BagPipes Snapshot DOT Transfer",src:t(35918).A+"",width:"2035",height:"962"})}),"\n",(0,a.jsx)(s.p,{children:"This workflow crafts an XCM transfer as shown below."}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{children:'{\n "isSigned": false,\n "method": {\n "args": {\n "dest": {\n "V3": {\n "parents": "2",\n "interior": {\n "X2": [\n {\n "GlobalConsensus": "Kusama"\n },\n {\n "Parachain": "1,000"\n }\n ]\n }\n }\n },\n "beneficiary": {\n "V3": {\n "parents": "0",\n "interior": {\n "X1": {\n "AccountId32": {\n "network": null,\n "id": "0x9e4e7009937c56d267338762a60ed004293afd40e7c2081847c12cb63c76a818"\n }\n }\n }\n }\n },\n "assets": {\n "V3": [\n {\n "id": {\n "Concrete": {\n "parents": "1",\n "interior": "Here"\n }\n },\n "fun": {\n "Fungible": "30,000,000,000"\n }\n }\n ]\n },\n "fee_asset_item": "0",\n "weight_limit": "Unlimited"\n },\n "method": "limitedReserveTransferAssets",\n "section": "polkadotXcm"\n }\n}\n'})}),"\n",(0,a.jsxs)(s.p,{children:["Once this ",(0,a.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/6028374-2",children:"extrinsic"})," is signed and\nsubmitted, it is broadcast to Polkadot Asset Hub nodes. As this is a reserve asset transfer, the DOT\nis transferred to the destination's sovereign account on Polkadot Asset Hub and\n",(0,a.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/6758392-0?event=6758392-1",children:"DOT is issued"})," as a foreign\nasset and deposited onto the destination account on Kusama Asset Hub. The foreign asset balances of\nany account on Kusama Asset Hub can be queried on-chain through the ",(0,a.jsx)(s.code,{children:"foreignAssets"}),"pallet as shown\nbelow."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"DOT Balance Kusama Asset Hub",src:t(13777).A+"",width:"2820",height:"1874"})}),"\n",(0,a.jsx)(s.h2,{id:"transfer-dot-from-kusama-asset-hub-to-polkadot-asset-hub",children:"Transfer DOT from Kusama Asset Hub to Polkadot Asset Hub"}),"\n",(0,a.jsx)(s.p,{children:"This tutorial shows how to transfer DOT on Kusama Asset Hub to Polkadot Asset Hub. The first step is\nto ensure that your account on Kusama Asset Hub has enough KSM to cover the XCM transfer fee and the\nbridge fee (which is around 0.4 KSM). The next step is to craft an XCM message to be sent from\nKusama Asset Hub."}),"\n",(0,a.jsxs)(s.p,{children:["DOT which is registered as a foreign asset on Kusama Asset Hub can be transferred to Polkadot Asset\nHub through an extrinsic like the one below, whose call data is\n",(0,a.jsx)(s.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-asset-hub-rpc.polkadot.io#/extrinsics/decode/0x1f0b040202090200a10f04000101009e4e7009937c56d267338762a60ed004293afd40e7c2081847c12cb63c76a818040402010902000700e40b54020000000000",children:(0,a.jsx)(s.code,{children:"0x1f0b040202090200a10f04000101009e4e7009937c56d267338762a60ed004293afd40e7c2081847c12cb63c76a818040402010902000700e40b54020000000000"})}),"."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"DOT transferred out from Kusama Asset Hub",src:t(51308).A+"",width:"2834",height:"5018"})}),"\n",(0,a.jsxs)(s.p,{children:["For reference, this ",(0,a.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/7015118-2",children:"extrinsic"})," is signed\nand submitted successfully, and the destination account on Polkadot Asset Hub received DOT."]}),"\n",(0,a.jsx)(s.h2,{id:"transfer-ksm-to-polkadot-asset-hub",children:"Transfer KSM to Polkadot Asset Hub"}),"\n",(0,a.jsx)(s.p,{children:"This tutorial shows how to transfer KSM on Kusama Asset Hub to Polkadot Asset Hub. The first step is\nto ensure that your account on Kusama Asset Hub has enough KSM to cover the XCM transfer fee and the\nbridge fee (which is around 0.4 KSM). The next step is to craft an XCM message to be sent from\nKusama Asset Hub."}),"\n",(0,a.jsxs)(s.p,{children:["The XCM transfer extrinsic shown below can be accessed\n",(0,a.jsx)(s.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-asset-hub-rpc.polkadot.io#/extrinsics/decode/0x1f08030202090200a10f03000101008479c8ea5480acca5a847133cd97a87801b6e698a98f2eab0e8e9d5c51b14a33030400010000070088526a740000000000",children:"here."}),"\nIf you plan on reusing this extrinsic, ensure that you change the Account ID and the transfer amount\nhighlighted in the snapshot below."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"PJS Snapshot KSM Transfer",src:t(65604).A+"",width:"2858",height:"4398"})}),"\n",(0,a.jsxs)(s.p,{children:["Once this ",(0,a.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/6761480-2",children:"extrinsic"})," is signed and\nsubmitted, it is broadcast to Kusama Asset Hub nodes. As this is a reserve asset transfer, the KSM\nis transferred to the sovereign account on Kusama Asset Hub and\n",(0,a.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/6031467-0?event=6031467-6",children:"KSM is issued"})," as a\nforeign asset and deposited onto the destination account on Kusama Asset Hub. The foreign asset\nbalances of any account on Kusama Asset Hub can be queried on-chain through the\n",(0,a.jsx)(s.code,{children:"foreignAssets"}),"pallet as shown below."]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"KSM Balance on Polkadot Asset Hub",src:t(41412).A+"",width:"2854",height:"1960"})}),"\n",(0,a.jsx)(s.h2,{id:"transfer-ksm-from-polkadot-asset-hub-to-kusama-asset-hub",children:"Transfer KSM from Polkadot Asset Hub to Kusama Asset Hub"}),"\n",(0,a.jsx)(s.p,{children:"This tutorial shows how to transfer KSM on Polkadot Asset Hub to Kusama Asset Hub. The first step is\nto ensure that your account on Polkadot Asset Hub has enough DOT to cover the XCM transfer fee and\nthe bridge fee (which is around 2 DOT). The next step is to craft an XCM message to be sent from\nPolkadot Asset Hub."}),"\n",(0,a.jsxs)(s.p,{children:["KSM which is registered as a foreign asset on Polkadot Asset Hub can be transferred to Kusama Asset\nHub through an extrinsic like the one below, whose call data is\n",(0,a.jsx)(s.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-asset-hub-rpc.polkadot.io#/extrinsics/decode/0x1f0b040202090300a10f04000101008479c8ea5480acca5a847133cd97a87801b6e698a98f2eab0e8e9d5c51b14a33040402010903000700a0db215d0000000000",children:(0,a.jsx)(s.code,{children:"0x1f0b040202090300a10f04000101008479c8ea5480acca5a847133cd97a87801b6e698a98f2eab0e8e9d5c51b14a33040402010903000700a0db215d0000000000"})})]}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.img,{alt:"KSM transferred out from Polkadot Asset Hub",src:t(25728).A+"",width:"2854",height:"4784"})}),"\n",(0,a.jsxs)(s.p,{children:["For reference, this ",(0,a.jsx)(s.a,{href:"https://assethub-polkadot.subscan.io/extrinsic/6303823-2",children:"extrinsic"})," was signed\nand submitted successfully, and the destination account on Kusama Asset Hub received KSM."]}),"\n",(0,a.jsx)(s.h2,{id:"transfer-of-arbitrary-assets-between-polkadot-asset-hub-and-kusama-asset-hub",children:"Transfer of arbitrary assets between Polkadot Asset Hub and Kusama Asset Hub"}),"\n",(0,a.jsx)(s.p,{children:"Transfer functionality of assets other than DOT and KSM between Asset Hubs is yet to be enabled.\nOnce this functionality is enabled, assets which are sufficient or non-sufficient on the Asset Hubs\ncan be bridged."}),"\n",(0,a.jsx)(s.admonition,{title:"Avoid Asset Traps",type:"caution",children:(0,a.jsxs)(s.p,{children:["To avoid issues on the receiving side for non-sufficient assets, make sure to call\n",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/0ef37c75401b78b61ed35ce27af8b964da27bb3c/substrate/frame/assets/src/lib.rs#L1531",children:"pallet_assets::touch()"}),"\nor\n",(0,a.jsx)(s.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/0ef37c75401b78b61ed35ce27af8b964da27bb3c/substrate/frame/assets/src/lib.rs#L1616",children:"pallet_assets::touch_other()"}),"\neffectively guaranteeing the ability to successfully receive and accept the bridged assets in your\naccount on the destination chain. This eliminates issues like your account on destination not\nexisting or not having enough ED or having reached the maximum limit of different assets it can\nhold. Without this sanity step, you risk that the bridged assets will make their way to the\ndestination chain but will not be accepted by your account, and instead get trapped in the Asset\nTrap on the destination chain."]})}),"\n",(0,a.jsx)(s.p,{children:"Once arbitrary asset transfers are enabled by the Asset Hubs, a guide will be posted to this Wiki\npage."})]})}function l(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},67141:(e,s,t)=>{t.d(s,{A:()=>o});var a=t(96540),n=t(74848);const o=function(e){var s,t=e.message,o=(0,a.useState)(!0),r=o[0],i=o[1];return(0,n.jsx)(n.Fragment,{children:r&&(0,n.jsxs)("div",{className:"message-box",children:[(0,n.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,n.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=t,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},13777:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/KAH-DOT-Balance-f587755f88564c19d1578f162d9dd0ff.png"},51308:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/KAH-DOT-transfer-PAH-a6dd9187db4d6f449092d026c726a8c6.png"},65604:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/KAH-PAH-KSM-Transfer-PJS-Extrinsic-55c8a01313cec43f8119b6aca8904e23.png"},41412:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/PAH-KSM-Balance-ffa6f6093f73aa45b0c1bc7b6d0c78c7.png"},25728:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/PAH-KSM-Transfer-KAH-0d8843fc681b2cce6939cc6e607ff122.png"},35918:(e,s,t)=>{t.d(s,{A:()=>a});const a=t.p+"assets/images/PAH-to-KAH-DOT-transfer-b97431dce4c4cd85c5dc17007357fb9a.png"},28453:(e,s,t)=>{t.d(s,{R:()=>r,x:()=>i});var a=t(96540);const n={},o=a.createContext(n);function r(e){const s=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),a.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/113faa87.5d9a7b64.js b/assets/js/113faa87.5d9a7b64.js new file mode 100644 index 000000000000..b44ed7d292c0 --- /dev/null +++ b/assets/js/113faa87.5d9a7b64.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6011],{30862:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>u,toc:()=>d});var r=s(74848),n=s(28453),a=s(67141),o=s(3514);const i={id:"learn-guides-assets",title:"Polkadot-JS Guides about Asset Hub",sidebar_label:"Asset Hub Guides",description:"Polkadot-JS Guides about Asset Hub.",keywords:["asset hub","assets","statemine","statemint","polkadot-js"],slug:"../learn-guides-assets"},l=void 0,u={id:"learn/learn-guides-assets",title:"Polkadot-JS Guides about Asset Hub",description:"Polkadot-JS Guides about Asset Hub.",source:"@site/../docs/learn/learn-guides-assets.md",sourceDirName:"learn",slug:"/learn-guides-assets",permalink:"/docs/learn-guides-assets",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-assets.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-assets",title:"Polkadot-JS Guides about Asset Hub",sidebar_label:"Asset Hub Guides",description:"Polkadot-JS Guides about Asset Hub.",keywords:["asset hub","assets","statemine","statemint","polkadot-js"],slug:"../learn-guides-assets"},sidebar:"docs",previous:{title:"Polkadot Vault Guides",permalink:"/docs/learn-guides-vault"},next:{title:"Create Asset Guides",permalink:"/docs/learn-guides-assets-create"}},c={},d=[];function m(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,r.jsx)(o.A,{})]})}function p(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(m,{...e})}):m()}},67141:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(96540),n=s(74848);const a=function(e){var t,s=e.message,a=(0,r.useState)(!0),o=a[0],i=a[1];return(0,n.jsx)(n.Fragment,{children:o&&(0,n.jsxs)("div",{className:"message-box",children:[(0,n.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,n.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=s,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,s)=>{s.d(t,{A:()=>x});s(96540);var r=s(34164),n=s(26972),a=s(28774),o=s(53465),i=s(16654),l=s(21312),u=s(51107);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=s(74848);function m(e){var t=e.href,s=e.children;return(0,d.jsx)(a.A,{href:t,className:(0,r.A)("card padding--lg",c.cardContainer),children:s})}function p(e){var t=e.href,s=e.icon,n=e.title,a=e.description;return(0,d.jsxs)(m,{href:t,children:[(0,d.jsxs)(u.A,{as:"h2",className:(0,r.A)("text--truncate",c.cardTitle),title:n,children:[s," ",n]}),a&&(0,d.jsx)("p",{className:(0,r.A)("text--truncate",c.cardDescription),title:a,children:a})]})}function f(e){var t,s,r=e.item,a=(0,n.Nr)(r),i=(s=(0,o.W)().selectMessage,function(e){return s(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,d.jsx)(p,{href:a,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:i(r.items.length)}):null}function h(e){var t,s,r=e.item,a=(0,i.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",o=(0,n.cC)(null!=(t=r.docId)?t:void 0);return(0,d.jsx)(p,{href:r.href,icon:a,title:r.label,description:null!=(s=r.description)?s:null==o?void 0:o.description})}function g(e){var t=e.item;switch(t.type){case"link":return(0,d.jsx)(h,{item:t});case"category":return(0,d.jsx)(f,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function b(e){var t=e.className,s=(0,n.$S)();return(0,d.jsx)(x,{items:s.items,className:t})}function x(e){var t=e.items,s=e.className;if(!t)return(0,d.jsx)(b,Object.assign({},e));var a=(0,n.d1)(t);return(0,d.jsx)("section",{className:(0,r.A)("row",s),children:a.map((function(e,t){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(g,{item:e})},t)}))})}},53465:(e,t,s)=>{s.d(t,{W:()=>u});var r=s(96540),n=s(44586),a=["zero","one","two","few","many","other"];function o(e){return a.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:o(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,n.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,s=new Intl.PluralRules(t),{locale:t,pluralForms:o(s.resolvedOptions().pluralCategories),select:function(e){return s.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),i}var t,s}),[e])}function u(){var e=l();return{selectMessage:function(t,s){return function(e,t,s){var r=e.split("|");if(1===r.length)return r[0];r.length>s.pluralForms.length&&console.error("For locale="+s.locale+", a maximum of "+s.pluralForms.length+" plural forms are expected ("+s.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var n=s.select(t),a=s.pluralForms.indexOf(n);return r[Math.min(a,r.length-1)]}(s,t,e)}}}},28453:(e,t,s)=>{s.d(t,{R:()=>o,x:()=>i});var r=s(96540);const n={},a=r.createContext(n);function o(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/113faa87.e3c136d0.js b/assets/js/113faa87.e3c136d0.js deleted file mode 100644 index 21f92c63d3d5..000000000000 --- a/assets/js/113faa87.e3c136d0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6011],{30862:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>u,toc:()=>d});var n=s(74848),r=s(28453),a=s(67141),o=s(3514);const i={id:"learn-guides-assets",title:"Polkadot-JS Guides about Asset Hub",sidebar_label:"Asset Hub Guides",description:"Polkadot-JS Guides about Asset Hub.",keywords:["asset hub","assets","statemine","statemint","polkadot-js"],slug:"../learn-guides-assets"},l=void 0,u={id:"learn/learn-guides-assets",title:"Polkadot-JS Guides about Asset Hub",description:"Polkadot-JS Guides about Asset Hub.",source:"@site/../docs/learn/learn-guides-assets.md",sourceDirName:"learn",slug:"/learn-guides-assets",permalink:"/docs/learn-guides-assets",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-assets.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1714545713e3,frontMatter:{id:"learn-guides-assets",title:"Polkadot-JS Guides about Asset Hub",sidebar_label:"Asset Hub Guides",description:"Polkadot-JS Guides about Asset Hub.",keywords:["asset hub","assets","statemine","statemint","polkadot-js"],slug:"../learn-guides-assets"},sidebar:"docs",previous:{title:"Polkadot Vault Guides",permalink:"/docs/learn-guides-vault"},next:{title:"Create Asset Guides",permalink:"/docs/learn-guides-assets-create"}},c={},d=[];function m(e){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsx)(o.A,{})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(m,{...e})}):m()}},67141:(e,t,s)=>{s.d(t,{A:()=>a});var n=s(96540),r=s(74848);const a=function(e){var t,s=e.message,a=(0,n.useState)(!0),o=a[0],i=a[1];return(0,r.jsx)(r.Fragment,{children:o&&(0,r.jsxs)("div",{className:"message-box",children:[(0,r.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,r.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=s,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,s)=>{s.d(t,{A:()=>x});s(96540);var n=s(34164),r=s(26972),a=s(28774),o=s(53465),i=s(16654),l=s(21312),u=s(51107);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=s(74848);function m(e){var t=e.href,s=e.children;return(0,d.jsx)(a.A,{href:t,className:(0,n.A)("card padding--lg",c.cardContainer),children:s})}function p(e){var t=e.href,s=e.icon,r=e.title,a=e.description;return(0,d.jsxs)(m,{href:t,children:[(0,d.jsxs)(u.A,{as:"h2",className:(0,n.A)("text--truncate",c.cardTitle),title:r,children:[s," ",r]}),a&&(0,d.jsx)("p",{className:(0,n.A)("text--truncate",c.cardDescription),title:a,children:a})]})}function f(e){var t,s,n=e.item,a=(0,r.Nr)(n),i=(s=(0,o.W)().selectMessage,function(e){return s(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,d.jsx)(p,{href:a,icon:"\ud83d\uddc3\ufe0f",title:n.label,description:null!=(t=n.description)?t:i(n.items.length)}):null}function h(e){var t,s,n=e.item,a=(0,i.A)(n.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",o=(0,r.cC)(null!=(t=n.docId)?t:void 0);return(0,d.jsx)(p,{href:n.href,icon:a,title:n.label,description:null!=(s=n.description)?s:null==o?void 0:o.description})}function g(e){var t=e.item;switch(t.type){case"link":return(0,d.jsx)(h,{item:t});case"category":return(0,d.jsx)(f,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function b(e){var t=e.className,s=(0,r.$S)();return(0,d.jsx)(x,{items:s.items,className:t})}function x(e){var t=e.items,s=e.className;if(!t)return(0,d.jsx)(b,Object.assign({},e));var a=(0,r.d1)(t);return(0,d.jsx)("section",{className:(0,n.A)("row",s),children:a.map((function(e,t){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(g,{item:e})},t)}))})}},53465:(e,t,s)=>{s.d(t,{W:()=>u});var n=s(96540),r=s(44586),a=["zero","one","two","few","many","other"];function o(e){return a.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:o(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,r.A)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return t=e,s=new Intl.PluralRules(t),{locale:t,pluralForms:o(s.resolvedOptions().pluralCategories),select:function(e){return s.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),i}var t,s}),[e])}function u(){var e=l();return{selectMessage:function(t,s){return function(e,t,s){var n=e.split("|");if(1===n.length)return n[0];n.length>s.pluralForms.length&&console.error("For locale="+s.locale+", a maximum of "+s.pluralForms.length+" plural forms are expected ("+s.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var r=s.select(t),a=s.pluralForms.indexOf(r);return n[Math.min(a,n.length-1)]}(s,t,e)}}}},28453:(e,t,s)=>{s.d(t,{R:()=>o,x:()=>i});var n=s(96540);const r={},a=n.createContext(r);function o(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/12331e8b.12442043.js b/assets/js/12331e8b.12442043.js deleted file mode 100644 index 9d30efd49c23..000000000000 --- a/assets/js/12331e8b.12442043.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2244],{48725:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var o=n(74848),s=n(28453),a=n(67141);const i={id:"polkadotjs",title:"Polkadot-JS Tooling",sidebar_label:"Polkadot-JS Tooling",description:"The Polkadot-JS Tool Collection.",keywords:["polkadotjs","polkadotjs apps","apps UI","extension"],slug:"../polkadotjs"},r=void 0,l={id:"general/polkadotjs",title:"Polkadot-JS Tooling",description:"The Polkadot-JS Tool Collection.",source:"@site/../docs/general/polkadotjs.md",sourceDirName:"general",slug:"/polkadotjs",permalink:"/docs/polkadotjs",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/polkadotjs.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726729579e3,frontMatter:{id:"polkadotjs",title:"Polkadot-JS Tooling",sidebar_label:"Polkadot-JS Tooling",description:"The Polkadot-JS Tool Collection.",keywords:["polkadotjs","polkadotjs apps","apps UI","extension"],slug:"../polkadotjs"},sidebar:"docs",previous:{title:"Polkadot-JS",permalink:"/docs/learn-polkadotjs"},next:{title:"Polkadot-JS UI",permalink:"/docs/polkadotjs-ui"}},d={},c=[{value:"Polkadot-JS UI",id:"polkadot-js-ui",level:2},{value:"Polkadot-JS UI Desktop App",id:"polkadot-js-ui-desktop-app",level:3},{value:"Polkadot-JS Extension",id:"polkadot-js-extension",level:2},{value:"Polkadot-JS Phishing List",id:"polkadot-js-phishing-list",level:2},{value:"Polkadot-JS API",id:"polkadot-js-api",level:2},{value:"Querying On-chain Data",id:"querying-on-chain-data",level:3},{value:"Issuing Extrinsics",id:"issuing-extrinsics",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.a,{href:"https://polkadot.js.org/",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS"})})," is a collection of tools that interfaces with Relay\nChains and parachains in a granular way. Below we describe the different components of Polkadot-JS.\nFor more information about Polkadot-JS you can consult the\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/docs/",children:(0,o.jsx)(t.strong,{children:"official documentation"})}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-ui",children:"Polkadot-JS UI"}),"\n",(0,o.jsx)(t.admonition,{title:"For Developers and Power Users Only",type:"info",children:(0,o.jsxs)(t.p,{children:["Please note that this wallet UI is oriented toward developers and power users. Explore Polkadot with\na secure and user-friendly wallets listed on the\n",(0,o.jsx)(t.a,{href:"https://www.polkadot.network/ecosystem/wallets/",children:"Polkadot website"}),". If you need help using the\nPolkadot-JS UI you can contact the\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/home",children:(0,o.jsx)(t.strong,{children:"Polkadot Support Team"})}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:["The Polkadot-JS UI is an application that loads in your browser. There is a standard DNS\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/",children:(0,o.jsx)(t.strong,{children:"hosted version"})}),", which always has the latest features, and an\n",(0,o.jsx)(t.a,{href:"https://dotapps.io/",children:(0,o.jsx)(t.strong,{children:"IPFS version"})})," that is less frequently updated but is more decentralized.\nThis is also often referred to as Polkadot-JS Apps, UI or the Apps UI. In the Wiki pages we will\nalways refer to Polkadot-JS UI."]}),"\n",(0,o.jsxs)(t.p,{children:["Polkadot-JS Apps has many capabilities that go beyond basic wallet functions such as account\ncreation and sending or receiving transactions. See the ",(0,o.jsx)(t.a,{href:"/docs/polkadotjs-ui",children:(0,o.jsx)(t.strong,{children:"dedicated section"})}),"\nfor more information about the UI."]}),"\n",(0,o.jsx)(t.h3,{id:"polkadot-js-ui-desktop-app",children:"Polkadot-JS UI Desktop App"}),"\n",(0,o.jsxs)(t.p,{children:["The Polkadot-JS UI also exists as a\n",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-js/apps/releases/",children:(0,o.jsx)(t.strong,{children:"desktop application"})})," for Windows, Mac and Linux.\nThe main advantage of using it is that by default it stores encrypted accounts on the filesystem\ninstead of browser's local storage. Local storage is susceptible to attacks using XSS (Cross-Site\nScripting). There's no such risk when with files stored on disk."]}),"\n",(0,o.jsxs)(t.p,{children:["The desktop app uses the ",(0,o.jsx)(t.a,{href:"https://www.electronjs.org/",children:(0,o.jsx)(t.strong,{children:"Electron"})})," framework. It provides the same\nfeatures as web app, the only difference being different account storage."]}),"\n",(0,o.jsx)(t.admonition,{title:"Ledger not supported",type:"info",children:(0,o.jsx)(t.p,{children:"The desktop application does not support Ledger accounts. If you need a cold storage solution you\ncan try Parity Signer (aka Polkadot Vault)."})}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-extension",children:"Polkadot-JS Extension"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/extension/",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS browser extension"})})," is not a wallet ",(0,o.jsx)(t.em,{children:"per se"}),"\nbut an account management tool. It allows you to create accounts and also import accounts from\n",(0,o.jsx)(t.a,{href:"/docs/ledger",children:(0,o.jsx)(t.strong,{children:"Ledger"})})," devices or Parity Signer, allowing the signing of\n",(0,o.jsx)(t.a,{href:"/docs/learn-transactions",children:(0,o.jsx)(t.strong,{children:"extrinsics"})})," using these accounts. It also allows you export\nexisting accounts and restore accounts (given you have the required information to restore them)."]}),"\n",(0,o.jsx)(t.p,{children:"The extension is a robust key storage tool, i.e. even if you clear the cache of your browser your\naccounts will be retained. The extension will recognize any websites that have been flagged for\nmalicious activity. For additional security, the extension will always ask if you want a specific\nwebsite to access the account information on it."}),"\n",(0,o.jsxs)(t.p,{children:["The extension does not let users interact directly with on-chain functions as one would find on a\nwallet app like Metamask, i.e. it does not allow you to transact or do anything else other than\nadding and managing accounts. However, it provides a simple interface for interacting with\nextension-compliant dApps such as the ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS UI"})}),"\nand the ",(0,o.jsx)(t.a,{href:"https://staking.polkadot.cloud/#/overview",children:(0,o.jsx)(t.strong,{children:"Polkadot Staking Dashboard"})}),". Check\n",(0,o.jsx)(t.a,{href:"/docs/wallets-and-extensions",children:"wallets and extensions"})," page for wallets that are capable of\ntransacting on-chain directly."]}),"\n",(0,o.jsx)(t.admonition,{title:"Metadata Updates",type:"info",children:(0,o.jsxs)(t.p,{children:["The browser extension is a tool that interacts with the Polkadot network, but it is disconnected\nfrom it when it is not in use. It is important you\n",(0,o.jsx)(t.a,{href:"/docs/learn-guides-accounts#metadata-updates-with-the-polkadot-js-browser-extension",children:(0,o.jsx)(t.strong,{children:"always check for metadata updates"})}),"\nbefore using the extension or other account management tools such as Parity Signer (aka Polkadot\nVault)."]})}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-phishing-list",children:"Polkadot-JS Phishing List"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/phishing/",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS phishing list"})})," website is a community-driven\ncuration of malicious actors and operators. The Polkadot-JS extension uses this list to warn a user\nabout suspicious URLs and addresses that are part of the list, and automatically blocks the account\naddress."]}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-api",children:"Polkadot-JS API"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-js/api",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS API"})})," is a JavaScript API allowing for\nprograms to interface with the functionalities of Polkadot."]}),"\n",(0,o.jsxs)(t.p,{children:["While interacting with the underlying\n",(0,o.jsx)(t.a,{href:"https://www.npmjs.com/package/@polkadot/api",children:(0,o.jsx)(t.strong,{children:"@polkadot/api"})}),", most interfaces are generated\nautomatically when connecting to an available node. This is quite a departure from many other API\ndesigns where the interfaces are commonly static."]}),"\n",(0,o.jsxs)(t.p,{children:["When the API connects to a node, it initially retrieves the\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/runtime",children:(0,o.jsx)(t.strong,{children:"metadata"})}),' which is used to "decorate" the API based on\nits contents. The metadata provides data in the form of ',(0,o.jsx)(t.code,{children:"api...
"})," where ",(0,o.jsx)(t.code,{children:"type"}),"\nfits into one of the following categories:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"consts"})," - runtime constants (these are not functions so the values are returned directly as they\nare defined by the endpoint)"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"query"})," - chain state values"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"tx"})," - all extrinsics"]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["The metadata also provides information on\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/docs/substrate/events/",children:(0,o.jsx)(t.strong,{children:"events"})}),", which can be queried using the\n",(0,o.jsx)(t.code,{children:"api.query.system.events()"})," interface."]}),"\n",(0,o.jsxs)(t.p,{children:["None of the information contained within the ",(0,o.jsx)(t.code,{children:"api.{consts, query, tx}.."})," endpoints\nare hard-coded in the API. These values are defined by the decoration applied from the initial\nmetadata response and are therefore completely dynamic. This suggests that when you connect to\ndifferent parachains, the metadata and API decoration will change and provide varying interfaces\nbased on the chain."]}),"\n",(0,o.jsxs)(t.p,{children:["A developer can use Polkadot-JS Apps to test code's functionality. Interacting with the Polkadot-JS\ncomes down to either ",(0,o.jsx)(t.a,{href:"#querying-on-chain-data",children:(0,o.jsx)(t.strong,{children:"querying on-chain data"})})," or\n",(0,o.jsx)(t.a,{href:"#issuing-extrinsics",children:(0,o.jsx)(t.strong,{children:"issuing an extrinsic"})}),"."]}),"\n",(0,o.jsx)(t.h3,{id:"querying-on-chain-data",children:"Querying On-chain Data"}),"\n",(0,o.jsx)(t.p,{children:"To populate the Apps UI, the web app queries the Polkadot-JS API. The API then queries a node and\nuses JavaScript to return information that the UI will display on the screen. You can choose which\nnode to connect to by changing it in the upper-left-hand corner of the screen."}),"\n",(0,o.jsxs)(t.p,{children:["Let's see how we can query on-chain data with Polkadot-JS UI on the Polkadot network with an\nexample. To find out the current value for existential deposit, navigate to Developer > Chain\nstate > Constants and query the balances pallet for existential deposit as shown in the snapshot\nbelow. You need to click on the plus button to execute the query. The value displayed is in\n",(0,o.jsx)(t.a,{href:"learn-DOT#polkadot",children:"plancks"})]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"query chain state",src:n(70044).A+"",width:"1728",height:"380"})}),"\n",(0,o.jsx)(t.h3,{id:"issuing-extrinsics",children:"Issuing Extrinsics"}),"\n",(0,o.jsx)(t.p,{children:"Extrinsics are pieces of information that come from outside the chain and are included in a block.\nExtrinsics can be one of three types: inherents, signed, and unsigned transactions."}),"\n",(0,o.jsx)(t.p,{children:"Most extrinsics displayed on Polkadot-JS Apps are signed transactions. Inherits are non-signed and\nnon-gossiped pieces of information included in blocks by the block author, such as timestamps, which\nare \u201ctrue\u201d because a sufficient number of validators have agreed about validity."}),"\n",(0,o.jsx)(t.p,{children:"Unsigned transactions are information that does not require a signature but will require some sort\nof spam prevention, whereas signed transactions are issued by the originator account of a\ntransaction which contains a signature of that account, which will be subject to a fee to include it\non the chain."})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(96540),s=n(74848);const a=function(e){var t,n=e.message,a=(0,o.useState)(!0),i=a[0],r=a[1];return(0,s.jsx)(s.Fragment,{children:i&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},70044:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/chain-state-constant-8663ba40c98411da3308fdaf40cb13ee.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const s={},a=o.createContext(s);function i(e){const t=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/12331e8b.6b478ecf.js b/assets/js/12331e8b.6b478ecf.js new file mode 100644 index 000000000000..ab82847320d6 --- /dev/null +++ b/assets/js/12331e8b.6b478ecf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2244],{48725:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var o=n(74848),s=n(28453),a=n(67141);const i={id:"polkadotjs",title:"Polkadot-JS Tooling",sidebar_label:"Polkadot-JS Tooling",description:"The Polkadot-JS Tool Collection.",keywords:["polkadotjs","polkadotjs apps","apps UI","extension"],slug:"../polkadotjs"},r=void 0,l={id:"general/polkadotjs",title:"Polkadot-JS Tooling",description:"The Polkadot-JS Tool Collection.",source:"@site/../docs/general/polkadotjs.md",sourceDirName:"general",slug:"/polkadotjs",permalink:"/docs/polkadotjs",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/polkadotjs.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"polkadotjs",title:"Polkadot-JS Tooling",sidebar_label:"Polkadot-JS Tooling",description:"The Polkadot-JS Tool Collection.",keywords:["polkadotjs","polkadotjs apps","apps UI","extension"],slug:"../polkadotjs"},sidebar:"docs",previous:{title:"Polkadot-JS",permalink:"/docs/learn-polkadotjs"},next:{title:"Polkadot-JS UI",permalink:"/docs/polkadotjs-ui"}},d={},c=[{value:"Polkadot-JS UI",id:"polkadot-js-ui",level:2},{value:"Polkadot-JS UI Desktop App",id:"polkadot-js-ui-desktop-app",level:3},{value:"Polkadot-JS Extension",id:"polkadot-js-extension",level:2},{value:"Polkadot-JS Phishing List",id:"polkadot-js-phishing-list",level:2},{value:"Polkadot-JS API",id:"polkadot-js-api",level:2},{value:"Querying On-chain Data",id:"querying-on-chain-data",level:3},{value:"Issuing Extrinsics",id:"issuing-extrinsics",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.a,{href:"https://polkadot.js.org/",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS"})})," is a collection of tools that interfaces with Relay\nChains and parachains in a granular way. Below we describe the different components of Polkadot-JS.\nFor more information about Polkadot-JS you can consult the\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/docs/",children:(0,o.jsx)(t.strong,{children:"official documentation"})}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-ui",children:"Polkadot-JS UI"}),"\n",(0,o.jsx)(t.admonition,{title:"For Developers and Power Users Only",type:"info",children:(0,o.jsxs)(t.p,{children:["Please note that this wallet UI is oriented toward developers and power users. Explore Polkadot with\na secure and user-friendly wallets listed on the\n",(0,o.jsx)(t.a,{href:"https://www.polkadot.network/ecosystem/wallets/",children:"Polkadot website"}),". If you need help using the\nPolkadot-JS UI you can contact the\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/home",children:(0,o.jsx)(t.strong,{children:"Polkadot Support Team"})}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:["The Polkadot-JS UI is an application that loads in your browser. There is a standard DNS\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/",children:(0,o.jsx)(t.strong,{children:"hosted version"})}),", which always has the latest features, and an\n",(0,o.jsx)(t.a,{href:"https://dotapps.io/",children:(0,o.jsx)(t.strong,{children:"IPFS version"})})," that is less frequently updated but is more decentralized.\nThis is also often referred to as Polkadot-JS Apps, UI or the Apps UI. In the Wiki pages we will\nalways refer to Polkadot-JS UI."]}),"\n",(0,o.jsxs)(t.p,{children:["Polkadot-JS Apps has many capabilities that go beyond basic wallet functions such as account\ncreation and sending or receiving transactions. See the ",(0,o.jsx)(t.a,{href:"/docs/polkadotjs-ui",children:(0,o.jsx)(t.strong,{children:"dedicated section"})}),"\nfor more information about the UI."]}),"\n",(0,o.jsx)(t.h3,{id:"polkadot-js-ui-desktop-app",children:"Polkadot-JS UI Desktop App"}),"\n",(0,o.jsxs)(t.p,{children:["The Polkadot-JS UI also exists as a\n",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-js/apps/releases/",children:(0,o.jsx)(t.strong,{children:"desktop application"})})," for Windows, Mac and Linux.\nThe main advantage of using it is that by default it stores encrypted accounts on the filesystem\ninstead of browser's local storage. Local storage is susceptible to attacks using XSS (Cross-Site\nScripting). There's no such risk when with files stored on disk."]}),"\n",(0,o.jsxs)(t.p,{children:["The desktop app uses the ",(0,o.jsx)(t.a,{href:"https://www.electronjs.org/",children:(0,o.jsx)(t.strong,{children:"Electron"})})," framework. It provides the same\nfeatures as web app, the only difference being different account storage."]}),"\n",(0,o.jsx)(t.admonition,{title:"Ledger not supported",type:"info",children:(0,o.jsx)(t.p,{children:"The desktop application does not support Ledger accounts. If you need a cold storage solution you\ncan try Parity Signer (aka Polkadot Vault)."})}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-extension",children:"Polkadot-JS Extension"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/extension/",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS browser extension"})})," is not a wallet ",(0,o.jsx)(t.em,{children:"per se"}),"\nbut an account management tool. It allows you to create accounts and also import accounts from\n",(0,o.jsx)(t.a,{href:"/docs/ledger",children:(0,o.jsx)(t.strong,{children:"Ledger"})})," devices or Parity Signer, allowing the signing of\n",(0,o.jsx)(t.a,{href:"/docs/learn-transactions",children:(0,o.jsx)(t.strong,{children:"extrinsics"})})," using these accounts. It also allows you export\nexisting accounts and restore accounts (given you have the required information to restore them)."]}),"\n",(0,o.jsx)(t.p,{children:"The extension is a robust key storage tool, i.e. even if you clear the cache of your browser your\naccounts will be retained. The extension will recognize any websites that have been flagged for\nmalicious activity. For additional security, the extension will always ask if you want a specific\nwebsite to access the account information on it."}),"\n",(0,o.jsxs)(t.p,{children:["The extension does not let users interact directly with on-chain functions as one would find on a\nwallet app like Metamask, i.e. it does not allow you to transact or do anything else other than\nadding and managing accounts. However, it provides a simple interface for interacting with\nextension-compliant dApps such as the ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS UI"})}),"\nand the ",(0,o.jsx)(t.a,{href:"https://staking.polkadot.cloud/#/overview",children:(0,o.jsx)(t.strong,{children:"Polkadot Staking Dashboard"})}),". Check\n",(0,o.jsx)(t.a,{href:"/docs/wallets-and-extensions",children:"wallets and extensions"})," page for wallets that are capable of\ntransacting on-chain directly."]}),"\n",(0,o.jsx)(t.admonition,{title:"Metadata Updates",type:"info",children:(0,o.jsxs)(t.p,{children:["The browser extension is a tool that interacts with the Polkadot network, but it is disconnected\nfrom it when it is not in use. It is important you\n",(0,o.jsx)(t.a,{href:"/docs/learn-guides-accounts#metadata-updates-with-the-polkadot-js-browser-extension",children:(0,o.jsx)(t.strong,{children:"always check for metadata updates"})}),"\nbefore using the extension or other account management tools such as Parity Signer (aka Polkadot\nVault)."]})}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-phishing-list",children:"Polkadot-JS Phishing List"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/phishing/",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS phishing list"})})," website is a community-driven\ncuration of malicious actors and operators. The Polkadot-JS extension uses this list to warn a user\nabout suspicious URLs and addresses that are part of the list, and automatically blocks the account\naddress."]}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-api",children:"Polkadot-JS API"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.a,{href:"https://github.com/polkadot-js/api",children:(0,o.jsx)(t.strong,{children:"Polkadot-JS API"})})," is a JavaScript API allowing for\nprograms to interface with the functionalities of Polkadot."]}),"\n",(0,o.jsxs)(t.p,{children:["While interacting with the underlying\n",(0,o.jsx)(t.a,{href:"https://www.npmjs.com/package/@polkadot/api",children:(0,o.jsx)(t.strong,{children:"@polkadot/api"})}),", most interfaces are generated\nautomatically when connecting to an available node. This is quite a departure from many other API\ndesigns where the interfaces are commonly static."]}),"\n",(0,o.jsxs)(t.p,{children:["When the API connects to a node, it initially retrieves the\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/runtime",children:(0,o.jsx)(t.strong,{children:"metadata"})}),' which is used to "decorate" the API based on\nits contents. The metadata provides data in the form of ',(0,o.jsx)(t.code,{children:"api...
"})," where ",(0,o.jsx)(t.code,{children:"type"}),"\nfits into one of the following categories:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"consts"})," - runtime constants (these are not functions so the values are returned directly as they\nare defined by the endpoint)"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"query"})," - chain state values"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"tx"})," - all extrinsics"]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["The metadata also provides information on\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/docs/substrate/events/",children:(0,o.jsx)(t.strong,{children:"events"})}),", which can be queried using the\n",(0,o.jsx)(t.code,{children:"api.query.system.events()"})," interface."]}),"\n",(0,o.jsxs)(t.p,{children:["None of the information contained within the ",(0,o.jsx)(t.code,{children:"api.{consts, query, tx}.."})," endpoints\nare hard-coded in the API. These values are defined by the decoration applied from the initial\nmetadata response and are therefore completely dynamic. This suggests that when you connect to\ndifferent parachains, the metadata and API decoration will change and provide varying interfaces\nbased on the chain."]}),"\n",(0,o.jsxs)(t.p,{children:["A developer can use Polkadot-JS Apps to test code's functionality. Interacting with the Polkadot-JS\ncomes down to either ",(0,o.jsx)(t.a,{href:"#querying-on-chain-data",children:(0,o.jsx)(t.strong,{children:"querying on-chain data"})})," or\n",(0,o.jsx)(t.a,{href:"#issuing-extrinsics",children:(0,o.jsx)(t.strong,{children:"issuing an extrinsic"})}),"."]}),"\n",(0,o.jsx)(t.h3,{id:"querying-on-chain-data",children:"Querying On-chain Data"}),"\n",(0,o.jsx)(t.p,{children:"To populate the Apps UI, the web app queries the Polkadot-JS API. The API then queries a node and\nuses JavaScript to return information that the UI will display on the screen. You can choose which\nnode to connect to by changing it in the upper-left-hand corner of the screen."}),"\n",(0,o.jsxs)(t.p,{children:["Let's see how we can query on-chain data with Polkadot-JS UI on the Polkadot network with an\nexample. To find out the current value for existential deposit, navigate to Developer > Chain\nstate > Constants and query the balances pallet for existential deposit as shown in the snapshot\nbelow. You need to click on the plus button to execute the query. The value displayed is in\n",(0,o.jsx)(t.a,{href:"learn-DOT#polkadot",children:"plancks"})]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"query chain state",src:n(70044).A+"",width:"1728",height:"380"})}),"\n",(0,o.jsx)(t.h3,{id:"issuing-extrinsics",children:"Issuing Extrinsics"}),"\n",(0,o.jsx)(t.p,{children:"Extrinsics are pieces of information that come from outside the chain and are included in a block.\nExtrinsics can be one of three types: inherents, signed, and unsigned transactions."}),"\n",(0,o.jsx)(t.p,{children:"Most extrinsics displayed on Polkadot-JS Apps are signed transactions. Inherits are non-signed and\nnon-gossiped pieces of information included in blocks by the block author, such as timestamps, which\nare \u201ctrue\u201d because a sufficient number of validators have agreed about validity."}),"\n",(0,o.jsx)(t.p,{children:"Unsigned transactions are information that does not require a signature but will require some sort\nof spam prevention, whereas signed transactions are issued by the originator account of a\ntransaction which contains a signature of that account, which will be subject to a fee to include it\non the chain."})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(96540),s=n(74848);const a=function(e){var t,n=e.message,a=(0,o.useState)(!0),i=a[0],r=a[1];return(0,s.jsx)(s.Fragment,{children:i&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},70044:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/chain-state-constant-8663ba40c98411da3308fdaf40cb13ee.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const s={},a=o.createContext(s);function i(e){const t=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/21899dd2.1932bbe4.js b/assets/js/21899dd2.1932bbe4.js deleted file mode 100644 index ac20f243a3cd..000000000000 --- a/assets/js/21899dd2.1932bbe4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5168],{34495:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>h,contentTitle:()=>r,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>l});var t=n(74848),i=n(28453),o=n(67141);const s={id:"learn-parachains",title:"Parachains",sidebar_label:"Introduction to Parachains",description:"An Introduction to Polkadot's Parachains.",keywords:["parachains","application-specific","sharding","on-demand","parathread"],slug:"../learn-parachains"},r=void 0,c={id:"learn/learn-parachains",title:"Parachains",description:"An Introduction to Polkadot's Parachains.",source:"@site/../docs/learn/learn-parachains.md",sourceDirName:"learn",slug:"/learn-parachains",permalink:"/docs/learn-parachains",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-parachains.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729152709e3,frontMatter:{id:"learn-parachains",title:"Parachains",sidebar_label:"Introduction to Parachains",description:"An Introduction to Polkadot's Parachains.",keywords:["parachains","application-specific","sharding","on-demand","parathread"],slug:"../learn-parachains"},sidebar:"docs",previous:{title:"Parachains",permalink:"/docs/learn-parachains-index"},next:{title:"Protocol Overview",permalink:"/docs/learn-parachains-protocol"}},h={},l=[{value:"Definition of a Parachain",id:"definition-of-a-parachain",level:2},{value:"State Transitions",id:"state-transitions",level:3},{value:"Why Parachains?",id:"why-parachains",level:2},{value:"Parachain Benefits",id:"parachain-benefits",level:3},{value:"Shared Security",id:"shared-security",level:3},{value:"PoW vs Parachain Model",id:"pow-vs-parachain-model",level:3},{value:"Parachain Economies",id:"parachain-economies",level:2},{value:"Coretime",id:"coretime",level:2},{value:"Coretime Expiration",id:"coretime-expiration",level:3},{value:"System Parachains",id:"system-parachains",level:2},{value:"On-demand Parachains",id:"on-demand-parachains",level:2},{value:"Historical Context of On-demand parachains",id:"historical-context-of-on-demand-parachains",level:3},{value:"Parachains vs. On-demand Parachains",id:"parachains-vs-on-demand-parachains",level:3},{value:"Parachains' Use Cases",id:"parachains-use-cases",level:2},{value:"Parachain Host",id:"parachain-host",level:2},{value:"Parachain Hubs",id:"parachain-hubs",level:2},{value:"Resources",id:"resources",level:2}];function d(e){const a={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.A,{message:"[Agile Coretime](./learn-agile-coretime.md) is activated on the network, and parachain slot auctions and crowdloans have been deprecated. For existing parachains, the remainder of the lease is automatically converted to coretime. See more information [here](./learn-agile-coretime.md#implementation). For decentralized, transparent, and regulatory-compliant fundraising within the ecosystem, check out the [Polimec parachain](https://www.polimec.org/)."}),"\n",(0,t.jsx)(a.admonition,{title:"Testing on Paseo",type:"info",children:(0,t.jsxs)(a.p,{children:["For information on how to test coretime functionalities on Paseo, please see the\n",(0,t.jsx)(a.a,{href:"/docs/build-pdk#testing-a-parachain",children:"Paseo Content"})," on the parachain development\nguide."]})}),"\n",(0,t.jsx)(a.h2,{id:"definition-of-a-parachain",children:"Definition of a Parachain"}),"\n",(0,t.jsx)(a.p,{children:"A parachain is an application-specific data structure that is globally coherent and can be validated\nby the validators of the relay chain. They take their name from the concept of parallelized chains\nthat run parallel to the relay chain. Most commonly, a parachain will take the form of a blockchain,\nbut there is no specific need for them to be actual blockchains."}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.img,{alt:"One parachain",src:n(52608).A+"",width:"1920",height:"800"})}),"\n",(0,t.jsxs)(a.p,{children:["Due to their parallel nature, they can parallelize transaction processing and achieve scalability of\nthe protocol. They ",(0,t.jsx)(a.a,{href:"#shared-security",children:"inherit the security"})," of the entire network and can\ncommunicate with other parachains through the ",(0,t.jsx)(a.a,{href:"/docs/learn-xcm",children:"XCM"})," format."]}),"\n",(0,t.jsxs)(a.p,{children:["Parachains are maintained by a network maintainer known as a ",(0,t.jsx)(a.a,{href:"/docs/learn-collator",children:"collator"}),". The role\nof the collator node is to maintain a full node of the parachain, retain all necessary information\nabout the parachain, and produce new block candidates to pass to the relay chain validators for\nverification and inclusion in the shared state. The incentivization of a collator node is an\nimplementation detail of the parachain. They are not required to be staked on the relay chain or own\nthe native token unless stipulated by the parachain implementation."]}),"\n",(0,t.jsx)(a.h3,{id:"state-transitions",children:"State Transitions"}),"\n",(0,t.jsxs)(a.p,{children:["Like other blockchains, parachains are ",(0,t.jsx)(a.strong,{children:"deterministic state machines"}),". Each parachain has a\n",(0,t.jsx)(a.strong,{children:"state"}),", executes a batch of transactions grouped into a block, and achieves a new state. Joe\nPetrowski provided in ",(0,t.jsx)(a.a,{href:"https://polkadot.network/blog/the-path-of-a-parachain-block/",children:"this article"})," a\ngood analogy of a state with a light switch that can be either on or off, which is one of the\nsimplest examples of how a state machine functions. Each parachain has its own state, and the Relay\nChain links all those states into one state, i.e. a state of states. A multi-chain network like\nPolkadot can be viewed like one computer's state with many light switches where a ",(0,t.jsx)(a.strong,{children:"state transition\nfunction"})," is the logic to decide which switches should be toggled. Parachains have their own\ntransition rule, separate economies, governance mechanisms, and users."]}),"\n",(0,t.jsxs)(a.p,{children:["A parachain's state is stored in a ",(0,t.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/Merkle_tree",children:"Merkle tree"}),". Merkle\ntrees have the convenient property that if some values within the tree change, this will be\nreflected in the Merkle root (in this case, the state root). One can verify the change by only\nlooking at the new values and the paths that are affected within the tree."]}),"\n",(0,t.jsxs)(a.p,{children:["The Polkadot Host requires that the state transitions performed on parachains be specified as a\n",(0,t.jsx)(a.a,{href:"/docs/learn-wasm",children:"Wasm"})," executable. Proofs of new state transitions that occur on a parachain must be\nvalidated against the registered state transition function (STF) that is stored on the relay chain\nby the validators before the relay chain acknowledges a state transition has occurred on a\nparachain. The key constraint regarding the logic of a parachain is that it must be verifiable by\nthe relay chain validators. Verification most commonly takes the form of a bundled proof of a state\ntransition known as a Proof-of-Verification (PoV) block, which is submitted for checking to the\nvalidators from one or more parachain collators."]}),"\n",(0,t.jsx)(a.h2,{id:"why-parachains",children:"Why Parachains?"}),"\n",(0,t.jsx)(a.p,{children:"Parachains are a solution to two fundamental problems in blockchains:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Scalability"}),": Having one blockchain for many purposes makes it difficult to scale as future\nimplementations and upgrades will likely advantage some purposes and disadvantage others.\nConversely, having different blockchains will allow them to implement features without affecting\nother chains."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Flexibility"}),": It is reasonable to state a blockchain will either be really good at solving one\nproblem or not so good at trying to solve many problems. A blockchain specializing in solving a\nspecific problem has more leverage toward itself and its users. Parachains are purpose-built\nblockchains are highly specialized and can take advantage of each other through cooperation."]}),"\n"]}),"\n",(0,t.jsx)(a.h3,{id:"parachain-benefits",children:"Parachain Benefits"}),"\n",(0,t.jsx)(a.p,{children:"Parachains contain their own runtime/STF logic and benefit from the shared security and the\ncross-consensus messaging provided by the relay chain. Parachains permit high flexibility and\ncustomization but require more effort to create and maintain over time. A production-grade parachain\nis typically more involved to create due to the complexity involved in blockchain networks'\ntechnical and economic aspects."}),"\n",(0,t.jsx)(a.p,{children:"Parachains grant the creators more space to build the monetary system and other chain aspects from\nthe ground up. They will allow for a more concise and efficient execution of complex logic than a\nsmart contract platform could offer. Parachains also provide more flexibility in the form of\ngovernance and can perform complete upgrades in a less controversial way than the current process of\nhard forks."}),"\n",(0,t.jsx)(a.p,{children:"Some examples of features you can have on a parachain or parathread:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"Custom fee structure (for example, pay a flat transaction fee or pay per byte)."}),"\n",(0,t.jsx)(a.li,{children:"Shared security and finalization via the relay chain (Polkadot or Kusama)."}),"\n",(0,t.jsx)(a.li,{children:"Custom monetary policy for the native token and local economy."}),"\n",(0,t.jsx)(a.li,{children:"Treasury to be funded through transitions in your state function."}),"\n",(0,t.jsx)(a.li,{children:"A governance mechanism that could manage a DAO that is responsible for allocating your on-chain\ntreasury."}),"\n"]}),"\n",(0,t.jsx)(a.h3,{id:"shared-security",children:"Shared Security"}),"\n",(0,t.jsxs)(a.p,{children:["Shared security, sometimes referred as ",(0,t.jsx)(a.em,{children:"pooled security"}),", is one of the unique value propositions\nfor chains considering becoming a ",(0,t.jsx)(a.a,{href:"/docs/learn-parachains",children:"parachain"})," and joining the network. On a\nhigh level, shared security means that all parachains that are connected to the relay chain by\naccessing a core will benefit from the economic security provided by the relay chain\n",(0,t.jsx)(a.a,{href:"/docs/learn-validator",children:"validators"}),"."]}),"\n",(0,t.jsxs)(a.p,{children:["The notion of shared security is different from inter-chain protocols that build on an architecture\nof bridges. For bridge protocols, each chain is considered sovereign and must maintain its own\nvalidator set and economic security. One concern in these protocols is the point of scalability of\nsecurity. For example, one suggestion to scale blockchains is that of ",(0,t.jsx)(a.em,{children:"scale by altcoins,"})," which\nsuggests that transaction volumes will filter down to lower market cap altcoins as the bigger ones\nfill their blocks. A major flaw in this idea is that the lower market cap coins will have less\neconomic security attached and be easier to attack. A real-life example of a 51% attack occurred\nrecently (\n",(0,t.jsx)(a.a,{href:"https://cointelegraph.com/news/ethereum-classic-51-attack-the-reality-of-proof-of-work",children:"Ethereum Classic attack on January 10, 2019"}),"\n), in which an unknown attacker double spent 219_500 ETC (~1.1 million USD). This was followed by\ntwo more 51% attacks on ETC."]}),"\n",(0,t.jsx)(a.p,{children:"Polkadot overcomes security scalability concerns since it gravitates all the economic incentives to\nthe relay chain and allows the parachains to tap into stronger guarantees at genesis. Sovereign\nchains must expend much more effort to grow the value of their coin so that it is sufficiently\nsecure against well-funded attackers."}),"\n",(0,t.jsx)(a.h3,{id:"pow-vs-parachain-model",children:"PoW vs Parachain Model"}),"\n",(0,t.jsx)(a.p,{children:"Let's compare the standard sovereign security model that exists on current proof-of-work (PoW)\nchains to Polkadot's shared security model. Bitcoin, Zcash, and their derivatives, must bootstrap\ntheir independent network of miners and maintain a competitive portion of honest hashing power.\nSince mining is becoming a larger industry that increasingly centralizes key players, it is becoming\nmore real that a single actor may control enough hash power to attack a chain."}),"\n",(0,t.jsxs)(a.p,{children:["This means that smaller chains that cannot maintain a secure amount of hash power on their networks\ncould potentially be attacked by a large mining cartel at the simple whim of redirecting its hash\npower away from Bitcoin and toward a new and less secure chain.\n",(0,t.jsx)(a.a,{href:"https://www.crypto51.app",children:"51% attacks are viable today"})," with attacks having been reported on\nEthereum Classic (see above),\n",(0,t.jsx)(a.a,{href:"https://coincentral.com/verge-suffers-51-attack-hard-forks-in-response/",children:"Verge"}),",\n",(0,t.jsx)(a.a,{href:"https://bitcoingold.org/responding-to-attacks/",children:"Bitcoin Gold"}),", and other cryptocurrencies."]}),"\n",(0,t.jsx)(a.p,{children:"On Polkadot, this disparity between chain security will not be present. When a parachain connects to\nthe relay chain, validators become the securers of that parachain's state transitions. The parachain\nwill only have the overhead of running a few collator nodes to keep the validators informed with the\nlatest state transitions and proofs/witness. Validators will then check these for the parachains to\nwhich they are assigned. In this way, new parachains instantly benefit from the overall security\nprovided by the relay chain even if they have just been launched."}),"\n",(0,t.jsx)(a.h2,{id:"parachain-economies",children:"Parachain Economies"}),"\n",(0,t.jsx)(a.p,{children:"Parachains may have their economies with their native tokens. Schemes such as Proof-of-Stake are\nusually used to select the validator set to handle validation and finalization; parachains will not\nbe required to do either of those things. However, since Polkadot is not overly particular about\nwhat the parachain can implement, it may be the choice of the parachain to implement a staking\ntoken, but it's not generally necessary."}),"\n",(0,t.jsx)(a.p,{children:"Collators may be incentivized through the inflation of a native parachain token. There may be other\nways to incentivize the collator nodes that do not involve inflating the native parachain token."}),"\n",(0,t.jsx)(a.p,{children:"Transaction fees in a native parachain token can also be an implementation choice of parachains.\nPolkadot makes no hard and fast rules for how the parachains decide on the original validity of\ntransactions. For example, a parachain may be implemented so that transactions must pay a minimum\nfee to collators to be valid. The relay chain will enforce this validity. Similarly, a parachain\ncould not include that in their implementation, and the relay chain would still enforce its\nvalidity."}),"\n",(0,t.jsx)(a.p,{children:"Parachains are not required to have their token. If they do, it is up to the parachain (and not the\nrelay chain) to make the economic case for their token."}),"\n",(0,t.jsx)(a.h2,{id:"coretime",children:"Coretime"}),"\n",(0,t.jsx)(a.p,{children:"Parachains can access the relay chain via cores."}),"\n",(0,t.jsx)(a.p,{children:"There are two ways to allocate relay chain cores:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:["Via Governance only to ",(0,t.jsx)(a.a,{href:"/docs/learn-system-chains",children:"system chains"}),"."]}),"\n",(0,t.jsxs)(a.li,{children:["Via ",(0,t.jsx)(a.a,{href:"/docs/learn-agile-coretime",children:"coretime"})," purchase with DOT (KSM on Kusama) for non-system chains.\nCoretime is used to rent computation time on a relay chain core. This is the only way to access\nPolkadot's shared security and interoperability."]}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"#system-parachains",children:"System parachains"})," are allocated by Polkadot's on-chain\n",(0,t.jsx)(a.a,{href:"/docs/learn-polkadot-opengov",children:"governance"})," and are part of the network's protocol, such as bridges to\nother networks or chains. These typically do not have an economic model and help remove transactions\nfrom the relay chain, allowing for more efficient parachain processing."]}),"\n",(0,t.jsx)(a.p,{children:"Non-system chains can access the relay chain's cores via bulk or on-demand coretime purchased with\nDOT (or KSM on Kusama)."}),"\n",(0,t.jsx)(a.h3,{id:"coretime-expiration",children:"Coretime Expiration"}),"\n",(0,t.jsxs)(a.p,{children:["The DOT (or KSM on Kusama) used to purchase coretime are burned. Before the coretime expires,\nparachains can renew it at a fixed cost through a bulk coretime purchase. If the parachain does not\npurchase bulk coretime, it has an option to purchase coretime on-demand (at a variable price per\nblock, depending on the demand and other market conditions) when they need to access the relay\nchain. Parachains without coretime to extend time on a relay chain core will be deprecated to the\nstatus of a parathread (i.e., a chain with a registered ",(0,t.jsx)(a.code,{children:"ParaID"})," but without access to a core)."]}),"\n",(0,t.jsx)(a.h2,{id:"system-parachains",children:"System Parachains"}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"/docs/learn-system-chains",children:"System parachains"})," are parachains that use execution cores allocated by\nthe network's governance. These chains remove transactions from the relay chain, allowing network\nvalidators to allocate resources to validating parachains. System chains are Polkadot using its\nscaling technology to host itself."]}),"\n",(0,t.jsx)(a.h2,{id:"on-demand-parachains",children:"On-demand Parachains"}),"\n",(0,t.jsx)(a.admonition,{title:"On-demand parachains were previously named parathreads",type:"info",children:(0,t.jsxs)(a.p,{children:["On-demand parachains (previously called parathreads) are parachains that acquire\n",(0,t.jsx)(a.a,{href:"/docs/learn-agile-coretime#on-demand-coretime",children:"on-demand coretime"}),"."]})}),"\n",(0,t.jsxs)(a.p,{children:["On-demand parachains temporarily participate (on a block by block basis) in network security without\nneeding to lease a dedicated relay chain core. This is done through economically sharing the scarce\nresource of a core among several competing resources (parachains). Chains that otherwise would not\nbe able to acquire a full core or do not find it economically sensible to do so, can participate in\nshared security, as the ",(0,t.jsx)(a.a,{href:"/docs/learn-agile-coretime#on-demand-coretime",children:"on-demand coretime"})," offers a\ngraceful off-ramp to parachains that no longer require a dedicated core, but would like to continue\nusing the relay chain."]}),"\n",(0,t.jsx)(a.h3,{id:"historical-context-of-on-demand-parachains",children:"Historical Context of On-demand parachains"}),"\n",(0,t.jsxs)(a.p,{children:["According to ",(0,t.jsx)(a.a,{href:"https://v.douyu.com/show/a4Jj7llO5q47Dk01",children:"this talk"})," in Chengdu back in 2019, the\norigin of the idea for on-demand parachains came from similar notions in the limited resource of\nmemory on early personal computers of the late '80s and '90s. Since computers have a limited amount\nof physical memory, when an application needs more, the computer can create virtual memory by using\n",(0,t.jsx)(a.em,{children:"swap space"})," on a hard disk. Swap space allows the capacity of a computer's memory to expand and for\nmore processes to run concurrently with the trade-off that some processes will take longer to\nprogress."]}),"\n",(0,t.jsx)(a.h3,{id:"parachains-vs-on-demand-parachains",children:"Parachains vs. On-demand Parachains"}),"\n",(0,t.jsx)(a.p,{children:"Parachains and on-demand parachains are very similar from a development perspective. One can imagine\nthat a chain developed with Substrate can at different points in its lifetime assume one of three\nstates:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"an independent chain with secured bridge,"}),"\n",(0,t.jsx)(a.li,{children:"a parachain continuously connected to the relay chain,"}),"\n",(0,t.jsx)(a.li,{children:"or a parachain intermittently connected to the relay chain (i.e. on-demand)"}),"\n"]}),"\n",(0,t.jsx)(a.p,{children:"It can switch between these states with relatively minimal effort since the difference is more of an\neconomic distinction than a technological one."}),"\n",(0,t.jsxs)(a.p,{children:["On-demand parachains have the exact same benefits for connecting to the relay chain that a full\nparachain has. Namely, it is able to send messages to other para-objects through\n",(0,t.jsx)(a.a,{href:"/docs/learn-xcm###XCMP",children:"XCMP"})," and it is secured under the full economic security of the relay chain\nvalidator set."]}),"\n",(0,t.jsx)(a.h2,{id:"parachains-use-cases",children:"Parachains' Use Cases"}),"\n",(0,t.jsx)(a.p,{children:"Note that we still have to see the true potential of parachains and what it is listed below are just\na few examples."}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Encrypted Consortium Chains"}),": These are possibly private chains that do not leak any\ninformation to the public but still can be interacted with trustlessly due to the nature of the\nXCMP protocol."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"High-Frequency Chains"}),": These chains can compute many transactions in a short amount of time by\ntaking certain trade-offs or making optimizations."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Privacy Chains"}),": These chains do not leak any information to the public through novel\ncryptography."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Smart Contract Chains"}),": These chains can have additional logic implemented through the\ndeployment of code known as ",(0,t.jsx)(a.em,{children:"smart contracts"}),"."]}),"\n"]}),"\n",(0,t.jsx)(a.h2,{id:"parachain-host",children:"Parachain Host"}),"\n",(0,t.jsxs)(a.p,{children:["A blockchain is a ",(0,t.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/Directed_acyclic_graph",children:"Directed Acyclic Graph"}),"\n(DAG) of state transitions, where every added block can be viewed as the head of the chain or fork\nwith cumulative state. All paths through the DAG terminate at the Genesis Block. A blockchain is a\ntree, as each block can have only one parent."]}),"\n",(0,t.jsx)(a.p,{children:"A blockchain network is made of nodes that have a view of many forks of the chain and must decide\nwhich fork to follow. To construct the parachain host we need to answer two categories of questions\naddressed by two different components:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:["\n",(0,t.jsxs)(a.p,{children:["What is the state transition function of the blockchain? This is handled by the ",(0,t.jsx)(a.strong,{children:"Runtime"}),", which\ndefines the state transition logic of the chain. The Runtime logic is divided into:"]}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Modules"})," encapsulate particular behavior of the protocol and consist of:","\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"Storage"}),"\n",(0,t.jsx)(a.li,{children:"Routines are invoked by entry points and other modules upon block initialization or closing.\nRoutines can alter the storage of a module."}),"\n",(0,t.jsx)(a.li,{children:"The entry point defines how new information is introduced to a module and can limit the origin\nfrom which they are called (user, root, parachain)."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"API"})," provides means for the node-side behavior to extract meaningful information from the\nstate of a single fork."]}),"\n"]}),"\n",(0,t.jsx)(a.admonition,{type:"info",children:(0,t.jsxs)(a.p,{children:["The Polkadot Parachain Host Implementers' Guide provides details about\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/runtime/index.html",children:"Runtime Architecture"})," and\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/runtime-api/index.html",children:"Runtime API"}),"."]})}),"\n"]}),"\n",(0,t.jsxs)(a.li,{children:["\n",(0,t.jsxs)(a.p,{children:["Knowing various forks of the blockchain, what behaviors should a node take? What information\nshould a node extract from the state of which forks, and how should that information be used? This\nis handled by the ",(0,t.jsx)(a.strong,{children:"Node-side behavior"}),", which defines all activities a node undertakes given its\nview of the blockchain. The node-side behavior can be divided into two categories:"]}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Networking behaviors"}),", relate to how information is distributed between nodes but not how the\ninformation is used afterward."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Core behaviors"}),", relate to internal work that a specific node does. Such behavior cares about\nthat information is ",(0,t.jsx)(a.em,{children:"distributed"})," and ",(0,t.jsx)(a.em,{children:"received"}),", but not how these two are achieved."]}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:["These two categories often interact, but they can be heavily abstracted from each other. The\nnode-side behavior is split into various ",(0,t.jsx)(a.strong,{children:"subsystems"}),", which perform a particular category of\nwork. Subsystems can communicate with each other through an\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/overseer.html",children:"Overseer"})," that prevents race\nconditions."]}),"\n",(0,t.jsxs)(a.admonition,{type:"info",children:[(0,t.jsxs)(a.p,{children:["The Polkadot Parachain Host Implementers' Guide provides details about\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/index.html",children:"node architecture"})," the main\nsubsystems:"]}),(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/collators/index.html",children:"Collator subsystem"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/backing/index.html",children:"Backing subsystem"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/availability/index.html",children:"Availability subsystem"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/approval/index.html",children:"Approval subsystem"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/disputes/index.html",children:"Dispute subsystem"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/utility/index.html",children:"Utility subsystem"})}),"\n"]})]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:["The Runtime and Node-side behavior are dependent on each other. The Runtime depends on Node-side\nbehavior to author blocks, and to include ",(0,t.jsx)(a.a,{href:"/docs/learn-transactions",children:"extrinsics"})," which trigger the\ncorrect entry points. The Node-side behavior relies on the Runtime APIs to extract information\nnecessary to determine which action to take."]}),"\n",(0,t.jsx)(a.h2,{id:"parachain-hubs",children:"Parachain Hubs"}),"\n",(0,t.jsx)(a.p,{children:"While the relay chain enables crosschain functionality amongst the parachains, it necessitates that\nthere is some latency between the dispatch of a message from one parachain until the destination\nparachain receives the message. In the optimistic scenario, the latency for this message should be\nat least two blocks - one block for the message to be dispatched and one block for the receiving\nparachain to process and produce a block that acts upon the message. However, in some cases, we may\nsee that the latency for messages is higher if many messages are in queue to be processed or if no\nnodes are running both parachain networks that can quickly gossip the message across the networks."}),"\n",(0,t.jsxs)(a.p,{children:["Due to the necessary latency in sending crosschain messages, some parachains plan to become ",(0,t.jsx)(a.em,{children:"hubs"}),"\nfor an entire industry (see the ",(0,t.jsx)(a.a,{href:"/docs/learn-assets",children:"Asset Hub"})," and\n",(0,t.jsx)(a.a,{href:"/docs/learn-system-chains#bridge-hub",children:"Bridge Hub"}),"). For example, many DeFi applications could take\nadvantage of a property known as ",(0,t.jsx)(a.em,{children:"composability"})," which means that functions of one application can\nbe synergistically composed with others to create new applications. One example of this includes\nflash loans, which borrow funds to execute some on-chain logic as long as the loan is repaid at the\nend of the transaction."]}),"\n",(0,t.jsxs)(a.p,{children:["An issue with crosschain latency means that composability property weakens among parachains compared\nto a single blockchain. ",(0,t.jsx)(a.strong,{children:"This implication is common to all sharded blockchain designs, including\nPolkadot, Ethereum, and others."})," The solution to this is the introduction of parachain hubs, which\nmaintain the stronger property of single block composability."]}),"\n",(0,t.jsx)(a.h2,{id:"resources",children:"Resources"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"https://medium.com/polkadot-network/polkadot-the-parachain-3808040a769a",children:"Polkadot: The Parachain"}),' -\nBlog post by Polkadot co-founder Rob Habermeier who introduced parachains in 2017 as "a simpler\nform of blockchain, which attaches to the security provided by a relay chain rather than providing\nits own. The relay chain provides security to attached parachains, but also provides a guarantee\nof secure message-passing between them."']}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"https://polkadot.network/the-path-of-a-parachain-block/",children:"The Path of a Parachain Block"})," - A\ntechnical walk-through of how parachains interact with the relay chain."]}),"\n"]})]})}function p(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,t.jsx)(a,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},67141:(e,a,n)=>{n.d(a,{A:()=>o});var t=n(96540),i=n(74848);const o=function(e){var a,n=e.message,o=(0,t.useState)(!0),s=o[0],r=o[1];return(0,i.jsx)(i.Fragment,{children:s&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(a=n,a.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},52608:(e,a,n)=>{n.d(a,{A:()=>t});const t=n.p+"assets/images/one-parachain-f8e0673144a718bd67834cdd69894ca2.png"},28453:(e,a,n)=>{n.d(a,{R:()=>s,x:()=>r});var t=n(96540);const i={},o=t.createContext(i);function s(e){const a=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function r(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(o.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/21899dd2.a6406bfc.js b/assets/js/21899dd2.a6406bfc.js new file mode 100644 index 000000000000..4d2cbc80b33a --- /dev/null +++ b/assets/js/21899dd2.a6406bfc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5168],{34495:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>h,contentTitle:()=>r,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>l});var t=n(74848),i=n(28453),o=n(67141);const s={id:"learn-parachains",title:"Parachains",sidebar_label:"Introduction to Parachains",description:"An Introduction to Polkadot's Parachains.",keywords:["parachains","application-specific","sharding","on-demand","parathread"],slug:"../learn-parachains"},r=void 0,c={id:"learn/learn-parachains",title:"Parachains",description:"An Introduction to Polkadot's Parachains.",source:"@site/../docs/learn/learn-parachains.md",sourceDirName:"learn",slug:"/learn-parachains",permalink:"/docs/learn-parachains",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-parachains.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-parachains",title:"Parachains",sidebar_label:"Introduction to Parachains",description:"An Introduction to Polkadot's Parachains.",keywords:["parachains","application-specific","sharding","on-demand","parathread"],slug:"../learn-parachains"},sidebar:"docs",previous:{title:"Parachains",permalink:"/docs/learn-parachains-index"},next:{title:"Protocol Overview",permalink:"/docs/learn-parachains-protocol"}},h={},l=[{value:"Definition of a Parachain",id:"definition-of-a-parachain",level:2},{value:"State Transitions",id:"state-transitions",level:3},{value:"Why Parachains?",id:"why-parachains",level:2},{value:"Parachain Benefits",id:"parachain-benefits",level:3},{value:"Shared Security",id:"shared-security",level:3},{value:"PoW vs Parachain Model",id:"pow-vs-parachain-model",level:3},{value:"Parachain Economies",id:"parachain-economies",level:2},{value:"Coretime",id:"coretime",level:2},{value:"Coretime Expiration",id:"coretime-expiration",level:3},{value:"System Parachains",id:"system-parachains",level:2},{value:"On-demand Parachains",id:"on-demand-parachains",level:2},{value:"Historical Context of On-demand parachains",id:"historical-context-of-on-demand-parachains",level:3},{value:"Parachains vs. On-demand Parachains",id:"parachains-vs-on-demand-parachains",level:3},{value:"Parachains' Use Cases",id:"parachains-use-cases",level:2},{value:"Parachain Host",id:"parachain-host",level:2},{value:"Parachain Hubs",id:"parachain-hubs",level:2},{value:"Resources",id:"resources",level:2}];function d(e){const a={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.A,{message:"[Agile Coretime](./learn-agile-coretime) is activated on the network, and parachain slot auctions and crowdloans have been deprecated. For existing parachains, the remainder of the lease is automatically converted to coretime. See more information [here](./learn-agile-coretime#implementation). For decentralized, transparent, and regulatory-compliant fundraising within the ecosystem, check out the [Polimec parachain](https://www.polimec.org/)."}),"\n",(0,t.jsx)(a.admonition,{title:"Testing on Paseo",type:"info",children:(0,t.jsxs)(a.p,{children:["For information on how to test coretime functionalities on Paseo, please see the\n",(0,t.jsx)(a.a,{href:"/docs/build-pdk#testing-a-parachain",children:"Paseo Content"})," on the parachain development\nguide."]})}),"\n",(0,t.jsx)(a.h2,{id:"definition-of-a-parachain",children:"Definition of a Parachain"}),"\n",(0,t.jsx)(a.p,{children:"A parachain is an application-specific data structure that is globally coherent and can be validated\nby the validators of the relay chain. They take their name from the concept of parallelized chains\nthat run parallel to the relay chain. Most commonly, a parachain will take the form of a blockchain,\nbut there is no specific need for them to be actual blockchains."}),"\n",(0,t.jsx)(a.p,{children:(0,t.jsx)(a.img,{alt:"One parachain",src:n(52608).A+"",width:"1920",height:"800"})}),"\n",(0,t.jsxs)(a.p,{children:["Due to their parallel nature, they can parallelize transaction processing and achieve scalability of\nthe protocol. They ",(0,t.jsx)(a.a,{href:"#shared-security",children:"inherit the security"})," of the entire network and can\ncommunicate with other parachains through the ",(0,t.jsx)(a.a,{href:"/docs/learn-xcm",children:"XCM"})," format."]}),"\n",(0,t.jsxs)(a.p,{children:["Parachains are maintained by a network maintainer known as a ",(0,t.jsx)(a.a,{href:"/docs/learn-collator",children:"collator"}),". The role\nof the collator node is to maintain a full node of the parachain, retain all necessary information\nabout the parachain, and produce new block candidates to pass to the relay chain validators for\nverification and inclusion in the shared state. The incentivization of a collator node is an\nimplementation detail of the parachain. They are not required to be staked on the relay chain or own\nthe native token unless stipulated by the parachain implementation."]}),"\n",(0,t.jsx)(a.h3,{id:"state-transitions",children:"State Transitions"}),"\n",(0,t.jsxs)(a.p,{children:["Like other blockchains, parachains are ",(0,t.jsx)(a.strong,{children:"deterministic state machines"}),". Each parachain has a\n",(0,t.jsx)(a.strong,{children:"state"}),", executes a batch of transactions grouped into a block, and achieves a new state. Joe\nPetrowski provided in ",(0,t.jsx)(a.a,{href:"https://polkadot.network/blog/the-path-of-a-parachain-block/",children:"this article"})," a\ngood analogy of a state with a light switch that can be either on or off, which is one of the\nsimplest examples of how a state machine functions. Each parachain has its own state, and the Relay\nChain links all those states into one state, i.e. a state of states. A multi-chain network like\nPolkadot can be viewed like one computer's state with many light switches where a ",(0,t.jsx)(a.strong,{children:"state transition\nfunction"})," is the logic to decide which switches should be toggled. Parachains have their own\ntransition rule, separate economies, governance mechanisms, and users."]}),"\n",(0,t.jsxs)(a.p,{children:["A parachain's state is stored in a ",(0,t.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/Merkle_tree",children:"Merkle tree"}),". Merkle\ntrees have the convenient property that if some values within the tree change, this will be\nreflected in the Merkle root (in this case, the state root). One can verify the change by only\nlooking at the new values and the paths that are affected within the tree."]}),"\n",(0,t.jsxs)(a.p,{children:["The Polkadot Host requires that the state transitions performed on parachains be specified as a\n",(0,t.jsx)(a.a,{href:"/docs/learn-wasm",children:"Wasm"})," executable. Proofs of new state transitions that occur on a parachain must be\nvalidated against the registered state transition function (STF) that is stored on the relay chain\nby the validators before the relay chain acknowledges a state transition has occurred on a\nparachain. The key constraint regarding the logic of a parachain is that it must be verifiable by\nthe relay chain validators. Verification most commonly takes the form of a bundled proof of a state\ntransition known as a Proof-of-Verification (PoV) block, which is submitted for checking to the\nvalidators from one or more parachain collators."]}),"\n",(0,t.jsx)(a.h2,{id:"why-parachains",children:"Why Parachains?"}),"\n",(0,t.jsx)(a.p,{children:"Parachains are a solution to two fundamental problems in blockchains:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Scalability"}),": Having one blockchain for many purposes makes it difficult to scale as future\nimplementations and upgrades will likely advantage some purposes and disadvantage others.\nConversely, having different blockchains will allow them to implement features without affecting\nother chains."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Flexibility"}),": It is reasonable to state a blockchain will either be really good at solving one\nproblem or not so good at trying to solve many problems. A blockchain specializing in solving a\nspecific problem has more leverage toward itself and its users. Parachains are purpose-built\nblockchains are highly specialized and can take advantage of each other through cooperation."]}),"\n"]}),"\n",(0,t.jsx)(a.h3,{id:"parachain-benefits",children:"Parachain Benefits"}),"\n",(0,t.jsx)(a.p,{children:"Parachains contain their own runtime/STF logic and benefit from the shared security and the\ncross-consensus messaging provided by the relay chain. Parachains permit high flexibility and\ncustomization but require more effort to create and maintain over time. A production-grade parachain\nis typically more involved to create due to the complexity involved in blockchain networks'\ntechnical and economic aspects."}),"\n",(0,t.jsx)(a.p,{children:"Parachains grant the creators more space to build the monetary system and other chain aspects from\nthe ground up. They will allow for a more concise and efficient execution of complex logic than a\nsmart contract platform could offer. Parachains also provide more flexibility in the form of\ngovernance and can perform complete upgrades in a less controversial way than the current process of\nhard forks."}),"\n",(0,t.jsx)(a.p,{children:"Some examples of features you can have on a parachain or parathread:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"Custom fee structure (for example, pay a flat transaction fee or pay per byte)."}),"\n",(0,t.jsx)(a.li,{children:"Shared security and finalization via the relay chain (Polkadot or Kusama)."}),"\n",(0,t.jsx)(a.li,{children:"Custom monetary policy for the native token and local economy."}),"\n",(0,t.jsx)(a.li,{children:"Treasury to be funded through transitions in your state function."}),"\n",(0,t.jsx)(a.li,{children:"A governance mechanism that could manage a DAO that is responsible for allocating your on-chain\ntreasury."}),"\n"]}),"\n",(0,t.jsx)(a.h3,{id:"shared-security",children:"Shared Security"}),"\n",(0,t.jsxs)(a.p,{children:["Shared security, sometimes referred as ",(0,t.jsx)(a.em,{children:"pooled security"}),", is one of the unique value propositions\nfor chains considering becoming a ",(0,t.jsx)(a.a,{href:"/docs/learn-parachains",children:"parachain"})," and joining the network. On a\nhigh level, shared security means that all parachains that are connected to the relay chain by\naccessing a core will benefit from the economic security provided by the relay chain\n",(0,t.jsx)(a.a,{href:"/docs/learn-validator",children:"validators"}),"."]}),"\n",(0,t.jsxs)(a.p,{children:["The notion of shared security is different from inter-chain protocols that build on an architecture\nof bridges. For bridge protocols, each chain is considered sovereign and must maintain its own\nvalidator set and economic security. One concern in these protocols is the point of scalability of\nsecurity. For example, one suggestion to scale blockchains is that of ",(0,t.jsx)(a.em,{children:"scale by altcoins,"})," which\nsuggests that transaction volumes will filter down to lower market cap altcoins as the bigger ones\nfill their blocks. A major flaw in this idea is that the lower market cap coins will have less\neconomic security attached and be easier to attack. A real-life example of a 51% attack occurred\nrecently (\n",(0,t.jsx)(a.a,{href:"https://cointelegraph.com/news/ethereum-classic-51-attack-the-reality-of-proof-of-work",children:"Ethereum Classic attack on January 10, 2019"}),"\n), in which an unknown attacker double spent 219_500 ETC (~1.1 million USD). This was followed by\ntwo more 51% attacks on ETC."]}),"\n",(0,t.jsx)(a.p,{children:"Polkadot overcomes security scalability concerns since it gravitates all the economic incentives to\nthe relay chain and allows the parachains to tap into stronger guarantees at genesis. Sovereign\nchains must expend much more effort to grow the value of their coin so that it is sufficiently\nsecure against well-funded attackers."}),"\n",(0,t.jsx)(a.h3,{id:"pow-vs-parachain-model",children:"PoW vs Parachain Model"}),"\n",(0,t.jsx)(a.p,{children:"Let's compare the standard sovereign security model that exists on current proof-of-work (PoW)\nchains to Polkadot's shared security model. Bitcoin, Zcash, and their derivatives, must bootstrap\ntheir independent network of miners and maintain a competitive portion of honest hashing power.\nSince mining is becoming a larger industry that increasingly centralizes key players, it is becoming\nmore real that a single actor may control enough hash power to attack a chain."}),"\n",(0,t.jsxs)(a.p,{children:["This means that smaller chains that cannot maintain a secure amount of hash power on their networks\ncould potentially be attacked by a large mining cartel at the simple whim of redirecting its hash\npower away from Bitcoin and toward a new and less secure chain.\n",(0,t.jsx)(a.a,{href:"https://www.crypto51.app",children:"51% attacks are viable today"})," with attacks having been reported on\nEthereum Classic (see above),\n",(0,t.jsx)(a.a,{href:"https://coincentral.com/verge-suffers-51-attack-hard-forks-in-response/",children:"Verge"}),",\n",(0,t.jsx)(a.a,{href:"https://bitcoingold.org/responding-to-attacks/",children:"Bitcoin Gold"}),", and other cryptocurrencies."]}),"\n",(0,t.jsx)(a.p,{children:"On Polkadot, this disparity between chain security will not be present. When a parachain connects to\nthe relay chain, validators become the securers of that parachain's state transitions. The parachain\nwill only have the overhead of running a few collator nodes to keep the validators informed with the\nlatest state transitions and proofs/witness. Validators will then check these for the parachains to\nwhich they are assigned. In this way, new parachains instantly benefit from the overall security\nprovided by the relay chain even if they have just been launched."}),"\n",(0,t.jsx)(a.h2,{id:"parachain-economies",children:"Parachain Economies"}),"\n",(0,t.jsx)(a.p,{children:"Parachains may have their economies with their native tokens. Schemes such as Proof-of-Stake are\nusually used to select the validator set to handle validation and finalization; parachains will not\nbe required to do either of those things. However, since Polkadot is not overly particular about\nwhat the parachain can implement, it may be the choice of the parachain to implement a staking\ntoken, but it's not generally necessary."}),"\n",(0,t.jsx)(a.p,{children:"Collators may be incentivized through the inflation of a native parachain token. There may be other\nways to incentivize the collator nodes that do not involve inflating the native parachain token."}),"\n",(0,t.jsx)(a.p,{children:"Transaction fees in a native parachain token can also be an implementation choice of parachains.\nPolkadot makes no hard and fast rules for how the parachains decide on the original validity of\ntransactions. For example, a parachain may be implemented so that transactions must pay a minimum\nfee to collators to be valid. The relay chain will enforce this validity. Similarly, a parachain\ncould not include that in their implementation, and the relay chain would still enforce its\nvalidity."}),"\n",(0,t.jsx)(a.p,{children:"Parachains are not required to have their token. If they do, it is up to the parachain (and not the\nrelay chain) to make the economic case for their token."}),"\n",(0,t.jsx)(a.h2,{id:"coretime",children:"Coretime"}),"\n",(0,t.jsx)(a.p,{children:"Parachains can access the relay chain via cores."}),"\n",(0,t.jsx)(a.p,{children:"There are two ways to allocate relay chain cores:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:["Via Governance only to ",(0,t.jsx)(a.a,{href:"/docs/learn-system-chains",children:"system chains"}),"."]}),"\n",(0,t.jsxs)(a.li,{children:["Via ",(0,t.jsx)(a.a,{href:"/docs/learn-agile-coretime",children:"coretime"})," purchase with DOT (KSM on Kusama) for non-system chains.\nCoretime is used to rent computation time on a relay chain core. This is the only way to access\nPolkadot's shared security and interoperability."]}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"#system-parachains",children:"System parachains"})," are allocated by Polkadot's on-chain\n",(0,t.jsx)(a.a,{href:"/docs/learn-polkadot-opengov",children:"governance"})," and are part of the network's protocol, such as bridges to\nother networks or chains. These typically do not have an economic model and help remove transactions\nfrom the relay chain, allowing for more efficient parachain processing."]}),"\n",(0,t.jsx)(a.p,{children:"Non-system chains can access the relay chain's cores via bulk or on-demand coretime purchased with\nDOT (or KSM on Kusama)."}),"\n",(0,t.jsx)(a.h3,{id:"coretime-expiration",children:"Coretime Expiration"}),"\n",(0,t.jsxs)(a.p,{children:["The DOT (or KSM on Kusama) used to purchase coretime are burned. Before the coretime expires,\nparachains can renew it at a fixed cost through a bulk coretime purchase. If the parachain does not\npurchase bulk coretime, it has an option to purchase coretime on-demand (at a variable price per\nblock, depending on the demand and other market conditions) when they need to access the relay\nchain. Parachains without coretime to extend time on a relay chain core will be deprecated to the\nstatus of a parathread (i.e., a chain with a registered ",(0,t.jsx)(a.code,{children:"ParaID"})," but without access to a core)."]}),"\n",(0,t.jsx)(a.h2,{id:"system-parachains",children:"System Parachains"}),"\n",(0,t.jsxs)(a.p,{children:[(0,t.jsx)(a.a,{href:"/docs/learn-system-chains",children:"System parachains"})," are parachains that use execution cores allocated by\nthe network's governance. These chains remove transactions from the relay chain, allowing network\nvalidators to allocate resources to validating parachains. System chains are Polkadot using its\nscaling technology to host itself."]}),"\n",(0,t.jsx)(a.h2,{id:"on-demand-parachains",children:"On-demand Parachains"}),"\n",(0,t.jsx)(a.admonition,{title:"On-demand parachains were previously named parathreads",type:"info",children:(0,t.jsxs)(a.p,{children:["On-demand parachains (previously called parathreads) are parachains that acquire\n",(0,t.jsx)(a.a,{href:"/docs/learn-agile-coretime#on-demand-coretime",children:"on-demand coretime"}),"."]})}),"\n",(0,t.jsxs)(a.p,{children:["On-demand parachains temporarily participate (on a block by block basis) in network security without\nneeding to lease a dedicated relay chain core. This is done through economically sharing the scarce\nresource of a core among several competing resources (parachains). Chains that otherwise would not\nbe able to acquire a full core or do not find it economically sensible to do so, can participate in\nshared security, as the ",(0,t.jsx)(a.a,{href:"/docs/learn-agile-coretime#on-demand-coretime",children:"on-demand coretime"})," offers a\ngraceful off-ramp to parachains that no longer require a dedicated core, but would like to continue\nusing the relay chain."]}),"\n",(0,t.jsx)(a.h3,{id:"historical-context-of-on-demand-parachains",children:"Historical Context of On-demand parachains"}),"\n",(0,t.jsxs)(a.p,{children:["According to ",(0,t.jsx)(a.a,{href:"https://v.douyu.com/show/a4Jj7llO5q47Dk01",children:"this talk"})," in Chengdu back in 2019, the\norigin of the idea for on-demand parachains came from similar notions in the limited resource of\nmemory on early personal computers of the late '80s and '90s. Since computers have a limited amount\nof physical memory, when an application needs more, the computer can create virtual memory by using\n",(0,t.jsx)(a.em,{children:"swap space"})," on a hard disk. Swap space allows the capacity of a computer's memory to expand and for\nmore processes to run concurrently with the trade-off that some processes will take longer to\nprogress."]}),"\n",(0,t.jsx)(a.h3,{id:"parachains-vs-on-demand-parachains",children:"Parachains vs. On-demand Parachains"}),"\n",(0,t.jsx)(a.p,{children:"Parachains and on-demand parachains are very similar from a development perspective. One can imagine\nthat a chain developed with Substrate can at different points in its lifetime assume one of three\nstates:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"an independent chain with secured bridge,"}),"\n",(0,t.jsx)(a.li,{children:"a parachain continuously connected to the relay chain,"}),"\n",(0,t.jsx)(a.li,{children:"or a parachain intermittently connected to the relay chain (i.e. on-demand)"}),"\n"]}),"\n",(0,t.jsx)(a.p,{children:"It can switch between these states with relatively minimal effort since the difference is more of an\neconomic distinction than a technological one."}),"\n",(0,t.jsxs)(a.p,{children:["On-demand parachains have the exact same benefits for connecting to the relay chain that a full\nparachain has. Namely, it is able to send messages to other para-objects through\n",(0,t.jsx)(a.a,{href:"/docs/learn-xcm###XCMP",children:"XCMP"})," and it is secured under the full economic security of the relay chain\nvalidator set."]}),"\n",(0,t.jsx)(a.h2,{id:"parachains-use-cases",children:"Parachains' Use Cases"}),"\n",(0,t.jsx)(a.p,{children:"Note that we still have to see the true potential of parachains and what it is listed below are just\na few examples."}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Encrypted Consortium Chains"}),": These are possibly private chains that do not leak any\ninformation to the public but still can be interacted with trustlessly due to the nature of the\nXCMP protocol."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"High-Frequency Chains"}),": These chains can compute many transactions in a short amount of time by\ntaking certain trade-offs or making optimizations."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Privacy Chains"}),": These chains do not leak any information to the public through novel\ncryptography."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Smart Contract Chains"}),": These chains can have additional logic implemented through the\ndeployment of code known as ",(0,t.jsx)(a.em,{children:"smart contracts"}),"."]}),"\n"]}),"\n",(0,t.jsx)(a.h2,{id:"parachain-host",children:"Parachain Host"}),"\n",(0,t.jsxs)(a.p,{children:["A blockchain is a ",(0,t.jsx)(a.a,{href:"https://en.wikipedia.org/wiki/Directed_acyclic_graph",children:"Directed Acyclic Graph"}),"\n(DAG) of state transitions, where every added block can be viewed as the head of the chain or fork\nwith cumulative state. All paths through the DAG terminate at the Genesis Block. A blockchain is a\ntree, as each block can have only one parent."]}),"\n",(0,t.jsx)(a.p,{children:"A blockchain network is made of nodes that have a view of many forks of the chain and must decide\nwhich fork to follow. To construct the parachain host we need to answer two categories of questions\naddressed by two different components:"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:["\n",(0,t.jsxs)(a.p,{children:["What is the state transition function of the blockchain? This is handled by the ",(0,t.jsx)(a.strong,{children:"Runtime"}),", which\ndefines the state transition logic of the chain. The Runtime logic is divided into:"]}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Modules"})," encapsulate particular behavior of the protocol and consist of:","\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:"Storage"}),"\n",(0,t.jsx)(a.li,{children:"Routines are invoked by entry points and other modules upon block initialization or closing.\nRoutines can alter the storage of a module."}),"\n",(0,t.jsx)(a.li,{children:"The entry point defines how new information is introduced to a module and can limit the origin\nfrom which they are called (user, root, parachain)."}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"API"})," provides means for the node-side behavior to extract meaningful information from the\nstate of a single fork."]}),"\n"]}),"\n",(0,t.jsx)(a.admonition,{type:"info",children:(0,t.jsxs)(a.p,{children:["The Polkadot Parachain Host Implementers' Guide provides details about\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/runtime/index.html",children:"Runtime Architecture"})," and\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/runtime-api/index.html",children:"Runtime API"}),"."]})}),"\n"]}),"\n",(0,t.jsxs)(a.li,{children:["\n",(0,t.jsxs)(a.p,{children:["Knowing various forks of the blockchain, what behaviors should a node take? What information\nshould a node extract from the state of which forks, and how should that information be used? This\nis handled by the ",(0,t.jsx)(a.strong,{children:"Node-side behavior"}),", which defines all activities a node undertakes given its\nview of the blockchain. The node-side behavior can be divided into two categories:"]}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Networking behaviors"}),", relate to how information is distributed between nodes but not how the\ninformation is used afterward."]}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.strong,{children:"Core behaviors"}),", relate to internal work that a specific node does. Such behavior cares about\nthat information is ",(0,t.jsx)(a.em,{children:"distributed"})," and ",(0,t.jsx)(a.em,{children:"received"}),", but not how these two are achieved."]}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:["These two categories often interact, but they can be heavily abstracted from each other. The\nnode-side behavior is split into various ",(0,t.jsx)(a.strong,{children:"subsystems"}),", which perform a particular category of\nwork. Subsystems can communicate with each other through an\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/overseer.html",children:"Overseer"})," that prevents race\nconditions."]}),"\n",(0,t.jsxs)(a.admonition,{type:"info",children:[(0,t.jsxs)(a.p,{children:["The Polkadot Parachain Host Implementers' Guide provides details about\n",(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/index.html",children:"node architecture"})," the main\nsubsystems:"]}),(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/collators/index.html",children:"Collator subsystem"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/backing/index.html",children:"Backing subsystem"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/availability/index.html",children:"Availability subsystem"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/approval/index.html",children:"Approval subsystem"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/disputes/index.html",children:"Dispute subsystem"})}),"\n",(0,t.jsx)(a.li,{children:(0,t.jsx)(a.a,{href:"https://paritytech.github.io/polkadot/book/node/utility/index.html",children:"Utility subsystem"})}),"\n"]})]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(a.p,{children:["The Runtime and Node-side behavior are dependent on each other. The Runtime depends on Node-side\nbehavior to author blocks, and to include ",(0,t.jsx)(a.a,{href:"/docs/learn-transactions",children:"extrinsics"})," which trigger the\ncorrect entry points. The Node-side behavior relies on the Runtime APIs to extract information\nnecessary to determine which action to take."]}),"\n",(0,t.jsx)(a.h2,{id:"parachain-hubs",children:"Parachain Hubs"}),"\n",(0,t.jsx)(a.p,{children:"While the relay chain enables crosschain functionality amongst the parachains, it necessitates that\nthere is some latency between the dispatch of a message from one parachain until the destination\nparachain receives the message. In the optimistic scenario, the latency for this message should be\nat least two blocks - one block for the message to be dispatched and one block for the receiving\nparachain to process and produce a block that acts upon the message. However, in some cases, we may\nsee that the latency for messages is higher if many messages are in queue to be processed or if no\nnodes are running both parachain networks that can quickly gossip the message across the networks."}),"\n",(0,t.jsxs)(a.p,{children:["Due to the necessary latency in sending crosschain messages, some parachains plan to become ",(0,t.jsx)(a.em,{children:"hubs"}),"\nfor an entire industry (see the ",(0,t.jsx)(a.a,{href:"/docs/learn-assets",children:"Asset Hub"})," and\n",(0,t.jsx)(a.a,{href:"/docs/learn-system-chains#bridge-hub",children:"Bridge Hub"}),"). For example, many DeFi applications could take\nadvantage of a property known as ",(0,t.jsx)(a.em,{children:"composability"})," which means that functions of one application can\nbe synergistically composed with others to create new applications. One example of this includes\nflash loans, which borrow funds to execute some on-chain logic as long as the loan is repaid at the\nend of the transaction."]}),"\n",(0,t.jsxs)(a.p,{children:["An issue with crosschain latency means that composability property weakens among parachains compared\nto a single blockchain. ",(0,t.jsx)(a.strong,{children:"This implication is common to all sharded blockchain designs, including\nPolkadot, Ethereum, and others."})," The solution to this is the introduction of parachain hubs, which\nmaintain the stronger property of single block composability."]}),"\n",(0,t.jsx)(a.h2,{id:"resources",children:"Resources"}),"\n",(0,t.jsxs)(a.ul,{children:["\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"https://medium.com/polkadot-network/polkadot-the-parachain-3808040a769a",children:"Polkadot: The Parachain"}),' -\nBlog post by Polkadot co-founder Rob Habermeier who introduced parachains in 2017 as "a simpler\nform of blockchain, which attaches to the security provided by a relay chain rather than providing\nits own. The relay chain provides security to attached parachains, but also provides a guarantee\nof secure message-passing between them."']}),"\n",(0,t.jsxs)(a.li,{children:[(0,t.jsx)(a.a,{href:"https://polkadot.network/the-path-of-a-parachain-block/",children:"The Path of a Parachain Block"})," - A\ntechnical walk-through of how parachains interact with the relay chain."]}),"\n"]})]})}function p(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,t.jsx)(a,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},67141:(e,a,n)=>{n.d(a,{A:()=>o});var t=n(96540),i=n(74848);const o=function(e){var a,n=e.message,o=(0,t.useState)(!0),s=o[0],r=o[1];return(0,i.jsx)(i.Fragment,{children:s&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(a=n,a.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},52608:(e,a,n)=>{n.d(a,{A:()=>t});const t=n.p+"assets/images/one-parachain-f8e0673144a718bd67834cdd69894ca2.png"},28453:(e,a,n)=>{n.d(a,{R:()=>s,x:()=>r});var t=n(96540);const i={},o=t.createContext(i);function s(e){const a=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function r(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(o.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2be0d940.c5ab2621.js b/assets/js/2be0d940.c5ab2621.js new file mode 100644 index 000000000000..22fa6956d4b7 --- /dev/null +++ b/assets/js/2be0d940.c5ab2621.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4537],{59681:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>a,metadata:()=>d,toc:()=>c});var i=n(74848),s=n(28453),o=n(67141);const a={id:"learn-guides-identity",title:"Polkadot-JS Guides about Identity",sidebar_label:"Identity Guides",description:"Polkadot-JS Guides about Identity.",keywords:["registrar","identity","sub-identity","polkadot-js"],slug:"../learn-guides-identity"},r=void 0,d={id:"learn/learn-guides-identity",title:"Polkadot-JS Guides about Identity",description:"Polkadot-JS Guides about Identity.",source:"@site/../docs/learn/learn-guides-identity.md",sourceDirName:"learn",slug:"/learn-guides-identity",permalink:"/docs/learn-guides-identity",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-identity.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-identity",title:"Polkadot-JS Guides about Identity",sidebar_label:"Identity Guides",description:"Polkadot-JS Guides about Identity.",keywords:["registrar","identity","sub-identity","polkadot-js"],slug:"../learn-guides-identity"},sidebar:"docs",previous:{title:"Bounty Guides",permalink:"/docs/learn-guides-bounties"},next:{title:"Ledger Guides",permalink:"/docs/learn-guides-ledger"}},l={},c=[{value:"Setting an Identity",id:"setting-an-identity",level:2},{value:"Format Caveat",id:"format-caveat",level:3},{value:"Request Judgement",id:"request-judgement",level:2},{value:"Clearing and Killing an Identity",id:"clearing-and-killing-an-identity",level:2},{value:"Setting Sub-Identities",id:"setting-sub-identities",level:2},{value:"Setting Sub-Identity (Sub-ID) for your Ledger Account",id:"setting-sub-identity-sub-id-for-your-ledger-account",level:3},{value:"Registrars",id:"registrars",level:2},{value:"Becoming a Registrar",id:"becoming-a-registrar",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,i.jsxs)(t.admonition,{title:"The identity pallet is no longer on the Kusama relay chain.",type:"warning",children:[(0,i.jsxs)(t.p,{children:["If you are on ",(0,i.jsx)(t.strong,{children:"Kusama"}),", any of the extrinsics which require you to use the relay chain now have to\nbe called via the system parachain,\n",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss://kusama-people-rpc.polkadot.io",children:"which you can find here."})]}),(0,i.jsxs)(t.p,{children:["The identity pallet, along with all of its data, has been migrated to the\n",(0,i.jsx)(t.a,{href:"/docs/glossary#people-chain",children:"People Chain"}),", a system parachain which can now be used for\nidentity management."]})]}),"\n",(0,i.jsxs)(t.p,{children:["This is an advanced guide that is relevant for entities that would like to become registrars or\nwould like to set sub-identities to an existing account with an identity. See\n",(0,i.jsx)(t.a,{href:"/docs/learn-identity",children:"this page"})," to learn about how to set an identity and have it verified."]}),"\n",(0,i.jsx)(t.h2,{id:"setting-an-identity",children:"Setting an Identity"}),"\n",(0,i.jsxs)(t.p,{children:["Users can set an identity by registering through default fields such as legal name, display name,\nwebsite, Twitter handle, Riot handle, etc. along with some extra, custom fields for which they would\nlike attestations (see ",(0,i.jsx)(t.a,{href:"#judgements",children:"Judgements"}),")."]}),"\n",(0,i.jsx)(t.admonition,{title:"Instructions for setting and clearing Identities",type:"info",children:(0,i.jsxs)(t.p,{children:["The procedure to set and clear identities is explained in detail in this support article -\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181981-how-to-set-and-clear-an-identity",children:"How to set and clear an Identity"})]})}),"\n",(0,i.jsx)(t.admonition,{type:"note",children:(0,i.jsxs)(t.p,{children:["The Ledger app on ",(0,i.jsx)(t.strong,{children:"Nano S"})," doesn't support the extrinsic for setting identity. As a workaround,\ncreate a primary identity with an on-chain account and then using that primary identity, assign a\n",(0,i.jsx)(t.a,{href:"#sub-accounts",children:"sub-identity"})," to the Ledger stash."]})}),"\n",(0,i.jsx)(t.h3,{id:"format-caveat",children:"Format Caveat"}),"\n",(0,i.jsx)(t.p,{children:"Please note the following caveat: because the fields support different formats, from raw bytes to\nvarious hashes, a UI has no way of telling how to encode a given field it encounters. The\nPolkadot-JS UI currently encodes the raw bytes it encounters as UTF8 strings, which makes these\nvalues readable on-screen. However, given that there are no restrictions on the values that can be\nplaced into these fields, a different UI may interpret them as, for example, IPFS hashes or encoded\nbitmaps. This means any field stored as raw bytes will become unreadable by that specific UI. As\nfield standards crystallize, things will become easier to use but for now, every custom\nimplementation of displaying user information will likely have to make a conscious decision on the\napproach to take, or support multiple formats and then attempt multiple encodings until the output\nmakes sense."}),"\n",(0,i.jsx)(t.h2,{id:"request-judgement",children:"Request Judgement"}),"\n",(0,i.jsx)(t.admonition,{title:"Instructions for requesting and cancelling Identity judgements",type:"info",children:(0,i.jsxs)(t.p,{children:["The procedure to request and cancel identity judgments is explained in detail in this\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181990-how-to-request-and-cancel-identity-judgement",children:"support article"})]})}),"\n",(0,i.jsxs)(t.p,{children:["To be judged after submitting your identity information, go to the\n",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics tab in the Polkadot-JS UI"})," and select the\n",(0,i.jsx)(t.code,{children:"identity"})," pallet, then ",(0,i.jsx)(t.code,{children:"requestJudgement"}),". For the ",(0,i.jsx)(t.code,{children:"reg_index"})," put the index of the registrar you\nwant to be judged by, and for the ",(0,i.jsx)(t.code,{children:"max_fee"})," put the maximum you're willing to pay for these\nconfirmations."]}),"\n",(0,i.jsxs)(t.p,{children:["If you don't know which registrar to pick, first check the available registrars by going to\n",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"Chain State tab in the Polkadot-JS UI"})," and selecting\n",(0,i.jsx)(t.code,{children:"identity.registrars()"})," to get the full list."]}),"\n",(0,i.jsx)(t.p,{children:"To find out how to contact the registrar after the application for judgement or to learn who they\nare, you can check their identity by adding them to your Address Book. Their identity will be\nautomatically loaded."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Chevdor is registrar #1",src:n(71014).A+"",width:"579",height:"217"})}),"\n",(0,i.jsx)(t.admonition,{title:"Requesting judgement through Web3 Foundation Registrar",type:"info",children:(0,i.jsxs)(t.p,{children:["If you requested judgement for your on-chain identity through the Web3 Foundation Registrar (i.e.\nRegistrar #0) you will need to complete a few additional tasks. For more information visit\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179747-how-to-use-the-w3f-registrar-page",children:"this support article"}),"."]})}),"\n",(0,i.jsxs)(t.admonition,{type:"caution",children:[(0,i.jsx)(t.p,{children:"The set identity calls go on-chain. Hence, the contact information is available publicly, for both\nlegitimate entities, like registrars or validators, but also scammers who might impersonate them.\nThe strings in the identity fields are good candidates for homograph attacks, as someone could list\na fraudulent website (web3.f0undation instead of web3.foundation for example) and still get verified\nby the registrar (if the checks are automated)!"}),(0,i.jsx)(t.p,{children:"In a decentralized network, one should be cautious making transactions with accounts solely based on\ntheir identity. If an account on-chain claims to be of Web3 Foundation, it is wise to verify its\nauthenticity by checking directly with Web3 Foundation or examining the established history of that\naccount on-chain."})]}),"\n",(0,i.jsx)(t.h2,{id:"clearing-and-killing-an-identity",children:"Clearing and Killing an Identity"}),"\n",(0,i.jsx)(t.admonition,{type:"info",children:(0,i.jsxs)(t.p,{children:['Visit the section "Clear an Identity" on\n',(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181981",children:"this support article"})," for\nguidelines about clearing identities."]})}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Clearing:"})," Users can clear their identity information and have their deposit returned. Clearing\nan identity also clears all sub accounts and returns their deposits."]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Killing:"})," It is is possible to kill an identity that deems erroneous. This results in a slash of\nthe deposit."]}),"\n",(0,i.jsx)(t.h2,{id:"setting-sub-identities",children:"Setting Sub-Identities"}),"\n",(0,i.jsxs)(t.p,{children:["To set up sub-identities with Polkadot-JS see the\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181991-how-to-set-identities-for-sub-accounts",children:"how to set sub-identities"}),"\nsupport article and this ",(0,i.jsx)(t.a,{href:"https://www.youtube.com/watch?v=0Yh1JYg3ZKU",children:"video tutorial"}),"."]}),"\n",(0,i.jsx)(t.h3,{id:"setting-sub-identity-sub-id-for-your-ledger-account",children:"Setting Sub-Identity (Sub-ID) for your Ledger Account"}),"\n",(0,i.jsxs)(t.p,{children:["Setting an Identity is not possible on Ledger app yet, but as a workaround, you can\n",(0,i.jsx)(t.a,{href:"/docs/learn-identity#setting-an-identity",children:"set the identity for an on-chain account "})," and then\nuse it to set a sub-identity to your Ledger account."]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Go to ",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"https://polkadot.js.org/apps/#/accounts"}),". Click on the three vertical dots corresponding to\nthe account to which you already set identity. You should see an option to set onchain\nsub-identities. Click on it."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Add sub-identity in PolkadotJS",src:n(69681).A+"",width:"520",height:"338"})}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["In the pop-up window, select your Ledger account from the dropdown and enter text in sub name\nfield. Then, click on set subs button.\n",(0,i.jsx)(t.img,{alt:"Set sub-identity in PolkadotJS",src:n(48570).A+"",width:"2155",height:"554"})]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Sign and submit the transaction from the parent account with the identity"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["You should now see the sub-identity displayed on-chain. You need to be aware that the creation of\nidentities and sub-identities requires\n",(0,i.jsx)(t.a,{href:"/docs/chain-state-values#identity-deposit",children:"deposits"}),". This reserved account balance is\nfreed once you ",(0,i.jsx)(t.a,{href:"/docs/learn-identity#clearing-and-killing-an-identity",children:"clear the identities"}),"\non the account."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Sub-identity example",src:n(96323).A+"",width:"370",height:"554"})}),"\n",(0,i.jsx)(t.h2,{id:"registrars",children:"Registrars"}),"\n",(0,i.jsx)(t.h3,{id:"becoming-a-registrar",children:"Becoming a Registrar"}),"\n",(0,i.jsxs)(t.p,{children:["To become a registrar, submit a pre-image and proposal on\n",(0,i.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov",children:"OpenGov"}),", then wait for people to vote on it. For best\nresults, write a post about your identity and intentions beforehand, and once the proposal is in the\nqueue ask people to endorse it so that it gets ahead in the referendum queue."]})]})}function u(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(96540),s=n(74848);const o=function(e){var t,n=e.message,o=(0,i.useState)(!0),a=o[0],r=o[1];return(0,s.jsx)(s.Fragment,{children:a&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},71014:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/16-95dc969648d23cdfdd68bf04135818bb.jpg"},69681:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/sub-id-1-18df099d5c97fdff246815ad91922e32.png"},48570:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/sub-id-2-40b39041ca30296d805003d186f66763.png"},96323:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/sub-id-3-a650cce50e6bfef97c03ebd7b463419c.png"},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>r});var i=n(96540);const s={},o=i.createContext(s);function a(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2be0d940.ff5e97f6.js b/assets/js/2be0d940.ff5e97f6.js deleted file mode 100644 index 1388567ed8cd..000000000000 --- a/assets/js/2be0d940.ff5e97f6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4537],{59681:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>a,metadata:()=>d,toc:()=>c});var i=n(74848),s=n(28453),o=n(67141);const a={id:"learn-guides-identity",title:"Polkadot-JS Guides about Identity",sidebar_label:"Identity Guides",description:"Polkadot-JS Guides about Identity.",keywords:["registrar","identity","sub-identity","polkadot-js"],slug:"../learn-guides-identity"},r=void 0,d={id:"learn/learn-guides-identity",title:"Polkadot-JS Guides about Identity",description:"Polkadot-JS Guides about Identity.",source:"@site/../docs/learn/learn-guides-identity.md",sourceDirName:"learn",slug:"/learn-guides-identity",permalink:"/docs/learn-guides-identity",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-identity.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726730833e3,frontMatter:{id:"learn-guides-identity",title:"Polkadot-JS Guides about Identity",sidebar_label:"Identity Guides",description:"Polkadot-JS Guides about Identity.",keywords:["registrar","identity","sub-identity","polkadot-js"],slug:"../learn-guides-identity"},sidebar:"docs",previous:{title:"Bounty Guides",permalink:"/docs/learn-guides-bounties"},next:{title:"Ledger Guides",permalink:"/docs/learn-guides-ledger"}},l={},c=[{value:"Setting an Identity",id:"setting-an-identity",level:2},{value:"Format Caveat",id:"format-caveat",level:3},{value:"Request Judgement",id:"request-judgement",level:2},{value:"Clearing and Killing an Identity",id:"clearing-and-killing-an-identity",level:2},{value:"Setting Sub-Identities",id:"setting-sub-identities",level:2},{value:"Setting Sub-Identity (Sub-ID) for your Ledger Account",id:"setting-sub-identity-sub-id-for-your-ledger-account",level:3},{value:"Registrars",id:"registrars",level:2},{value:"Becoming a Registrar",id:"becoming-a-registrar",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,i.jsxs)(t.admonition,{title:"The identity pallet is no longer on the Kusama relay chain.",type:"warning",children:[(0,i.jsxs)(t.p,{children:["If you are on ",(0,i.jsx)(t.strong,{children:"Kusama"}),", any of the extrinsics which require you to use the relay chain now have to\nbe called via the system parachain,\n",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss://kusama-people-rpc.polkadot.io",children:"which you can find here."})]}),(0,i.jsxs)(t.p,{children:["The identity pallet, along with all of its data, has been migrated to the\n",(0,i.jsx)(t.a,{href:"/docs/glossary#people-chain",children:"People Chain"}),", a system parachain which can now be used for\nidentity management."]})]}),"\n",(0,i.jsxs)(t.p,{children:["This is an advanced guide that is relevant for entities that would like to become registrars or\nwould like to set sub-identities to an existing account with an identity. See\n",(0,i.jsx)(t.a,{href:"/docs/learn-identity",children:"this page"})," to learn about how to set an identity and have it verified."]}),"\n",(0,i.jsx)(t.h2,{id:"setting-an-identity",children:"Setting an Identity"}),"\n",(0,i.jsxs)(t.p,{children:["Users can set an identity by registering through default fields such as legal name, display name,\nwebsite, Twitter handle, Riot handle, etc. along with some extra, custom fields for which they would\nlike attestations (see ",(0,i.jsx)(t.a,{href:"#judgements",children:"Judgements"}),")."]}),"\n",(0,i.jsx)(t.admonition,{title:"Instructions for setting and clearing Identities",type:"info",children:(0,i.jsxs)(t.p,{children:["The procedure to set and clear identities is explained in detail in this support article -\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181981-how-to-set-and-clear-an-identity",children:"How to set and clear an Identity"})]})}),"\n",(0,i.jsx)(t.admonition,{type:"note",children:(0,i.jsxs)(t.p,{children:["The Ledger app on ",(0,i.jsx)(t.strong,{children:"Nano S"})," doesn't support the extrinsic for setting identity. As a workaround,\ncreate a primary identity with an on-chain account and then using that primary identity, assign a\n",(0,i.jsx)(t.a,{href:"#sub-accounts",children:"sub-identity"})," to the Ledger stash."]})}),"\n",(0,i.jsx)(t.h3,{id:"format-caveat",children:"Format Caveat"}),"\n",(0,i.jsx)(t.p,{children:"Please note the following caveat: because the fields support different formats, from raw bytes to\nvarious hashes, a UI has no way of telling how to encode a given field it encounters. The\nPolkadot-JS UI currently encodes the raw bytes it encounters as UTF8 strings, which makes these\nvalues readable on-screen. However, given that there are no restrictions on the values that can be\nplaced into these fields, a different UI may interpret them as, for example, IPFS hashes or encoded\nbitmaps. This means any field stored as raw bytes will become unreadable by that specific UI. As\nfield standards crystallize, things will become easier to use but for now, every custom\nimplementation of displaying user information will likely have to make a conscious decision on the\napproach to take, or support multiple formats and then attempt multiple encodings until the output\nmakes sense."}),"\n",(0,i.jsx)(t.h2,{id:"request-judgement",children:"Request Judgement"}),"\n",(0,i.jsx)(t.admonition,{title:"Instructions for requesting and cancelling Identity judgements",type:"info",children:(0,i.jsxs)(t.p,{children:["The procedure to request and cancel identity judgments is explained in detail in this\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181990-how-to-request-and-cancel-identity-judgement",children:"support article"})]})}),"\n",(0,i.jsxs)(t.p,{children:["To be judged after submitting your identity information, go to the\n",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics tab in the Polkadot-JS UI"})," and select the\n",(0,i.jsx)(t.code,{children:"identity"})," pallet, then ",(0,i.jsx)(t.code,{children:"requestJudgement"}),". For the ",(0,i.jsx)(t.code,{children:"reg_index"})," put the index of the registrar you\nwant to be judged by, and for the ",(0,i.jsx)(t.code,{children:"max_fee"})," put the maximum you're willing to pay for these\nconfirmations."]}),"\n",(0,i.jsxs)(t.p,{children:["If you don't know which registrar to pick, first check the available registrars by going to\n",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"Chain State tab in the Polkadot-JS UI"})," and selecting\n",(0,i.jsx)(t.code,{children:"identity.registrars()"})," to get the full list."]}),"\n",(0,i.jsx)(t.p,{children:"To find out how to contact the registrar after the application for judgement or to learn who they\nare, you can check their identity by adding them to your Address Book. Their identity will be\nautomatically loaded."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Chevdor is registrar #1",src:n(71014).A+"",width:"579",height:"217"})}),"\n",(0,i.jsx)(t.admonition,{title:"Requesting judgement through Web3 Foundation Registrar",type:"info",children:(0,i.jsxs)(t.p,{children:["If you requested judgement for your on-chain identity through the Web3 Foundation Registrar (i.e.\nRegistrar #0) you will need to complete a few additional tasks. For more information visit\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179747-how-to-use-the-w3f-registrar-page",children:"this support article"}),"."]})}),"\n",(0,i.jsxs)(t.admonition,{type:"caution",children:[(0,i.jsx)(t.p,{children:"The set identity calls go on-chain. Hence, the contact information is available publicly, for both\nlegitimate entities, like registrars or validators, but also scammers who might impersonate them.\nThe strings in the identity fields are good candidates for homograph attacks, as someone could list\na fraudulent website (web3.f0undation instead of web3.foundation for example) and still get verified\nby the registrar (if the checks are automated)!"}),(0,i.jsx)(t.p,{children:"In a decentralized network, one should be cautious making transactions with accounts solely based on\ntheir identity. If an account on-chain claims to be of Web3 Foundation, it is wise to verify its\nauthenticity by checking directly with Web3 Foundation or examining the established history of that\naccount on-chain."})]}),"\n",(0,i.jsx)(t.h2,{id:"clearing-and-killing-an-identity",children:"Clearing and Killing an Identity"}),"\n",(0,i.jsx)(t.admonition,{type:"info",children:(0,i.jsxs)(t.p,{children:['Visit the section "Clear an Identity" on\n',(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181981",children:"this support article"})," for\nguidelines about clearing identities."]})}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Clearing:"})," Users can clear their identity information and have their deposit returned. Clearing\nan identity also clears all sub accounts and returns their deposits."]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Killing:"})," It is is possible to kill an identity that deems erroneous. This results in a slash of\nthe deposit."]}),"\n",(0,i.jsx)(t.h2,{id:"setting-sub-identities",children:"Setting Sub-Identities"}),"\n",(0,i.jsxs)(t.p,{children:["To set up sub-identities with Polkadot-JS see the\n",(0,i.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181991-how-to-set-identities-for-sub-accounts",children:"how to set sub-identities"}),"\nsupport article and this ",(0,i.jsx)(t.a,{href:"https://www.youtube.com/watch?v=0Yh1JYg3ZKU",children:"video tutorial"}),"."]}),"\n",(0,i.jsx)(t.h3,{id:"setting-sub-identity-sub-id-for-your-ledger-account",children:"Setting Sub-Identity (Sub-ID) for your Ledger Account"}),"\n",(0,i.jsxs)(t.p,{children:["Setting an Identity is not possible on Ledger app yet, but as a workaround, you can\n",(0,i.jsx)(t.a,{href:"/docs/learn-identity#setting-an-identity",children:"set the identity for an on-chain account "})," and then\nuse it to set a sub-identity to your Ledger account."]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Go to ",(0,i.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"https://polkadot.js.org/apps/#/accounts"}),". Click on the three vertical dots corresponding to\nthe account to which you already set identity. You should see an option to set onchain\nsub-identities. Click on it."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Add sub-identity in PolkadotJS",src:n(69681).A+"",width:"520",height:"338"})}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["In the pop-up window, select your Ledger account from the dropdown and enter text in sub name\nfield. Then, click on set subs button.\n",(0,i.jsx)(t.img,{alt:"Set sub-identity in PolkadotJS",src:n(48570).A+"",width:"2155",height:"554"})]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Sign and submit the transaction from the parent account with the identity"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["You should now see the sub-identity displayed on-chain. You need to be aware that the creation of\nidentities and sub-identities requires\n",(0,i.jsx)(t.a,{href:"/docs/chain-state-values#identity-deposit",children:"deposits"}),". This reserved account balance is\nfreed once you ",(0,i.jsx)(t.a,{href:"/docs/learn-identity#clearing-and-killing-an-identity",children:"clear the identities"}),"\non the account."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Sub-identity example",src:n(96323).A+"",width:"370",height:"554"})}),"\n",(0,i.jsx)(t.h2,{id:"registrars",children:"Registrars"}),"\n",(0,i.jsx)(t.h3,{id:"becoming-a-registrar",children:"Becoming a Registrar"}),"\n",(0,i.jsxs)(t.p,{children:["To become a registrar, submit a pre-image and proposal on\n",(0,i.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov",children:"OpenGov"}),", then wait for people to vote on it. For best\nresults, write a post about your identity and intentions beforehand, and once the proposal is in the\nqueue ask people to endorse it so that it gets ahead in the referendum queue."]})]})}function u(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(96540),s=n(74848);const o=function(e){var t,n=e.message,o=(0,i.useState)(!0),a=o[0],r=o[1];return(0,s.jsx)(s.Fragment,{children:a&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},71014:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/16-95dc969648d23cdfdd68bf04135818bb.jpg"},69681:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/sub-id-1-18df099d5c97fdff246815ad91922e32.png"},48570:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/sub-id-2-40b39041ca30296d805003d186f66763.png"},96323:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/sub-id-3-a650cce50e6bfef97c03ebd7b463419c.png"},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>r});var i=n(96540);const s={},o=i.createContext(s);function a(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3184af97.1e72657a.js b/assets/js/3184af97.1e72657a.js new file mode 100644 index 000000000000..74bb7418fada --- /dev/null +++ b/assets/js/3184af97.1e72657a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5362],{76526:(o,e,n)=>{n.r(e),n.d(e,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>c,toc:()=>u});var t=n(74848),i=n(28453),r=n(67141);const a={id:"maintain-guides-how-to-vote-councillor",title:"Voting for Councillors",sidebar_label:"Voting for Councillors",description:"Steps on how to vote for councillors.",keywords:["council","vote","councillors"],slug:"../maintain-guides-how-to-vote-councillor"},s=void 0,c={id:"maintain/archive/maintain-guides-how-to-vote-councillor",title:"Voting for Councillors",description:"Steps on how to vote for councillors.",source:"@site/../docs/maintain/archive/maintain-guides-how-to-vote-councillor.md",sourceDirName:"maintain/archive",slug:"/maintain/maintain-guides-how-to-vote-councillor",permalink:"/docs/maintain/maintain-guides-how-to-vote-councillor",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/archive/maintain-guides-how-to-vote-councillor.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"maintain-guides-how-to-vote-councillor",title:"Voting for Councillors",sidebar_label:"Voting for Councillors",description:"Steps on how to vote for councillors.",keywords:["council","vote","councillors"],slug:"../maintain-guides-how-to-vote-councillor"},sidebar:"docs",previous:{title:"Join the Council",permalink:"/docs/maintain/maintain-guides-how-to-join-council"},next:{title:"Home",permalink:"/docs/kusama-getting-started"}},l={},u=[{value:"Voting for Councillors",id:"voting-for-councillors",level:2},{value:"Removing your Vote",id:"removing-your-vote",level:2}];function d(o){const e={a:"a",admonition:"admonition",em:"em",h2:"h2",img:"img",p:"p",strong:"strong",...(0,i.R)(),...o.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../learn-polkadot-opengov)."}),"\n",(0,t.jsxs)(e.p,{children:["The council is an elected body of on-chain accounts that are intended to represent the passive\nstakeholders of Polkadot and/or Kusama. The council has two major tasks in governance: proposing\nreferenda and vetoing dangerous or malicious referenda. For more information on the council, see the\n",(0,t.jsx)(e.a,{href:"/docs/learn/learn-governance#council",children:"governance page"}),". This guide will walk you through\nvoting for councillors in the elections."]}),"\n",(0,t.jsx)(e.h2,{id:"voting-for-councillors",children:"Voting for Councillors"}),"\n",(0,t.jsxs)(e.p,{children:["Voting for councillors requires you to reserve 20.064 DOT (0.067 KSM on Kusama) as a base amount and\nan amount of 0.032 DOT (0.0001 KSM on Kusama) per vote. You can then bond whatever amount you wish\nto put behind your vote. See the ",(0,t.jsx)(e.a,{href:"/docs/maintain/maintain-guides-democracy",children:"democracy guide"})," for more\ninformation."]}),"\n",(0,t.jsx)(e.admonition,{type:"warning",children:(0,t.jsxs)(e.p,{children:["If your balance is vesting, you cannot use unvested tokens for this lock. You will have to wait\nuntil you have at least that many ",(0,t.jsx)(e.strong,{children:"free"})," tokens to vote."]})}),"\n",(0,t.jsx)(e.p,{children:"Like the validator elections, you can approve up to 16 different councillors and your vote will be\nequalized among the chosen group. Unlike validator elections, there is no unbonding period for your\nreserved tokens. Once you remove your vote, your tokens will be liquid again."}),"\n",(0,t.jsx)(e.admonition,{type:"warning",children:(0,t.jsxs)(e.p,{children:["It is your responsibility not to put your entire balance into the reserved value when you make a\nvote for councillors. It's best to keep ",(0,t.jsx)(e.em,{children:"at least"})," enough DOT/KSM to pay for transaction fees."]})}),"\n",(0,t.jsxs)(e.p,{children:["Go to the ",(0,t.jsx)(e.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS Apps Dashboard"}),' and click on the "Council" tab.\nOn the right side of the window there are two blue buttons, click on the one that says "Vote."']}),"\n",(0,t.jsx)(e.p,{children:'Since the council uses approval voting, when you vote you signal which of the candidates you approve\nof and your voted tokens will be equalized among the selected candidates. Select up to 16 council\ncandidates by moving the slider to "Aye" for each one that you want to be elected. When you\'ve made\nthe proper configuration submit your transaction.'}),"\n",(0,t.jsx)(e.p,{children:"You should see your vote appear in the interface immediately after your transaction is included."}),"\n",(0,t.jsx)(e.h2,{id:"removing-your-vote",children:"Removing your Vote"}),"\n",(0,t.jsx)(e.p,{children:"In order to get your reserved tokens back, you will need to remove your vote. Only remove your vote\nwhen you're done participating in elections and you no longer want your reserved tokens to count for\nthe councillors that you approve."}),"\n",(0,t.jsxs)(e.p,{children:['Go to the "Governance" > "Council" tab on the\n',(0,t.jsx)(e.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS Apps Dashboard"}),"."]}),"\n",(0,t.jsx)(e.p,{children:'Under the "Council overview" tab, click on "Vote".'}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.img,{alt:"polkadotjs_removeVoter",src:n(15496).A+"",width:"1878",height:"361"})}),"\n",(0,t.jsx)(e.p,{children:'Issue the "Unvote all" option.'}),"\n",(0,t.jsx)(e.p,{children:"When the transaction is included in a block you should have your reserved tokens made liquid again\nand your vote will no longer be counting for any councillors in the elections starting in the next\nterm."})]})}function h(o={}){const{wrapper:e}={...(0,i.R)(),...o.components};return e?(0,t.jsx)(e,{...o,children:(0,t.jsx)(d,{...o})}):d(o)}},67141:(o,e,n)=>{n.d(e,{A:()=>r});var t=n(96540),i=n(74848);const r=function(o){var e,n=o.message,r=(0,t.useState)(!0),a=r[0],s=r[1];return(0,i.jsx)(i.Fragment,{children:a&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=n,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},15496:(o,e,n)=>{n.d(e,{A:()=>t});const t=n.p+"assets/images/polkadotjs_removeVoter-b66eb203df51ecdb1d926990120aa76b.png"},28453:(o,e,n)=>{n.d(e,{R:()=>a,x:()=>s});var t=n(96540);const i={},r=t.createContext(i);function a(o){const e=t.useContext(r);return t.useMemo((function(){return"function"==typeof o?o(e):{...e,...o}}),[e,o])}function s(o){let e;return e=o.disableParentContext?"function"==typeof o.components?o.components(i):o.components||i:a(o.components),t.createElement(r.Provider,{value:e},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/3184af97.bb092472.js b/assets/js/3184af97.bb092472.js deleted file mode 100644 index 79dfde0b5bee..000000000000 --- a/assets/js/3184af97.bb092472.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5362],{76526:(o,e,n)=>{n.r(e),n.d(e,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>c,toc:()=>u});var t=n(74848),i=n(28453),r=n(67141);const a={id:"maintain-guides-how-to-vote-councillor",title:"Voting for Councillors",sidebar_label:"Voting for Councillors",description:"Steps on how to vote for councillors.",keywords:["council","vote","councillors"],slug:"../maintain-guides-how-to-vote-councillor"},s=void 0,c={id:"maintain/archive/maintain-guides-how-to-vote-councillor",title:"Voting for Councillors",description:"Steps on how to vote for councillors.",source:"@site/../docs/maintain/archive/maintain-guides-how-to-vote-councillor.md",sourceDirName:"maintain/archive",slug:"/maintain/maintain-guides-how-to-vote-councillor",permalink:"/docs/maintain/maintain-guides-how-to-vote-councillor",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/archive/maintain-guides-how-to-vote-councillor.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727167801e3,frontMatter:{id:"maintain-guides-how-to-vote-councillor",title:"Voting for Councillors",sidebar_label:"Voting for Councillors",description:"Steps on how to vote for councillors.",keywords:["council","vote","councillors"],slug:"../maintain-guides-how-to-vote-councillor"},sidebar:"docs",previous:{title:"Join the Council",permalink:"/docs/maintain/maintain-guides-how-to-join-council"},next:{title:"Home",permalink:"/docs/kusama-getting-started"}},l={},u=[{value:"Voting for Councillors",id:"voting-for-councillors",level:2},{value:"Removing your Vote",id:"removing-your-vote",level:2}];function d(o){const e={a:"a",admonition:"admonition",em:"em",h2:"h2",img:"img",p:"p",strong:"strong",...(0,i.R)(),...o.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../../learn/learn-polkadot-opengov.md)."}),"\n",(0,t.jsxs)(e.p,{children:["The council is an elected body of on-chain accounts that are intended to represent the passive\nstakeholders of Polkadot and/or Kusama. The council has two major tasks in governance: proposing\nreferenda and vetoing dangerous or malicious referenda. For more information on the council, see the\n",(0,t.jsx)(e.a,{href:"/docs/learn/learn-governance#council",children:"governance page"}),". This guide will walk you through\nvoting for councillors in the elections."]}),"\n",(0,t.jsx)(e.h2,{id:"voting-for-councillors",children:"Voting for Councillors"}),"\n",(0,t.jsxs)(e.p,{children:["Voting for councillors requires you to reserve 20.064 DOT (0.067 KSM on Kusama) as a base amount and\nan amount of 0.032 DOT (0.0001 KSM on Kusama) per vote. You can then bond whatever amount you wish\nto put behind your vote. See the ",(0,t.jsx)(e.a,{href:"/docs/maintain/maintain-guides-democracy",children:"democracy guide"})," for more\ninformation."]}),"\n",(0,t.jsx)(e.admonition,{type:"warning",children:(0,t.jsxs)(e.p,{children:["If your balance is vesting, you cannot use unvested tokens for this lock. You will have to wait\nuntil you have at least that many ",(0,t.jsx)(e.strong,{children:"free"})," tokens to vote."]})}),"\n",(0,t.jsx)(e.p,{children:"Like the validator elections, you can approve up to 16 different councillors and your vote will be\nequalized among the chosen group. Unlike validator elections, there is no unbonding period for your\nreserved tokens. Once you remove your vote, your tokens will be liquid again."}),"\n",(0,t.jsx)(e.admonition,{type:"warning",children:(0,t.jsxs)(e.p,{children:["It is your responsibility not to put your entire balance into the reserved value when you make a\nvote for councillors. It's best to keep ",(0,t.jsx)(e.em,{children:"at least"})," enough DOT/KSM to pay for transaction fees."]})}),"\n",(0,t.jsxs)(e.p,{children:["Go to the ",(0,t.jsx)(e.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS Apps Dashboard"}),' and click on the "Council" tab.\nOn the right side of the window there are two blue buttons, click on the one that says "Vote."']}),"\n",(0,t.jsx)(e.p,{children:'Since the council uses approval voting, when you vote you signal which of the candidates you approve\nof and your voted tokens will be equalized among the selected candidates. Select up to 16 council\ncandidates by moving the slider to "Aye" for each one that you want to be elected. When you\'ve made\nthe proper configuration submit your transaction.'}),"\n",(0,t.jsx)(e.p,{children:"You should see your vote appear in the interface immediately after your transaction is included."}),"\n",(0,t.jsx)(e.h2,{id:"removing-your-vote",children:"Removing your Vote"}),"\n",(0,t.jsx)(e.p,{children:"In order to get your reserved tokens back, you will need to remove your vote. Only remove your vote\nwhen you're done participating in elections and you no longer want your reserved tokens to count for\nthe councillors that you approve."}),"\n",(0,t.jsxs)(e.p,{children:['Go to the "Governance" > "Council" tab on the\n',(0,t.jsx)(e.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS Apps Dashboard"}),"."]}),"\n",(0,t.jsx)(e.p,{children:'Under the "Council overview" tab, click on "Vote".'}),"\n",(0,t.jsx)(e.p,{children:(0,t.jsx)(e.img,{alt:"polkadotjs_removeVoter",src:n(15496).A+"",width:"1878",height:"361"})}),"\n",(0,t.jsx)(e.p,{children:'Issue the "Unvote all" option.'}),"\n",(0,t.jsx)(e.p,{children:"When the transaction is included in a block you should have your reserved tokens made liquid again\nand your vote will no longer be counting for any councillors in the elections starting in the next\nterm."})]})}function h(o={}){const{wrapper:e}={...(0,i.R)(),...o.components};return e?(0,t.jsx)(e,{...o,children:(0,t.jsx)(d,{...o})}):d(o)}},67141:(o,e,n)=>{n.d(e,{A:()=>r});var t=n(96540),i=n(74848);const r=function(o){var e,n=o.message,r=(0,t.useState)(!0),a=r[0],s=r[1];return(0,i.jsx)(i.Fragment,{children:a&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=n,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},15496:(o,e,n)=>{n.d(e,{A:()=>t});const t=n.p+"assets/images/polkadotjs_removeVoter-b66eb203df51ecdb1d926990120aa76b.png"},28453:(o,e,n)=>{n.d(e,{R:()=>a,x:()=>s});var t=n(96540);const i={},r=t.createContext(i);function a(o){const e=t.useContext(r);return t.useMemo((function(){return"function"==typeof o?o(e):{...e,...o}}),[e,o])}function s(o){let e;return e=o.disableParentContext?"function"==typeof o.components?o.components(i):o.components||i:a(o.components),t.createElement(r.Provider,{value:e},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/4f031749.193b86f5.js b/assets/js/4f031749.193b86f5.js deleted file mode 100644 index 6d63fe0d5c42..000000000000 --- a/assets/js/4f031749.193b86f5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1699],{35292:(o,e,t)=>{t.r(e),t.d(e,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>r,toc:()=>c});var s=t(74848),n=t(28453),a=t(67141);const i={id:"learn-guides-staking-pools",title:"Polkadot-JS Guides for Pool Creators",sidebar_label:"Nomination Pool Guides",description:"Polkadot-JS Guides about Nomination Pools.",keyword:["stake","staking","pools","create","destroy","claim","rewards","polkadot-js"],slug:"../learn-guides-staking-pools"},l=void 0,r={id:"learn/learn-guides-staking-pools",title:"Polkadot-JS Guides for Pool Creators",description:"Polkadot-JS Guides about Nomination Pools.",source:"@site/../docs/learn/learn-guides-staking-pools.md",sourceDirName:"learn",slug:"/learn-guides-staking-pools",permalink:"/docs/learn-guides-staking-pools",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-staking-pools.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1725286484e3,frontMatter:{id:"learn-guides-staking-pools",title:"Polkadot-JS Guides for Pool Creators",sidebar_label:"Nomination Pool Guides",description:"Polkadot-JS Guides about Nomination Pools.",keyword:["stake","staking","pools","create","destroy","claim","rewards","polkadot-js"],slug:"../learn-guides-staking-pools"},sidebar:"docs",previous:{title:"Nominator Guides",permalink:"/docs/learn-guides-nominator"},next:{title:"OpenGov Guides",permalink:"/docs/learn-guides-polkadot-opengov"}},d={},c=[{value:"Pool Creation with Polkadot-JS",id:"pool-creation-with-polkadot-js",level:2},{value:"Pool Upkeep with Polkadot-JS",id:"pool-upkeep-with-polkadot-js",level:2},{value:"Pool Destruction with Polkadot-JS",id:"pool-destruction-with-polkadot-js",level:2},{value:"Claim Rewards for Other Pool Members with Polkadot-JS",id:"claim-rewards-for-other-pool-members-with-polkadot-js",level:2}];function h(o){const e={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",img:"img",li:"li",p:"p",ul:"ul",...(0,n.R)(),...o.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsxs)(e.p,{children:["See ",(0,s.jsx)(e.a,{href:"/docs/learn-nomination-pools",children:"this page"})," to learn about nomination pools."]}),"\n",(0,s.jsx)(e.h2,{id:"pool-creation-with-polkadot-js",children:"Pool Creation with Polkadot-JS"}),"\n",(0,s.jsx)(e.admonition,{type:"info",children:(0,s.jsxs)(e.p,{children:["You easily create a pool using the\n",(0,s.jsx)(e.a,{href:"/docs/staking-dashboard#pools",children:"Polkadot Staking Dashboard"}),". See\n",(0,s.jsx)(e.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182388-staking-dashboard-how-to-create-a-nomination-pool#How-to-create-a-pool",children:"this support article"}),"\nfor more information."]})}),"\n",(0,s.jsxs)(e.p,{children:["The depositor calls the ",(0,s.jsx)(e.code,{children:"create"})," extrinsic, setting the administrative roles and transferring some\nfunds to the pool to add themselves as the first member. As stated above, the depositor must always\nbe a member as long as the pool exists; they will be the last member to leave, ensuring they always\nhave some skin in the game. A significant stake from the depositor is always a good indicator of the\npool's credibility."]}),"\n",(0,s.jsxs)(e.p,{children:["The current minimum bond to create a pool can be found\n",(0,s.jsx)(e.a,{href:"/docs/chain-state-values#minimum-bond-to-create-a-nomination-pool",children:"here"}),"."]}),"\n",(0,s.jsx)(e.p,{children:"The pool\u2019s \u2018nominator role\u2019 selects validators with the nominate extrinsic. On Polkadot JS Apps UI,\nnavigate to Network > Staking > Pools and click on Add Pool button."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Create Nomination Pools",src:t(8876).A+"",width:"1412",height:"638"})}),"\n",(0,s.jsx)(e.p,{children:"The UI automatically assigns an ID to the pool and allows for entering the name of the pools and the\ndeposit to be bonded."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Create Nomination Pools - deposit",src:t(75911).A+"",width:"1164",height:"458"})}),"\n",(0,s.jsxs)(e.p,{children:["When creating a pool using Polkadot JS Apps UI, all the roles are mapped to the Depositor account by\ndefault. If any of these roles need to be assigned to a different account, create the pool using\n",(0,s.jsx)(e.code,{children:"create"})," extrinsic available in\n",(0,s.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics > nominationPools"})," on Polkadot JS\nApps UI."]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Nomination Pool Roles",src:t(68442).A+"",width:"1426",height:"558"})}),"\n",(0,s.jsx)(e.h2,{id:"pool-upkeep-with-polkadot-js",children:"Pool Upkeep with Polkadot-JS"}),"\n",(0,s.jsxs)(e.p,{children:["The nominator can update the pool\u2019s validator selection. On Polkadot JS Apps UI, navigate to\n",(0,s.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"Network > Staking > Accounts page"})," and click on\nPooled button. If you have any pooled accounts with the role of nominator, you will notice the\noption to set nominees. Select the validators to nominate like you would normally using a nominator\naccount."]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Nominate validators",src:t(96296).A+"",width:"1810",height:"786"})}),"\n",(0,s.jsxs)(e.p,{children:["The root and bouncer can update the pool\u2019s state to blocked through ",(0,s.jsx)(e.code,{children:"setState"})," extrinsic and kick\nmembers by calling ",(0,s.jsx)(e.code,{children:"unbond"})," and ",(0,s.jsx)(e.code,{children:"withdrawUnbonded"}),". (The state can also be toggled back to open)."]}),"\n",(0,s.jsx)(e.h2,{id:"pool-destruction-with-polkadot-js",children:"Pool Destruction with Polkadot-JS"}),"\n",(0,s.jsx)(e.admonition,{type:"info",children:(0,s.jsxs)(e.p,{children:["As a pool admin, you can easily destroy a pool and permissionlessly remove all members using the\n",(0,s.jsx)(e.a,{href:"/docs/staking-dashboard#pools",children:"Polkadot Staking Dashboard"}),". See\n",(0,s.jsx)(e.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182388-staking-dashboard-how-to-create-a-nomination-pool#How-to-destroy-a-pool",children:"this support article"}),"\nfor more information."]})}),"\n",(0,s.jsx)(e.p,{children:"A pool can be pushed into the \u201cdestroying\u201d state via one of:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["The root and bouncer set the pool to \u201cdestroying\u201d. This can be done by submitting the\n",(0,s.jsx)(e.code,{children:"nominationPools.setState(poolId, state)"})," extrinsic using the\n",(0,s.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Polkadot-JS UI extrinsic tab"}),". Where ",(0,s.jsx)(e.code,{children:"poolId"})," is the\nspecific ID of the pool and ",(0,s.jsx)(e.code,{children:"state"}),' is the pool\'s state that must be set to "destroying". Other\npossible states are "open" and "blocked".']}),"\n",(0,s.jsxs)(e.li,{children:["Any account can set the pool to destroying if over 90% of the pool's active bonded balance has\nbeen ",(0,s.jsx)(e.a,{href:"/docs/learn-offenses",children:"slashed"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["When a pool is in \u2018destroying\u2019 state, ",(0,s.jsx)(e.code,{children:"unbond"})," and ",(0,s.jsx)(e.code,{children:"withdrawUnbonded"})," become permissionless, so\nanyone can help all the members exit."]}),"\n",(0,s.jsx)(e.p,{children:"The pool is destroyed once the depositor withdraws, no members belong to the pool, and all the\npool\u2019s resources are wiped from the state."}),"\n",(0,s.jsx)(e.h2,{id:"claim-rewards-for-other-pool-members-with-polkadot-js",children:"Claim Rewards for Other Pool Members with Polkadot-JS"}),"\n",(0,s.jsxs)(e.p,{children:["As a pool member you can claim rewards for any other members who set their\n",(0,s.jsx)(e.a,{href:"/docs/learn-nomination-pools#claim-permissions",children:"claim permissions"})," to one of the ",(0,s.jsx)(e.em,{children:"permissionless"}),"\noptions."]}),"\n",(0,s.jsxs)(e.p,{children:["Let's take the example of ALICE setting the claim permissions to ",(0,s.jsx)(e.code,{children:"PermissionlessAll"}),". Another\naccount STASH can now claim ALICE's rewards (as a free balance or compound them to the existing\nbonded balance). To do so, STASH can go to the\n",(0,s.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Polkadot-JS UI Extrinsic Tab"})," and issue the following\nextrisics:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"nominationPools.claimPayoutOthers"})," extrinsic specifying ALICE's account. This will claim the\nrewards as a free balance on ALICE's account."]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"pools-payoutOthers",src:t(65288).A+"",width:"1499",height:"458"})}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"nominationPools.bondExtraOthers"})," extrinsic specifying ALICE's account and the option to bond:","\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["the free balance currently available in ALICE's account (",(0,s.jsx)(e.code,{children:"FreeBalance"}),") or"]}),"\n",(0,s.jsxs)(e.li,{children:["the pool rewards (",(0,s.jsx)(e.code,{children:"Rewards"}),") unclaimed by ALICE."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"pools-bondExtraOthers",src:t(6829).A+"",width:"1496",height:"643"})})]})}function p(o={}){const{wrapper:e}={...(0,n.R)(),...o.components};return e?(0,s.jsx)(e,{...o,children:(0,s.jsx)(h,{...o})}):h(o)}},67141:(o,e,t)=>{t.d(e,{A:()=>a});var s=t(96540),n=t(74848);const a=function(o){var e,t=o.message,a=(0,s.useState)(!0),i=a[0],l=a[1];return(0,n.jsx)(n.Fragment,{children:i&&(0,n.jsxs)("div",{className:"message-box",children:[(0,n.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,n.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=t,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},6829:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/nomination-pools-bondExtraOthers-d4492df464bbc1cd2c04be211a78eb46.png"},65288:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/nomination-pools-payoutOthers-bfe1ad190e494f39c2c74d65e7edd12c.png"},8876:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/Nomination-Pools-1-98ee6b5592f6851aa57c9d427d70598f.png"},75911:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/Nomination-Pools-2-84da587a4d7591f2e2f79a4054214984.png"},96296:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/Nomination-Pools-5-9b16b01bde4e095d3c8fa71aa9a9a6ca.png"},68442:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/Nomination-Pools-7-74928d7825f19208592498e7b12dee5c.png"},28453:(o,e,t)=>{t.d(e,{R:()=>i,x:()=>l});var s=t(96540);const n={},a=s.createContext(n);function i(o){const e=s.useContext(a);return s.useMemo((function(){return"function"==typeof o?o(e):{...e,...o}}),[e,o])}function l(o){let e;return e=o.disableParentContext?"function"==typeof o.components?o.components(n):o.components||n:i(o.components),s.createElement(a.Provider,{value:e},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/4f031749.6b2ff26e.js b/assets/js/4f031749.6b2ff26e.js new file mode 100644 index 000000000000..f4fa3e6e1163 --- /dev/null +++ b/assets/js/4f031749.6b2ff26e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1699],{35292:(o,e,t)=>{t.r(e),t.d(e,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>r,toc:()=>c});var s=t(74848),n=t(28453),a=t(67141);const i={id:"learn-guides-staking-pools",title:"Polkadot-JS Guides for Pool Creators",sidebar_label:"Nomination Pool Guides",description:"Polkadot-JS Guides about Nomination Pools.",keyword:["stake","staking","pools","create","destroy","claim","rewards","polkadot-js"],slug:"../learn-guides-staking-pools"},l=void 0,r={id:"learn/learn-guides-staking-pools",title:"Polkadot-JS Guides for Pool Creators",description:"Polkadot-JS Guides about Nomination Pools.",source:"@site/../docs/learn/learn-guides-staking-pools.md",sourceDirName:"learn",slug:"/learn-guides-staking-pools",permalink:"/docs/learn-guides-staking-pools",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-staking-pools.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-staking-pools",title:"Polkadot-JS Guides for Pool Creators",sidebar_label:"Nomination Pool Guides",description:"Polkadot-JS Guides about Nomination Pools.",keyword:["stake","staking","pools","create","destroy","claim","rewards","polkadot-js"],slug:"../learn-guides-staking-pools"},sidebar:"docs",previous:{title:"Nominator Guides",permalink:"/docs/learn-guides-nominator"},next:{title:"OpenGov Guides",permalink:"/docs/learn-guides-polkadot-opengov"}},d={},c=[{value:"Pool Creation with Polkadot-JS",id:"pool-creation-with-polkadot-js",level:2},{value:"Pool Upkeep with Polkadot-JS",id:"pool-upkeep-with-polkadot-js",level:2},{value:"Pool Destruction with Polkadot-JS",id:"pool-destruction-with-polkadot-js",level:2},{value:"Claim Rewards for Other Pool Members with Polkadot-JS",id:"claim-rewards-for-other-pool-members-with-polkadot-js",level:2}];function h(o){const e={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",img:"img",li:"li",p:"p",ul:"ul",...(0,n.R)(),...o.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsxs)(e.p,{children:["See ",(0,s.jsx)(e.a,{href:"/docs/learn-nomination-pools",children:"this page"})," to learn about nomination pools."]}),"\n",(0,s.jsx)(e.h2,{id:"pool-creation-with-polkadot-js",children:"Pool Creation with Polkadot-JS"}),"\n",(0,s.jsx)(e.admonition,{type:"info",children:(0,s.jsxs)(e.p,{children:["You easily create a pool using the\n",(0,s.jsx)(e.a,{href:"/docs/staking-dashboard#pools",children:"Polkadot Staking Dashboard"}),". See\n",(0,s.jsx)(e.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182388-staking-dashboard-how-to-create-a-nomination-pool#How-to-create-a-pool",children:"this support article"}),"\nfor more information."]})}),"\n",(0,s.jsxs)(e.p,{children:["The depositor calls the ",(0,s.jsx)(e.code,{children:"create"})," extrinsic, setting the administrative roles and transferring some\nfunds to the pool to add themselves as the first member. As stated above, the depositor must always\nbe a member as long as the pool exists; they will be the last member to leave, ensuring they always\nhave some skin in the game. A significant stake from the depositor is always a good indicator of the\npool's credibility."]}),"\n",(0,s.jsxs)(e.p,{children:["The current minimum bond to create a pool can be found\n",(0,s.jsx)(e.a,{href:"/docs/chain-state-values#minimum-bond-to-create-a-nomination-pool",children:"here"}),"."]}),"\n",(0,s.jsx)(e.p,{children:"The pool\u2019s \u2018nominator role\u2019 selects validators with the nominate extrinsic. On Polkadot JS Apps UI,\nnavigate to Network > Staking > Pools and click on Add Pool button."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Create Nomination Pools",src:t(8876).A+"",width:"1412",height:"638"})}),"\n",(0,s.jsx)(e.p,{children:"The UI automatically assigns an ID to the pool and allows for entering the name of the pools and the\ndeposit to be bonded."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Create Nomination Pools - deposit",src:t(75911).A+"",width:"1164",height:"458"})}),"\n",(0,s.jsxs)(e.p,{children:["When creating a pool using Polkadot JS Apps UI, all the roles are mapped to the Depositor account by\ndefault. If any of these roles need to be assigned to a different account, create the pool using\n",(0,s.jsx)(e.code,{children:"create"})," extrinsic available in\n",(0,s.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics > nominationPools"})," on Polkadot JS\nApps UI."]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Nomination Pool Roles",src:t(68442).A+"",width:"1426",height:"558"})}),"\n",(0,s.jsx)(e.h2,{id:"pool-upkeep-with-polkadot-js",children:"Pool Upkeep with Polkadot-JS"}),"\n",(0,s.jsxs)(e.p,{children:["The nominator can update the pool\u2019s validator selection. On Polkadot JS Apps UI, navigate to\n",(0,s.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"Network > Staking > Accounts page"})," and click on\nPooled button. If you have any pooled accounts with the role of nominator, you will notice the\noption to set nominees. Select the validators to nominate like you would normally using a nominator\naccount."]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Nominate validators",src:t(96296).A+"",width:"1810",height:"786"})}),"\n",(0,s.jsxs)(e.p,{children:["The root and bouncer can update the pool\u2019s state to blocked through ",(0,s.jsx)(e.code,{children:"setState"})," extrinsic and kick\nmembers by calling ",(0,s.jsx)(e.code,{children:"unbond"})," and ",(0,s.jsx)(e.code,{children:"withdrawUnbonded"}),". (The state can also be toggled back to open)."]}),"\n",(0,s.jsx)(e.h2,{id:"pool-destruction-with-polkadot-js",children:"Pool Destruction with Polkadot-JS"}),"\n",(0,s.jsx)(e.admonition,{type:"info",children:(0,s.jsxs)(e.p,{children:["As a pool admin, you can easily destroy a pool and permissionlessly remove all members using the\n",(0,s.jsx)(e.a,{href:"/docs/staking-dashboard#pools",children:"Polkadot Staking Dashboard"}),". See\n",(0,s.jsx)(e.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182388-staking-dashboard-how-to-create-a-nomination-pool#How-to-destroy-a-pool",children:"this support article"}),"\nfor more information."]})}),"\n",(0,s.jsx)(e.p,{children:"A pool can be pushed into the \u201cdestroying\u201d state via one of:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["The root and bouncer set the pool to \u201cdestroying\u201d. This can be done by submitting the\n",(0,s.jsx)(e.code,{children:"nominationPools.setState(poolId, state)"})," extrinsic using the\n",(0,s.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Polkadot-JS UI extrinsic tab"}),". Where ",(0,s.jsx)(e.code,{children:"poolId"})," is the\nspecific ID of the pool and ",(0,s.jsx)(e.code,{children:"state"}),' is the pool\'s state that must be set to "destroying". Other\npossible states are "open" and "blocked".']}),"\n",(0,s.jsxs)(e.li,{children:["Any account can set the pool to destroying if over 90% of the pool's active bonded balance has\nbeen ",(0,s.jsx)(e.a,{href:"/docs/learn-offenses",children:"slashed"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["When a pool is in \u2018destroying\u2019 state, ",(0,s.jsx)(e.code,{children:"unbond"})," and ",(0,s.jsx)(e.code,{children:"withdrawUnbonded"})," become permissionless, so\nanyone can help all the members exit."]}),"\n",(0,s.jsx)(e.p,{children:"The pool is destroyed once the depositor withdraws, no members belong to the pool, and all the\npool\u2019s resources are wiped from the state."}),"\n",(0,s.jsx)(e.h2,{id:"claim-rewards-for-other-pool-members-with-polkadot-js",children:"Claim Rewards for Other Pool Members with Polkadot-JS"}),"\n",(0,s.jsxs)(e.p,{children:["As a pool member you can claim rewards for any other members who set their\n",(0,s.jsx)(e.a,{href:"/docs/learn-nomination-pools#claim-permissions",children:"claim permissions"})," to one of the ",(0,s.jsx)(e.em,{children:"permissionless"}),"\noptions."]}),"\n",(0,s.jsxs)(e.p,{children:["Let's take the example of ALICE setting the claim permissions to ",(0,s.jsx)(e.code,{children:"PermissionlessAll"}),". Another\naccount STASH can now claim ALICE's rewards (as a free balance or compound them to the existing\nbonded balance). To do so, STASH can go to the\n",(0,s.jsx)(e.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Polkadot-JS UI Extrinsic Tab"})," and issue the following\nextrisics:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"nominationPools.claimPayoutOthers"})," extrinsic specifying ALICE's account. This will claim the\nrewards as a free balance on ALICE's account."]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"pools-payoutOthers",src:t(65288).A+"",width:"1499",height:"458"})}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"nominationPools.bondExtraOthers"})," extrinsic specifying ALICE's account and the option to bond:","\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["the free balance currently available in ALICE's account (",(0,s.jsx)(e.code,{children:"FreeBalance"}),") or"]}),"\n",(0,s.jsxs)(e.li,{children:["the pool rewards (",(0,s.jsx)(e.code,{children:"Rewards"}),") unclaimed by ALICE."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"pools-bondExtraOthers",src:t(6829).A+"",width:"1496",height:"643"})})]})}function p(o={}){const{wrapper:e}={...(0,n.R)(),...o.components};return e?(0,s.jsx)(e,{...o,children:(0,s.jsx)(h,{...o})}):h(o)}},67141:(o,e,t)=>{t.d(e,{A:()=>a});var s=t(96540),n=t(74848);const a=function(o){var e,t=o.message,a=(0,s.useState)(!0),i=a[0],l=a[1];return(0,n.jsx)(n.Fragment,{children:i&&(0,n.jsxs)("div",{className:"message-box",children:[(0,n.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,n.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=t,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},6829:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/nomination-pools-bondExtraOthers-d4492df464bbc1cd2c04be211a78eb46.png"},65288:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/nomination-pools-payoutOthers-bfe1ad190e494f39c2c74d65e7edd12c.png"},8876:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/Nomination-Pools-1-98ee6b5592f6851aa57c9d427d70598f.png"},75911:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/Nomination-Pools-2-84da587a4d7591f2e2f79a4054214984.png"},96296:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/Nomination-Pools-5-9b16b01bde4e095d3c8fa71aa9a9a6ca.png"},68442:(o,e,t)=>{t.d(e,{A:()=>s});const s=t.p+"assets/images/Nomination-Pools-7-74928d7825f19208592498e7b12dee5c.png"},28453:(o,e,t)=>{t.d(e,{R:()=>i,x:()=>l});var s=t(96540);const n={},a=s.createContext(n);function i(o){const e=s.useContext(a);return s.useMemo((function(){return"function"==typeof o?o(e):{...e,...o}}),[e,o])}function l(o){let e;return e=o.disableParentContext?"function"==typeof o.components?o.components(n):o.components||n:i(o.components),s.createElement(a.Provider,{value:e},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/694672cd.82c52a90.js b/assets/js/694672cd.82c52a90.js deleted file mode 100644 index d07044523e37..000000000000 --- a/assets/js/694672cd.82c52a90.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1004],{59458:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var r=n(74848),a=n(28453),s=n(67141),o=n(3514);const i={id:"learn-guides-staking",title:"Polkadot-JS Guides about Staking",sidebar_label:"Staking Guides",description:"Polkadot-JS Guides about Staking.",keyword:["nominate","stake","staking","claim","rewards","polkadot-js","pools"],slug:"../learn-guides-staking"},l=void 0,c={id:"learn/learn-guides-staking",title:"Polkadot-JS Guides about Staking",description:"Polkadot-JS Guides about Staking.",source:"@site/../docs/learn/learn-guides-staking.md",sourceDirName:"learn",slug:"/learn-guides-staking",permalink:"/docs/learn-guides-staking",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-staking.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1714545713e3,frontMatter:{id:"learn-guides-staking",title:"Polkadot-JS Guides about Staking",sidebar_label:"Staking Guides",description:"Polkadot-JS Guides about Staking.",keyword:["nominate","stake","staking","claim","rewards","polkadot-js","pools"],slug:"../learn-guides-staking"},sidebar:"docs",previous:{title:"Transfer Guides",permalink:"/docs/learn-guides-transfers"},next:{title:"Nominator Guides",permalink:"/docs/learn-guides-nominator"}},u={},d=[];function m(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,r.jsx)(o.A,{})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(m,{...e})}):m()}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(96540),a=n(74848);const s=function(e){var t,n=e.message,s=(0,r.useState)(!0),o=s[0],i=s[1];return(0,a.jsx)(a.Fragment,{children:o&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,n)=>{n.d(t,{A:()=>x});n(96540);var r=n(34164),a=n(26972),s=n(28774),o=n(53465),i=n(16654),l=n(21312),c=n(51107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=n(74848);function m(e){var t=e.href,n=e.children;return(0,d.jsx)(s.A,{href:t,className:(0,r.A)("card padding--lg",u.cardContainer),children:n})}function p(e){var t=e.href,n=e.icon,a=e.title,s=e.description;return(0,d.jsxs)(m,{href:t,children:[(0,d.jsxs)(c.A,{as:"h2",className:(0,r.A)("text--truncate",u.cardTitle),title:a,children:[n," ",a]}),s&&(0,d.jsx)("p",{className:(0,r.A)("text--truncate",u.cardDescription),title:s,children:s})]})}function g(e){var t,n,r=e.item,s=(0,a.Nr)(r),i=(n=(0,o.W)().selectMessage,function(e){return n(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,d.jsx)(p,{href:s,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:i(r.items.length)}):null}function f(e){var t,n,r=e.item,s=(0,i.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",o=(0,a.cC)(null!=(t=r.docId)?t:void 0);return(0,d.jsx)(p,{href:r.href,icon:s,title:r.label,description:null!=(n=r.description)?n:null==o?void 0:o.description})}function h(e){var t=e.item;switch(t.type){case"link":return(0,d.jsx)(f,{item:t});case"category":return(0,d.jsx)(g,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function k(e){var t=e.className,n=(0,a.$S)();return(0,d.jsx)(x,{items:n.items,className:t})}function x(e){var t=e.items,n=e.className;if(!t)return(0,d.jsx)(k,Object.assign({},e));var s=(0,a.d1)(t);return(0,d.jsx)("section",{className:(0,r.A)("row",n),children:s.map((function(e,t){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(h,{item:e})},t)}))})}},53465:(e,t,n)=>{n.d(t,{W:()=>c});var r=n(96540),a=n(44586),s=["zero","one","two","few","many","other"];function o(e){return s.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:o(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,a.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:o(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),i}var t,n}),[e])}function c(){var e=l();return{selectMessage:function(t,n){return function(e,t,n){var r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var a=n.select(t),s=n.pluralForms.indexOf(a);return r[Math.min(s,r.length-1)]}(n,t,e)}}}},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>i});var r=n(96540);const a={},s=r.createContext(a);function o(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/694672cd.b233c3e5.js b/assets/js/694672cd.b233c3e5.js new file mode 100644 index 000000000000..7b8230e0a717 --- /dev/null +++ b/assets/js/694672cd.b233c3e5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1004],{59458:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var r=n(74848),s=n(28453),a=n(67141),o=n(3514);const i={id:"learn-guides-staking",title:"Polkadot-JS Guides about Staking",sidebar_label:"Staking Guides",description:"Polkadot-JS Guides about Staking.",keyword:["nominate","stake","staking","claim","rewards","polkadot-js","pools"],slug:"../learn-guides-staking"},l=void 0,c={id:"learn/learn-guides-staking",title:"Polkadot-JS Guides about Staking",description:"Polkadot-JS Guides about Staking.",source:"@site/../docs/learn/learn-guides-staking.md",sourceDirName:"learn",slug:"/learn-guides-staking",permalink:"/docs/learn-guides-staking",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-staking.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-staking",title:"Polkadot-JS Guides about Staking",sidebar_label:"Staking Guides",description:"Polkadot-JS Guides about Staking.",keyword:["nominate","stake","staking","claim","rewards","polkadot-js","pools"],slug:"../learn-guides-staking"},sidebar:"docs",previous:{title:"Transfer Guides",permalink:"/docs/learn-guides-transfers"},next:{title:"Nominator Guides",permalink:"/docs/learn-guides-nominator"}},u={},d=[];function m(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,r.jsx)(o.A,{})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(m,{...e})}):m()}},67141:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(96540),s=n(74848);const a=function(e){var t,n=e.message,a=(0,r.useState)(!0),o=a[0],i=a[1];return(0,s.jsx)(s.Fragment,{children:o&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,n)=>{n.d(t,{A:()=>x});n(96540);var r=n(34164),s=n(26972),a=n(28774),o=n(53465),i=n(16654),l=n(21312),c=n(51107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=n(74848);function m(e){var t=e.href,n=e.children;return(0,d.jsx)(a.A,{href:t,className:(0,r.A)("card padding--lg",u.cardContainer),children:n})}function p(e){var t=e.href,n=e.icon,s=e.title,a=e.description;return(0,d.jsxs)(m,{href:t,children:[(0,d.jsxs)(c.A,{as:"h2",className:(0,r.A)("text--truncate",u.cardTitle),title:s,children:[n," ",s]}),a&&(0,d.jsx)("p",{className:(0,r.A)("text--truncate",u.cardDescription),title:a,children:a})]})}function g(e){var t,n,r=e.item,a=(0,s.Nr)(r),i=(n=(0,o.W)().selectMessage,function(e){return n(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,d.jsx)(p,{href:a,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:i(r.items.length)}):null}function f(e){var t,n,r=e.item,a=(0,i.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",o=(0,s.cC)(null!=(t=r.docId)?t:void 0);return(0,d.jsx)(p,{href:r.href,icon:a,title:r.label,description:null!=(n=r.description)?n:null==o?void 0:o.description})}function h(e){var t=e.item;switch(t.type){case"link":return(0,d.jsx)(f,{item:t});case"category":return(0,d.jsx)(g,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function k(e){var t=e.className,n=(0,s.$S)();return(0,d.jsx)(x,{items:n.items,className:t})}function x(e){var t=e.items,n=e.className;if(!t)return(0,d.jsx)(k,Object.assign({},e));var a=(0,s.d1)(t);return(0,d.jsx)("section",{className:(0,r.A)("row",n),children:a.map((function(e,t){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(h,{item:e})},t)}))})}},53465:(e,t,n)=>{n.d(t,{W:()=>c});var r=n(96540),s=n(44586),a=["zero","one","two","few","many","other"];function o(e){return a.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:o(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,s.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:o(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),i}var t,n}),[e])}function c(){var e=l();return{selectMessage:function(t,n){return function(e,t,n){var r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var s=n.select(t),a=n.pluralForms.indexOf(s);return r[Math.min(a,r.length-1)]}(n,t,e)}}}},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>i});var r=n(96540);const s={},a=r.createContext(s);function o(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6bfbfa77.64b2125b.js b/assets/js/6bfbfa77.64b2125b.js deleted file mode 100644 index 674910f8d335..000000000000 --- a/assets/js/6bfbfa77.64b2125b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2858],{7723:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>s,metadata:()=>h,toc:()=>d});var t=a(74848),i=a(28453),o=a(67141);const s={id:"learn-auction",title:"Parachain Slot Auctions",sidebar_label:"Parachain Slot Auctions",description:"Polkadot's Parachain Slot Auction Mechanism.",keywords:["auction","slot auctions","parachain","bidding"],slug:"../learn-auction"},r=void 0,h={id:"learn/archive/learn-auction",title:"Parachain Slot Auctions",description:"Polkadot's Parachain Slot Auction Mechanism.",source:"@site/../docs/learn/archive/learn-auction.md",sourceDirName:"learn/archive",slug:"/learn/learn-auction",permalink:"/docs/learn/learn-auction",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-auction.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1728027142e3,frontMatter:{id:"learn-auction",title:"Parachain Slot Auctions",sidebar_label:"Parachain Slot Auctions",description:"Polkadot's Parachain Slot Auction Mechanism.",keywords:["auction","slot auctions","parachain","bidding"],slug:"../learn-auction"},sidebar:"docs",previous:{title:"Controller Accounts",permalink:"/docs/learn/learn-controller"},next:{title:"Parachain Crowdloans",permalink:"/docs/learn/learn-crowdloans"}},l={},d=[{value:"Mechanics of a Candle Auction",id:"mechanics-of-a-candle-auction",level:2},{value:"Randomness in action",id:"randomness-in-action",level:3},{value:"Rationale",id:"rationale",level:2},{value:"Network Implementation",id:"network-implementation",level:2},{value:"Bidding",id:"bidding",level:2},{value:"Examples",id:"examples",level:3},{value:"Parachain Lease Extension",id:"parachain-lease-extension",level:2},{value:"Lease Extension with Overlapping Slots",id:"lease-extension-with-overlapping-slots",level:3},{value:"Lease Extension with Non-Overlapping Slots",id:"lease-extension-with-non-overlapping-slots",level:3},{value:"Slot Auctions FAQ",id:"slot-auctions-faq",level:2},{value:"Why doesn't everyone bid for the max length?",id:"why-doesnt-everyone-bid-for-the-max-length",level:3},{value:"How does this mechanism help ensure parachain diversity?",id:"how-does-this-mechanism-help-ensure-parachain-diversity",level:3},{value:"Why is randomness difficult on blockchains?",id:"why-is-randomness-difficult-on-blockchains",level:3},{value:"Are there other ways of acquiring a slot besides the candle auction?",id:"are-there-other-ways-of-acquiring-a-slot-besides-the-candle-auction",level:3},{value:"How are auctions scheduled?",id:"how-are-auctions-scheduled",level:3},{value:"Resources",id:"resources",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.A,{message:"The content on this page is archived. [Agile Coretime](../learn-agile-coretime.md) is activated on the network, and parachain slot auctions have been deprecated. For existing parachains, the remainder of the lease is automatically converted to coretime. See more information [here](../learn-agile-coretime.md#implementation)."}),"\n",(0,t.jsxs)(n.p,{children:["For a ",(0,t.jsx)(n.a,{href:"/docs/learn-parachains",children:"parachain"})," to be added to the relay chain it must inhabit one of the\navailable parachain slots. The number of parachain slots is not unbounded, as only a limited number\nare available. A limited number of slots are unlocked every few months through on-chain governance.\nIf a parachain wants to have guaranteed block inclusion at every relay chain block, it must acquire\na parachain slot. The development of\n",(0,t.jsx)(n.a,{href:"https://forum.polkadot.network/t/on-demand-parachains/2208",children:"on-demand parachains"})," is complete, and\nthey can be deployed after Agile Coretime is live on the network."]}),"\n",(0,t.jsxs)(n.p,{children:["The parachain slots will be leased according to an unpermissioned\n",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Candle_auction",children:"candle auction"}),", with several alterations related to\nimproving security while operating on a blockchain. See ",(0,t.jsx)(n.a,{href:"#rationale",children:"Rationale"})," for additional\ndetails."]}),"\n",(0,t.jsx)("div",{className:"row",children:(0,t.jsxs)("div",{className:"col text--center",children:[(0,t.jsx)("a",{href:"https://youtu.be/i5-Rw2Sf7-w",children:(0,t.jsx)("img",{src:"https://img.youtube.com/vi/i5-Rw2Sf7-w/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,t.jsx)("p",{children:(0,t.jsx)("a",{href:"https://youtu.be/i5-Rw2Sf7-w",children:"A Beginner's guide to Parachain Slot Auctions"})})]})}),"\n",(0,t.jsx)(n.h2,{id:"mechanics-of-a-candle-auction",children:"Mechanics of a Candle Auction"}),"\n",(0,t.jsx)(n.p,{children:"Candle auctions are a variant of open auctions where bidders submit bids that are increasingly\nhigher. The highest bidder at the conclusion of the auction is considered the winner."}),"\n",(0,t.jsx)(n.p,{children:'Candle auctions were originally employed in the 16th century for the sale of ships. The name is\nderived from the system by which the auction length was determined. The phrase "inch of a candle"\nrefers to the length of time required for a candle to burn down 1 inch. When the flame extinguishes\nand the candle goes out, the auction terminates and the standing bid at that point in time prevails\nthe winner.'}),"\n",(0,t.jsx)(n.p,{children:"When candle auctions are used online, they require a random number to decide the moment of\ntermination. Parachain slot auctions differ slightly from a normal candle auction in that they do\nnot randomly terminate the auction. Instead, they run for an entire fixed duration and the winner is\nrandomly chosen retroactively."}),"\n",(0,t.jsx)(n.p,{children:"The candle auction is split into two parts:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.em,{children:"opening period"})," which is in effect immediately after the auction starts. This period lasts\nfor one day and eighteen hours and serves as a buffer time for parachain candidates to setup\ntheir initial bids, and likely start executing their strategy on how to win the slot auction.\nDuring the opening phase, bids will continue to be accepted, but they do not have any effect on\nthe outcome of the auction."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.em,{children:"ending period"})," follows the opening period for five additional days, where the auction is\nsubject to end based on the candle auction mechanism."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["The auction\u2019s ending time can occur any time within the ending period. This time is automatically\nand randomly chosen by the ",(0,t.jsx)(n.a,{href:"/docs/learn-cryptography#vrf",children:"Verifiable Random Function (VRF)"}),". The\nprobability of winning the auction is equal to the number of blocks that contain a winning bid,\ndivided by the total number of blocks in the ending period. The random ending is managed by\npropagating through the entire ending period, where a snapshot is taken at each block within the\nending period to capture the winners for that given block. At the end of the period, one of the\nsnapshots is randomly selected to determine the winner of the auction."]}),"\n",(0,t.jsx)(n.admonition,{title:"The parachain candidate with the highest bid at the ending time chosen by the Verifiable",type:"info",children:(0,t.jsx)(n.p,{children:"Random Function wins the slot auction."})}),"\n",(0,t.jsxs)(n.p,{children:["A parachain auction lasts exactly one week from the starting period (1 day and 18 hours) to\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#auction-ending-period",children:"ending period"})," (candle auction phase)\nand finally 6 hours for determining the auction winner."]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"/docs/learn/learn-crowdloans##supporting-a-crowdloan-campaign",children:"Crowdloan contributions"})," cannot be made\nduring these six hours when the winning block for the auction is being determined on-chain."]})}),"\n",(0,t.jsxs)(n.p,{children:["More details on this are available in the ",(0,t.jsx)(n.a,{href:"#network-implementation",children:"Network Implementation"})," section."]}),"\n",(0,t.jsxs)(n.h3,{id:"randomness-in-action",children:[(0,t.jsx)(n.a,{href:"/docs/learn-cryptography#randomness",children:"Randomness"})," in action"]}),"\n",(0,t.jsx)(n.p,{children:"The following example will showcase the randomness mechanics of the candle auction for the ninth\nauction on Kusama. Keep in mind that the candle phase has a uniform termination profile and has an\nequal probability of ending at any given block, and the termination block cannot be predicted before\nor during the auction."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The ending period of auction 9 starts at ",(0,t.jsx)(n.a,{href:"https://kusama.subscan.io/auction/9",children:(0,t.jsx)(n.code,{children:"block 9362014"})}),"."]}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsxs)(n.mdxAdmonitionTitle,{children:["The auction has a full duration equal to ",(0,t.jsx)(n.code,{children:"block 9362014"})," + ",(0,t.jsx)(n.code,{children:"72000"})]}),(0,t.jsxs)(n.p,{children:["Here, ",(0,t.jsx)(n.code,{children:"block 72000"}),' is the "ending period", which is divided into ',(0,t.jsx)(n.strong,{children:"3600 samples of 20 blocks"}),".\nFiguratively, the candle is lit, and the candle phase lasts for 72,000 blocks."]})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The winning sample during the ending period had the ",(0,t.jsx)(n.code,{children:"index 1078"}),"."]}),"\n",(0,t.jsx)(n.admonition,{title:"Sample 1078 is the winner",type:"note",children:(0,t.jsxs)(n.p,{children:["Sample 1078 refers to the winner as of ",(0,t.jsx)(n.code,{children:"block 9362014 + 21560"}),", which equals\n",(0,t.jsx)(n.a,{href:"https://kusama.subscan.io/block/9383574",children:(0,t.jsx)(n.code,{children:"block 9383574"})}),"."]})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The parent block was a new BABE session in the ",(0,t.jsx)(n.code,{children:"Logs"}),", which updated the randomness that was used\nto select that ",(0,t.jsx)(n.a,{href:"https://kusama.subscan.io/block/9434277",children:"sample index"}),"."]}),"\n",(0,t.jsx)(n.admonition,{title:"Inspecting the block state",type:"note",children:(0,t.jsxs)(n.p,{children:["You can inspect the state at the end of ",(0,t.jsx)(n.code,{children:"block 9434277"})," to see the sample indices with an\n",(0,t.jsx)(n.a,{href:"/docs/maintain-sync####types-of-nodes",children:"archive node"}),". The digest in the ",(0,t.jsx)(n.code,{children:"Logs"})," of\n",(0,t.jsx)(n.code,{children:"9434277"})," is decodable and contains the random value as well as the BABE authorities."]})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"As a result, the winner of this auction was not the highest bid during the full duration."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"rationale",children:"Rationale"}),"\n",(0,t.jsxs)(n.p,{children:["The open and transparent nature of blockchain systems opens attack vectors that are non-existent in\ntraditional auction formats. Normal open auctions in particular can be vulnerable to ",(0,t.jsx)(n.em,{children:"auction\nsniping"})," when implemented over the internet or on a blockchain."]}),"\n",(0,t.jsx)(n.p,{children:"Auction sniping takes place when the end of an auction is known and bidders are hesitant to bid\ntheir true price early, in hopes of paying less than they actually value the item."}),"\n",(0,t.jsx)(n.p,{children:"For example, Alice may value an item at auction for 30 USD. She submits an initial bid of 10 USD in\nhopes of acquiring the items at a lower price. Alice's strategy is to place incrementally higher\nbids until her true value of 30 USD is exceeded. Another bidder Eve values the same item at 11 USD.\nEve's strategy is to watch the auction and submit a bid of 11 USD at the last second. Alice will\nhave no time to respond to this bid before the close of the auction and will lose the item. The\nauction mechanism is sub-optimal because it has not discovered the true price of the item and the\nitem has not gone to the actor who valued it the most."}),"\n",(0,t.jsxs)(n.p,{children:["On blockchains this problem may be even worse, since it potentially gives the producer of the block\nan opportunity to snipe any auction at the last concluding block by adding it themselves while\nignoring other bids. There is also the possibility of a malicious bidder or a block producer trying\nto ",(0,t.jsx)(n.em,{children:"grief"})," honest bidders by sniping auctions."]}),"\n",(0,t.jsxs)(n.p,{children:["For this reason, ",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Vickrey_auction",children:"Vickrey auctions"}),", a type of\nsealed-bid auction where bids are hidden and only revealed at a later phase, have emerged as a\nwell-regarded mechanic. For example, this mechanism is leveraged to auction human readable names on\nthe ",(0,t.jsx)(n.a,{href:"/docs/learn-account-advanced",children:"ENS"}),". The Candle auction is another solution that does not\nrequire a two-step commit and reveal schemes (a main component of Vickrey auctions), which allows\nsmart contracts to participate."]}),"\n",(0,t.jsx)(n.p,{children:"Candle auctions allow everyone to always know the states of the bid, but they do not reveal when the\nauction has officially ended. This helps to ensure that bidders are willing to make their true bids\nearly. Otherwise, they may find themselves in a situation where the auction was determined to have\nended before having an opportunity to bid."}),"\n",(0,t.jsx)(n.h2,{id:"network-implementation",children:"Network Implementation"}),"\n",(0,t.jsxs)(n.p,{children:["The relay chain will use a ",(0,t.jsx)(n.em,{children:"random beacon"})," based on the\n",(0,t.jsx)(n.a,{href:"/docs/learn-cryptography#vrf",children:"Verifiable Random Function (VRF)"}),". The VRF will provide the base of\nthe randomness, which will retroactively determine the end-time of the auction."]}),"\n",(0,t.jsx)(n.p,{children:"Polkadot's slot durations are capped to 2 years and are divided into 3-month periods (1 year divided\ninto 6-week periods for Kusama). Parachains may lease a slot for any combination of periods of the\nslot duration. Parachains may lease more than one slot over time, meaning that they could extend\ntheir lease to the network past the maximum duration by leasing a contiguous slot."}),"\n",(0,t.jsx)(n.admonition,{title:"Individual parachain slots are fungible",type:"note",children:(0,t.jsx)(n.p,{children:"This means that parachains do not need to always inhabit the same slot, however they always must\nmaintain a slot to remain a parachain."})}),"\n",(0,t.jsx)(n.h2,{id:"bidding",children:"Bidding"}),"\n",(0,t.jsxs)(n.p,{children:["Parachains or parachain teams, bid in the auction by specifying the slot range that they want to\nlease and the number of tokens they are willing to reserve. Bidders can be either ordinary accounts,\nor use the ",(0,t.jsx)(n.a,{href:"/docs/learn/learn-crowdloans",children:"crowdloan functionality"})," to source tokens from the community. For\na more in-depth comparison between both of these options for gaining a parachain slot, check out\nthis section on\n",(0,t.jsx)(n.a,{href:"/docs/learn/learn-crowdloans#crowdloan-campaigns-vs-parachain-auctions",children:"Crowdloan Campaigns vs Parachain Auctions"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"Parachain slots at genesis\n\n --3 months--\n v v\nSlot A | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot B | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot C |__________| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot D |__________| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot E |__________|___________| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\n ^ ^\n ---------------------------------------------max lease-----------------------------------------\n\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.em,{children:"Each period of the range 1 - 4 represents a 3-month duration for a total of 2 years for Polkadot\n(or 6-week duration for a total of 1 year for Kusama)."})}),"\n",(0,t.jsxs)(n.p,{children:["Bidders will submit a configuration of bids specifying the token amount they are willing to bond and\nfor which periods. The slot ranges may be any of the periods 1 - ",(0,t.jsx)(n.code,{children:"n"}),", where ",(0,t.jsx)(n.code,{children:"n"})," is the number of\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#period-per-slot-auction",children:"periods available for a slot"}),"."]}),"\n",(0,t.jsx)(n.admonition,{title:"If you bond tokens with a parachain slot, you cannot stake with those tokens. In this way,",type:"note",children:(0,t.jsx)(n.p,{children:"you pay for the parachain slot by forfeiting the opportunity to earn staking rewards."})}),"\n",(0,t.jsx)(n.p,{children:"A bidder configuration for a single bidder may look like the following pseudocode example:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-js",children:"const bids = [\n {\n range: [1, 2, 3, 4, 5, 6, 7, 8],\n bond_amount: 300,\n },\n {\n range: [1, 2, 3, 4],\n bond_amount: 777,\n },\n {\n range: [2, 3, 4, 5, 6, 7],\n bond_amount: 450,\n },\n];\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The important concept to understand from this example is that bidders may submit different\nconfigurations at different prices (",(0,t.jsx)(n.code,{children:"bond_amount"}),"). However, only one of these bids would be\neligible to win exclusive of the others."]}),"\n",(0,t.jsxs)(n.p,{children:["The winner selection algorithm will pick bids that may be non-overlapping in order to maximize the\namount of tokens held over the entire lease duration of the parachain slot. This means that the\nhighest bidder for any given slot lease period might not always win (see the\n",(0,t.jsx)(n.a,{href:"#examples",children:"example below"}),")."]}),"\n",(0,t.jsxs)(n.p,{children:["A random number, which is based on the ",(0,t.jsx)(n.a,{href:"/docs/learn-cryptography#vrf",children:"VRF"})," used by the relay chain,\nis determined at each block. Additionally, each auction will have a threshold that starts at 0 and\nincreases to 1. The random number produced by the VRF is examined next to the threshold to determine\nif that block is the end of the auction within the so-called ",(0,t.jsx)(n.em,{children:"ending period"}),". Additionally, the VRF\nwill pick a block from the last epoch to access the state of bids which can help aid in mitigating\nsome types of attacks from malicious validators."]}),"\n",(0,t.jsx)(n.h3,{id:"examples",children:"Examples"}),"\n",(0,t.jsx)(n.p,{children:"There is one parachain slot available."}),"\n",(0,t.jsxs)(n.p,{children:["Charlie bids ",(0,t.jsx)(n.code,{children:"75"})," for the range 1 - 8."]}),"\n",(0,t.jsxs)(n.p,{children:["Dave bids ",(0,t.jsx)(n.code,{children:"100"})," for the range 5 - 8."]}),"\n",(0,t.jsxs)(n.p,{children:["Emily bids ",(0,t.jsx)(n.code,{children:"40"})," for the range 1 - 4."]}),"\n",(0,t.jsx)(n.p,{children:"Let's calculate each bidder's valuation according to the algorithm. We do this by multiplying the\nbond amount by the number of periods in the specified range of the bid."}),"\n",(0,t.jsx)(n.p,{children:"Charlie - 75 * 8 = 600 for range 1 - 8"}),"\n",(0,t.jsx)(n.p,{children:"Dave - 100 * 4 = 400 for range 5 - 8"}),"\n",(0,t.jsx)(n.p,{children:"Emily - 40 * 4 = 160 for range 1 - 4"}),"\n",(0,t.jsxs)(n.p,{children:["Although Dave had the highest bid in accordance to token amount per period, when we do the\ncalculations we see that since he only bid for a range of 4, he would need to share the slot with\nEmily who bid much less. Together Dave and Emily's bids only equals a valuation of ",(0,t.jsx)(n.code,{children:"560"}),". Charlie's\nvaluation for the entire range is ",(0,t.jsx)(n.code,{children:"600"}),". Therefore Charlie is awarded the complete range of the\nparachain slot."]}),"\n",(0,t.jsx)(n.h2,{id:"parachain-lease-extension",children:"Parachain Lease Extension"}),"\n",(0,t.jsx)(n.p,{children:"Before the slot lease expires, parachains have to bid and win another auction for continuity of the\nlease. To avoid any downtime in connectivity and minimize the risk of losing a subsequent auction,\nparachain teams need to plan ahead to bid for the lease extension before their current lease period\nends. Explained in the section above, each auction lets you bid for 8 LPs (Lease Periods) which\nenables two scenarios for the parachain's lease extension."}),"\n",(0,t.jsx)(n.h3,{id:"lease-extension-with-overlapping-slots",children:"Lease Extension with Overlapping Slots"}),"\n",(0,t.jsx)(n.p,{children:"Acquire a slot where the first lease period is before the last lease period of the current slot."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Register a new ",(0,t.jsx)(n.code,{children:"paraId"})]}),"\n",(0,t.jsxs)(n.li,{children:["Win a slot auction with the new ",(0,t.jsx)(n.code,{children:"paraId"})]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"The parachain team has access to two slots:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"one that will end soon"}),"\n",(0,t.jsx)(n.li,{children:"one that just started"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Both slots have at least one LP in common. When the old slot transitions to their last LP, the\nparachain can ",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/pull/4772",children:"swap"})," the slots. This can be done\nvia ",(0,t.jsx)(n.a,{href:"https://kusama.polkassembly.io/post/1491",children:"on-chain governance"}),". The ",(0,t.jsx)(n.code,{children:"swap"})," call is available in\nthe ",(0,t.jsx)(n.code,{children:"registrar"})," pallet."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Parachain Slot Swap",src:a(28836).A+"",width:"1286",height:"896"})}),"\n",(0,t.jsx)(n.admonition,{title:"Any two parachains can swap their slots via XCM",type:"note",children:(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/pull/4772",children:"slot swap via XCM"})," requires two live\nparachains to send an XCM message to the relay chain to approve the swap. A parachain team with\naccess to two overlapping slots can start a shell parachain on the new slot and swap it with their\nactual parachain on the old slot, thus ensuring continuity of the lease."]})}),"\n",(0,t.jsx)(n.h3,{id:"lease-extension-with-non-overlapping-slots",children:"Lease Extension with Non-Overlapping Slots"}),"\n",(0,t.jsxs)(n.p,{children:["Acquire a slot where the first LP starts right after the end of the last LP of the current slot. In\nthis case, the parachain can bid directly with their current ",(0,t.jsx)(n.code,{children:"paraId"}),", and it will be automatically\nextended without the need of swapping. This method has the advantage of not having superfluous LP's\non different slots owned by the same team, however it has the disadvantage of losing flexibility on\nwhen to win a new slot: if the team does not win the exact slot, then it will suffer some downtime\nuntil it wins a new slot."]}),"\n",(0,t.jsx)(n.h2,{id:"slot-auctions-faq",children:"Slot Auctions FAQ"}),"\n",(0,t.jsx)(n.h3,{id:"why-doesnt-everyone-bid-for-the-max-length",children:"Why doesn't everyone bid for the max length?"}),"\n",(0,t.jsx)(n.p,{children:"For the duration of the slot, the tokens used for bidding in the auction are locked up. This\nsuggests there is an opportunity cost associated with bidding, as the tokens could have been\nleveraged for something else."}),"\n",(0,t.jsx)(n.h3,{id:"how-does-this-mechanism-help-ensure-parachain-diversity",children:"How does this mechanism help ensure parachain diversity?"}),"\n",(0,t.jsx)(n.p,{children:"The method for dividing the parachain slots into intervals was partly inspired by the desire to\nallow for a greater amount of parachain diversity, while preventing particularly large and\nwell-funded parachains from hoarding slots. By making each period a three-month duration but the\noverall slot a 2-year duration (and 6-week duration but the overall slot a 1-year duration on\nKusama), the mechanism can cope with well-funded parachains, ensuring they secure a slot at the end\nof their lease, while gradually allowing other parachains to enter the ecosystem to occupy the\ndurations that are not filled. For example, if a large, well-funded parachain has already acquired a\nslot for range 1 - 8, they would be very interested in getting the next slot that would open for\n2 - 9. Under this mechanism, that parachain could acquire just period 9 (since that is the only one\nrequired) and allow the 2 - 8 range of the second parachain slot to be occupied by another party."}),"\n",(0,t.jsx)(n.h3,{id:"why-is-randomness-difficult-on-blockchains",children:"Why is randomness difficult on blockchains?"}),"\n",(0,t.jsxs)(n.p,{children:["Generating a random number trustlessly on a transparent and open network opens up the possibility\nfor bad actors to attempt to alter or manipulate the randomness. There have been a few solutions\nthat have been proposed, including hash-onions like ",(0,t.jsx)(n.a,{href:"https://github.com/randao/randao",children:"RANDAO"})," and\n",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Verifiable_random_function",children:"verifiable random functions"})," (VRFs). The\nlatter is what the relay chain uses as a base for its randomness."]}),"\n",(0,t.jsx)(n.h3,{id:"are-there-other-ways-of-acquiring-a-slot-besides-the-candle-auction",children:"Are there other ways of acquiring a slot besides the candle auction?"}),"\n",(0,t.jsx)(n.p,{children:"Aa parachain slot can also be acquired through a secondary market where a 3rd party has already won\na parachain slot and has the ability to resell the slot along with the associated deposit of tokens\nthat are locked up to another buyer. This would allow the seller to get liquid tokens in exchange\nfor the parachain slot and the buyer to acquire the slot as well as the deposited tokens."}),"\n",(0,t.jsxs)(n.p,{children:["A number of system or common-good parachains may be granted slots by the\n",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance"})," of the relay chain. System parachains can be recognized\nby a parachain ID lower than 1_000, and common-good parachains by a parachain ID between 1_000 and\n1_999. Other parachains will have IDs 2_000 or higher. Such parachains would not have to bid for or\nrenew their slots as they would be considered essential to the ecosystem's future."]}),"\n",(0,t.jsx)(n.h3,{id:"how-are-auctions-scheduled",children:"How are auctions scheduled?"}),"\n",(0,t.jsxs)(n.p,{children:["The parachain slot auctions are scheduled through the governance. At least 2/3 of the Council can\ninitiate an auction, however, Root origin (via referendum) is needed to cancel an auction. Here is a\nproposal that gives a glimpse of what goes into planning auctions schedule -\n",(0,t.jsx)(n.a,{href:"https://polkadot.polkassembly.io/post/863",children:"Proposed Polkadot Auction Schedule 2022"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182287-how-does-a-parachain-slots-auction-work-",children:"How do Parachain Slot Auctions Work"})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/overview/parachain-allocation",children:"Parachain Allocation"})," -\nW3F research page on parachain allocation that goes more in depth to the mechanism"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://polkadot.network/blog/research-update-the-case-for-candle-auctions/",children:"Research Update: The Case for Candle Auctions"})," -\nW3F breakdown and research update about candle auctions"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3846363",children:"Front-Running, Smart Contracts, and Candle Auctions"}),"\nW3F Research team discusses how to remedy current blockchain auction setbacks with candle auctions"]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},67141:(e,n,a)=>{a.d(n,{A:()=>o});var t=a(96540),i=a(74848);const o=function(e){var n,a=e.message,o=(0,t.useState)(!0),s=o[0],r=o[1];return(0,i.jsx)(i.Fragment,{children:s&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=a,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28836:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/para-swap-3c765fb9e6860c7d7489a758af065cb0.png"},28453:(e,n,a)=>{a.d(n,{R:()=>s,x:()=>r});var t=a(96540);const i={},o=t.createContext(i);function s(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6bfbfa77.6b196d64.js b/assets/js/6bfbfa77.6b196d64.js new file mode 100644 index 000000000000..1c691ef211b8 --- /dev/null +++ b/assets/js/6bfbfa77.6b196d64.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2858],{7723:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>s,metadata:()=>h,toc:()=>d});var t=a(74848),i=a(28453),o=a(67141);const s={id:"learn-auction",title:"Parachain Slot Auctions",sidebar_label:"Parachain Slot Auctions",description:"Polkadot's Parachain Slot Auction Mechanism.",keywords:["auction","slot auctions","parachain","bidding"],slug:"../learn-auction"},r=void 0,h={id:"learn/archive/learn-auction",title:"Parachain Slot Auctions",description:"Polkadot's Parachain Slot Auction Mechanism.",source:"@site/../docs/learn/archive/learn-auction.md",sourceDirName:"learn/archive",slug:"/learn/learn-auction",permalink:"/docs/learn/learn-auction",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-auction.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-auction",title:"Parachain Slot Auctions",sidebar_label:"Parachain Slot Auctions",description:"Polkadot's Parachain Slot Auction Mechanism.",keywords:["auction","slot auctions","parachain","bidding"],slug:"../learn-auction"},sidebar:"docs",previous:{title:"Controller Accounts",permalink:"/docs/learn/learn-controller"},next:{title:"Parachain Crowdloans",permalink:"/docs/learn/learn-crowdloans"}},l={},d=[{value:"Mechanics of a Candle Auction",id:"mechanics-of-a-candle-auction",level:2},{value:"Randomness in action",id:"randomness-in-action",level:3},{value:"Rationale",id:"rationale",level:2},{value:"Network Implementation",id:"network-implementation",level:2},{value:"Bidding",id:"bidding",level:2},{value:"Examples",id:"examples",level:3},{value:"Parachain Lease Extension",id:"parachain-lease-extension",level:2},{value:"Lease Extension with Overlapping Slots",id:"lease-extension-with-overlapping-slots",level:3},{value:"Lease Extension with Non-Overlapping Slots",id:"lease-extension-with-non-overlapping-slots",level:3},{value:"Slot Auctions FAQ",id:"slot-auctions-faq",level:2},{value:"Why doesn't everyone bid for the max length?",id:"why-doesnt-everyone-bid-for-the-max-length",level:3},{value:"How does this mechanism help ensure parachain diversity?",id:"how-does-this-mechanism-help-ensure-parachain-diversity",level:3},{value:"Why is randomness difficult on blockchains?",id:"why-is-randomness-difficult-on-blockchains",level:3},{value:"Are there other ways of acquiring a slot besides the candle auction?",id:"are-there-other-ways-of-acquiring-a-slot-besides-the-candle-auction",level:3},{value:"How are auctions scheduled?",id:"how-are-auctions-scheduled",level:3},{value:"Resources",id:"resources",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.A,{message:"The content on this page is archived. [Agile Coretime](../learn-agile-coretime) is activated on the network, and parachain slot auctions have been deprecated. For existing parachains, the remainder of the lease is automatically converted to coretime. See more information [here](../learn-agile-coretime#implementation)."}),"\n",(0,t.jsxs)(n.p,{children:["For a ",(0,t.jsx)(n.a,{href:"/docs/learn-parachains",children:"parachain"})," to be added to the relay chain it must inhabit one of the\navailable parachain slots. The number of parachain slots is not unbounded, as only a limited number\nare available. A limited number of slots are unlocked every few months through on-chain governance.\nIf a parachain wants to have guaranteed block inclusion at every relay chain block, it must acquire\na parachain slot. The development of\n",(0,t.jsx)(n.a,{href:"https://forum.polkadot.network/t/on-demand-parachains/2208",children:"on-demand parachains"})," is complete, and\nthey can be deployed after Agile Coretime is live on the network."]}),"\n",(0,t.jsxs)(n.p,{children:["The parachain slots will be leased according to an unpermissioned\n",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Candle_auction",children:"candle auction"}),", with several alterations related to\nimproving security while operating on a blockchain. See ",(0,t.jsx)(n.a,{href:"#rationale",children:"Rationale"})," for additional\ndetails."]}),"\n",(0,t.jsx)("div",{className:"row",children:(0,t.jsxs)("div",{className:"col text--center",children:[(0,t.jsx)("a",{href:"https://youtu.be/i5-Rw2Sf7-w",children:(0,t.jsx)("img",{src:"https://img.youtube.com/vi/i5-Rw2Sf7-w/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,t.jsx)("p",{children:(0,t.jsx)("a",{href:"https://youtu.be/i5-Rw2Sf7-w",children:"A Beginner's guide to Parachain Slot Auctions"})})]})}),"\n",(0,t.jsx)(n.h2,{id:"mechanics-of-a-candle-auction",children:"Mechanics of a Candle Auction"}),"\n",(0,t.jsx)(n.p,{children:"Candle auctions are a variant of open auctions where bidders submit bids that are increasingly\nhigher. The highest bidder at the conclusion of the auction is considered the winner."}),"\n",(0,t.jsx)(n.p,{children:'Candle auctions were originally employed in the 16th century for the sale of ships. The name is\nderived from the system by which the auction length was determined. The phrase "inch of a candle"\nrefers to the length of time required for a candle to burn down 1 inch. When the flame extinguishes\nand the candle goes out, the auction terminates and the standing bid at that point in time prevails\nthe winner.'}),"\n",(0,t.jsx)(n.p,{children:"When candle auctions are used online, they require a random number to decide the moment of\ntermination. Parachain slot auctions differ slightly from a normal candle auction in that they do\nnot randomly terminate the auction. Instead, they run for an entire fixed duration and the winner is\nrandomly chosen retroactively."}),"\n",(0,t.jsx)(n.p,{children:"The candle auction is split into two parts:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.em,{children:"opening period"})," which is in effect immediately after the auction starts. This period lasts\nfor one day and eighteen hours and serves as a buffer time for parachain candidates to setup\ntheir initial bids, and likely start executing their strategy on how to win the slot auction.\nDuring the opening phase, bids will continue to be accepted, but they do not have any effect on\nthe outcome of the auction."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.em,{children:"ending period"})," follows the opening period for five additional days, where the auction is\nsubject to end based on the candle auction mechanism."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["The auction\u2019s ending time can occur any time within the ending period. This time is automatically\nand randomly chosen by the ",(0,t.jsx)(n.a,{href:"/docs/learn-cryptography#vrf",children:"Verifiable Random Function (VRF)"}),". The\nprobability of winning the auction is equal to the number of blocks that contain a winning bid,\ndivided by the total number of blocks in the ending period. The random ending is managed by\npropagating through the entire ending period, where a snapshot is taken at each block within the\nending period to capture the winners for that given block. At the end of the period, one of the\nsnapshots is randomly selected to determine the winner of the auction."]}),"\n",(0,t.jsx)(n.admonition,{title:"The parachain candidate with the highest bid at the ending time chosen by the Verifiable",type:"info",children:(0,t.jsx)(n.p,{children:"Random Function wins the slot auction."})}),"\n",(0,t.jsxs)(n.p,{children:["A parachain auction lasts exactly one week from the starting period (1 day and 18 hours) to\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#auction-ending-period",children:"ending period"})," (candle auction phase)\nand finally 6 hours for determining the auction winner."]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"/docs/learn/learn-crowdloans##supporting-a-crowdloan-campaign",children:"Crowdloan contributions"})," cannot be made\nduring these six hours when the winning block for the auction is being determined on-chain."]})}),"\n",(0,t.jsxs)(n.p,{children:["More details on this are available in the ",(0,t.jsx)(n.a,{href:"#network-implementation",children:"Network Implementation"})," section."]}),"\n",(0,t.jsxs)(n.h3,{id:"randomness-in-action",children:[(0,t.jsx)(n.a,{href:"/docs/learn-cryptography#randomness",children:"Randomness"})," in action"]}),"\n",(0,t.jsx)(n.p,{children:"The following example will showcase the randomness mechanics of the candle auction for the ninth\nauction on Kusama. Keep in mind that the candle phase has a uniform termination profile and has an\nequal probability of ending at any given block, and the termination block cannot be predicted before\nor during the auction."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The ending period of auction 9 starts at ",(0,t.jsx)(n.a,{href:"https://kusama.subscan.io/auction/9",children:(0,t.jsx)(n.code,{children:"block 9362014"})}),"."]}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsxs)(n.mdxAdmonitionTitle,{children:["The auction has a full duration equal to ",(0,t.jsx)(n.code,{children:"block 9362014"})," + ",(0,t.jsx)(n.code,{children:"72000"})]}),(0,t.jsxs)(n.p,{children:["Here, ",(0,t.jsx)(n.code,{children:"block 72000"}),' is the "ending period", which is divided into ',(0,t.jsx)(n.strong,{children:"3600 samples of 20 blocks"}),".\nFiguratively, the candle is lit, and the candle phase lasts for 72,000 blocks."]})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The winning sample during the ending period had the ",(0,t.jsx)(n.code,{children:"index 1078"}),"."]}),"\n",(0,t.jsx)(n.admonition,{title:"Sample 1078 is the winner",type:"note",children:(0,t.jsxs)(n.p,{children:["Sample 1078 refers to the winner as of ",(0,t.jsx)(n.code,{children:"block 9362014 + 21560"}),", which equals\n",(0,t.jsx)(n.a,{href:"https://kusama.subscan.io/block/9383574",children:(0,t.jsx)(n.code,{children:"block 9383574"})}),"."]})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The parent block was a new BABE session in the ",(0,t.jsx)(n.code,{children:"Logs"}),", which updated the randomness that was used\nto select that ",(0,t.jsx)(n.a,{href:"https://kusama.subscan.io/block/9434277",children:"sample index"}),"."]}),"\n",(0,t.jsx)(n.admonition,{title:"Inspecting the block state",type:"note",children:(0,t.jsxs)(n.p,{children:["You can inspect the state at the end of ",(0,t.jsx)(n.code,{children:"block 9434277"})," to see the sample indices with an\n",(0,t.jsx)(n.a,{href:"/docs/maintain-sync####types-of-nodes",children:"archive node"}),". The digest in the ",(0,t.jsx)(n.code,{children:"Logs"})," of\n",(0,t.jsx)(n.code,{children:"9434277"})," is decodable and contains the random value as well as the BABE authorities."]})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"As a result, the winner of this auction was not the highest bid during the full duration."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"rationale",children:"Rationale"}),"\n",(0,t.jsxs)(n.p,{children:["The open and transparent nature of blockchain systems opens attack vectors that are non-existent in\ntraditional auction formats. Normal open auctions in particular can be vulnerable to ",(0,t.jsx)(n.em,{children:"auction\nsniping"})," when implemented over the internet or on a blockchain."]}),"\n",(0,t.jsx)(n.p,{children:"Auction sniping takes place when the end of an auction is known and bidders are hesitant to bid\ntheir true price early, in hopes of paying less than they actually value the item."}),"\n",(0,t.jsx)(n.p,{children:"For example, Alice may value an item at auction for 30 USD. She submits an initial bid of 10 USD in\nhopes of acquiring the items at a lower price. Alice's strategy is to place incrementally higher\nbids until her true value of 30 USD is exceeded. Another bidder Eve values the same item at 11 USD.\nEve's strategy is to watch the auction and submit a bid of 11 USD at the last second. Alice will\nhave no time to respond to this bid before the close of the auction and will lose the item. The\nauction mechanism is sub-optimal because it has not discovered the true price of the item and the\nitem has not gone to the actor who valued it the most."}),"\n",(0,t.jsxs)(n.p,{children:["On blockchains this problem may be even worse, since it potentially gives the producer of the block\nan opportunity to snipe any auction at the last concluding block by adding it themselves while\nignoring other bids. There is also the possibility of a malicious bidder or a block producer trying\nto ",(0,t.jsx)(n.em,{children:"grief"})," honest bidders by sniping auctions."]}),"\n",(0,t.jsxs)(n.p,{children:["For this reason, ",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Vickrey_auction",children:"Vickrey auctions"}),", a type of\nsealed-bid auction where bids are hidden and only revealed at a later phase, have emerged as a\nwell-regarded mechanic. For example, this mechanism is leveraged to auction human readable names on\nthe ",(0,t.jsx)(n.a,{href:"/docs/learn-account-advanced",children:"ENS"}),". The Candle auction is another solution that does not\nrequire a two-step commit and reveal schemes (a main component of Vickrey auctions), which allows\nsmart contracts to participate."]}),"\n",(0,t.jsx)(n.p,{children:"Candle auctions allow everyone to always know the states of the bid, but they do not reveal when the\nauction has officially ended. This helps to ensure that bidders are willing to make their true bids\nearly. Otherwise, they may find themselves in a situation where the auction was determined to have\nended before having an opportunity to bid."}),"\n",(0,t.jsx)(n.h2,{id:"network-implementation",children:"Network Implementation"}),"\n",(0,t.jsxs)(n.p,{children:["The relay chain will use a ",(0,t.jsx)(n.em,{children:"random beacon"})," based on the\n",(0,t.jsx)(n.a,{href:"/docs/learn-cryptography#vrf",children:"Verifiable Random Function (VRF)"}),". The VRF will provide the base of\nthe randomness, which will retroactively determine the end-time of the auction."]}),"\n",(0,t.jsx)(n.p,{children:"Polkadot's slot durations are capped to 2 years and are divided into 3-month periods (1 year divided\ninto 6-week periods for Kusama). Parachains may lease a slot for any combination of periods of the\nslot duration. Parachains may lease more than one slot over time, meaning that they could extend\ntheir lease to the network past the maximum duration by leasing a contiguous slot."}),"\n",(0,t.jsx)(n.admonition,{title:"Individual parachain slots are fungible",type:"note",children:(0,t.jsx)(n.p,{children:"This means that parachains do not need to always inhabit the same slot, however they always must\nmaintain a slot to remain a parachain."})}),"\n",(0,t.jsx)(n.h2,{id:"bidding",children:"Bidding"}),"\n",(0,t.jsxs)(n.p,{children:["Parachains or parachain teams, bid in the auction by specifying the slot range that they want to\nlease and the number of tokens they are willing to reserve. Bidders can be either ordinary accounts,\nor use the ",(0,t.jsx)(n.a,{href:"/docs/learn/learn-crowdloans",children:"crowdloan functionality"})," to source tokens from the community. For\na more in-depth comparison between both of these options for gaining a parachain slot, check out\nthis section on\n",(0,t.jsx)(n.a,{href:"/docs/learn/learn-crowdloans#crowdloan-campaigns-vs-parachain-auctions",children:"Crowdloan Campaigns vs Parachain Auctions"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"Parachain slots at genesis\n\n --3 months--\n v v\nSlot A | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot B | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot C |__________| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot D |__________| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\nSlot E |__________|___________| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |...\n ^ ^\n ---------------------------------------------max lease-----------------------------------------\n\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.em,{children:"Each period of the range 1 - 4 represents a 3-month duration for a total of 2 years for Polkadot\n(or 6-week duration for a total of 1 year for Kusama)."})}),"\n",(0,t.jsxs)(n.p,{children:["Bidders will submit a configuration of bids specifying the token amount they are willing to bond and\nfor which periods. The slot ranges may be any of the periods 1 - ",(0,t.jsx)(n.code,{children:"n"}),", where ",(0,t.jsx)(n.code,{children:"n"})," is the number of\n",(0,t.jsx)(n.a,{href:"/docs/chain-state-values#period-per-slot-auction",children:"periods available for a slot"}),"."]}),"\n",(0,t.jsx)(n.admonition,{title:"If you bond tokens with a parachain slot, you cannot stake with those tokens. In this way,",type:"note",children:(0,t.jsx)(n.p,{children:"you pay for the parachain slot by forfeiting the opportunity to earn staking rewards."})}),"\n",(0,t.jsx)(n.p,{children:"A bidder configuration for a single bidder may look like the following pseudocode example:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-js",children:"const bids = [\n {\n range: [1, 2, 3, 4, 5, 6, 7, 8],\n bond_amount: 300,\n },\n {\n range: [1, 2, 3, 4],\n bond_amount: 777,\n },\n {\n range: [2, 3, 4, 5, 6, 7],\n bond_amount: 450,\n },\n];\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The important concept to understand from this example is that bidders may submit different\nconfigurations at different prices (",(0,t.jsx)(n.code,{children:"bond_amount"}),"). However, only one of these bids would be\neligible to win exclusive of the others."]}),"\n",(0,t.jsxs)(n.p,{children:["The winner selection algorithm will pick bids that may be non-overlapping in order to maximize the\namount of tokens held over the entire lease duration of the parachain slot. This means that the\nhighest bidder for any given slot lease period might not always win (see the\n",(0,t.jsx)(n.a,{href:"#examples",children:"example below"}),")."]}),"\n",(0,t.jsxs)(n.p,{children:["A random number, which is based on the ",(0,t.jsx)(n.a,{href:"/docs/learn-cryptography#vrf",children:"VRF"})," used by the relay chain,\nis determined at each block. Additionally, each auction will have a threshold that starts at 0 and\nincreases to 1. The random number produced by the VRF is examined next to the threshold to determine\nif that block is the end of the auction within the so-called ",(0,t.jsx)(n.em,{children:"ending period"}),". Additionally, the VRF\nwill pick a block from the last epoch to access the state of bids which can help aid in mitigating\nsome types of attacks from malicious validators."]}),"\n",(0,t.jsx)(n.h3,{id:"examples",children:"Examples"}),"\n",(0,t.jsx)(n.p,{children:"There is one parachain slot available."}),"\n",(0,t.jsxs)(n.p,{children:["Charlie bids ",(0,t.jsx)(n.code,{children:"75"})," for the range 1 - 8."]}),"\n",(0,t.jsxs)(n.p,{children:["Dave bids ",(0,t.jsx)(n.code,{children:"100"})," for the range 5 - 8."]}),"\n",(0,t.jsxs)(n.p,{children:["Emily bids ",(0,t.jsx)(n.code,{children:"40"})," for the range 1 - 4."]}),"\n",(0,t.jsx)(n.p,{children:"Let's calculate each bidder's valuation according to the algorithm. We do this by multiplying the\nbond amount by the number of periods in the specified range of the bid."}),"\n",(0,t.jsx)(n.p,{children:"Charlie - 75 * 8 = 600 for range 1 - 8"}),"\n",(0,t.jsx)(n.p,{children:"Dave - 100 * 4 = 400 for range 5 - 8"}),"\n",(0,t.jsx)(n.p,{children:"Emily - 40 * 4 = 160 for range 1 - 4"}),"\n",(0,t.jsxs)(n.p,{children:["Although Dave had the highest bid in accordance to token amount per period, when we do the\ncalculations we see that since he only bid for a range of 4, he would need to share the slot with\nEmily who bid much less. Together Dave and Emily's bids only equals a valuation of ",(0,t.jsx)(n.code,{children:"560"}),". Charlie's\nvaluation for the entire range is ",(0,t.jsx)(n.code,{children:"600"}),". Therefore Charlie is awarded the complete range of the\nparachain slot."]}),"\n",(0,t.jsx)(n.h2,{id:"parachain-lease-extension",children:"Parachain Lease Extension"}),"\n",(0,t.jsx)(n.p,{children:"Before the slot lease expires, parachains have to bid and win another auction for continuity of the\nlease. To avoid any downtime in connectivity and minimize the risk of losing a subsequent auction,\nparachain teams need to plan ahead to bid for the lease extension before their current lease period\nends. Explained in the section above, each auction lets you bid for 8 LPs (Lease Periods) which\nenables two scenarios for the parachain's lease extension."}),"\n",(0,t.jsx)(n.h3,{id:"lease-extension-with-overlapping-slots",children:"Lease Extension with Overlapping Slots"}),"\n",(0,t.jsx)(n.p,{children:"Acquire a slot where the first lease period is before the last lease period of the current slot."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Register a new ",(0,t.jsx)(n.code,{children:"paraId"})]}),"\n",(0,t.jsxs)(n.li,{children:["Win a slot auction with the new ",(0,t.jsx)(n.code,{children:"paraId"})]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"The parachain team has access to two slots:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"one that will end soon"}),"\n",(0,t.jsx)(n.li,{children:"one that just started"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Both slots have at least one LP in common. When the old slot transitions to their last LP, the\nparachain can ",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/pull/4772",children:"swap"})," the slots. This can be done\nvia ",(0,t.jsx)(n.a,{href:"https://kusama.polkassembly.io/post/1491",children:"on-chain governance"}),". The ",(0,t.jsx)(n.code,{children:"swap"})," call is available in\nthe ",(0,t.jsx)(n.code,{children:"registrar"})," pallet."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Parachain Slot Swap",src:a(28836).A+"",width:"1286",height:"896"})}),"\n",(0,t.jsx)(n.admonition,{title:"Any two parachains can swap their slots via XCM",type:"note",children:(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"https://github.com/paritytech/polkadot/pull/4772",children:"slot swap via XCM"})," requires two live\nparachains to send an XCM message to the relay chain to approve the swap. A parachain team with\naccess to two overlapping slots can start a shell parachain on the new slot and swap it with their\nactual parachain on the old slot, thus ensuring continuity of the lease."]})}),"\n",(0,t.jsx)(n.h3,{id:"lease-extension-with-non-overlapping-slots",children:"Lease Extension with Non-Overlapping Slots"}),"\n",(0,t.jsxs)(n.p,{children:["Acquire a slot where the first LP starts right after the end of the last LP of the current slot. In\nthis case, the parachain can bid directly with their current ",(0,t.jsx)(n.code,{children:"paraId"}),", and it will be automatically\nextended without the need of swapping. This method has the advantage of not having superfluous LP's\non different slots owned by the same team, however it has the disadvantage of losing flexibility on\nwhen to win a new slot: if the team does not win the exact slot, then it will suffer some downtime\nuntil it wins a new slot."]}),"\n",(0,t.jsx)(n.h2,{id:"slot-auctions-faq",children:"Slot Auctions FAQ"}),"\n",(0,t.jsx)(n.h3,{id:"why-doesnt-everyone-bid-for-the-max-length",children:"Why doesn't everyone bid for the max length?"}),"\n",(0,t.jsx)(n.p,{children:"For the duration of the slot, the tokens used for bidding in the auction are locked up. This\nsuggests there is an opportunity cost associated with bidding, as the tokens could have been\nleveraged for something else."}),"\n",(0,t.jsx)(n.h3,{id:"how-does-this-mechanism-help-ensure-parachain-diversity",children:"How does this mechanism help ensure parachain diversity?"}),"\n",(0,t.jsx)(n.p,{children:"The method for dividing the parachain slots into intervals was partly inspired by the desire to\nallow for a greater amount of parachain diversity, while preventing particularly large and\nwell-funded parachains from hoarding slots. By making each period a three-month duration but the\noverall slot a 2-year duration (and 6-week duration but the overall slot a 1-year duration on\nKusama), the mechanism can cope with well-funded parachains, ensuring they secure a slot at the end\nof their lease, while gradually allowing other parachains to enter the ecosystem to occupy the\ndurations that are not filled. For example, if a large, well-funded parachain has already acquired a\nslot for range 1 - 8, they would be very interested in getting the next slot that would open for\n2 - 9. Under this mechanism, that parachain could acquire just period 9 (since that is the only one\nrequired) and allow the 2 - 8 range of the second parachain slot to be occupied by another party."}),"\n",(0,t.jsx)(n.h3,{id:"why-is-randomness-difficult-on-blockchains",children:"Why is randomness difficult on blockchains?"}),"\n",(0,t.jsxs)(n.p,{children:["Generating a random number trustlessly on a transparent and open network opens up the possibility\nfor bad actors to attempt to alter or manipulate the randomness. There have been a few solutions\nthat have been proposed, including hash-onions like ",(0,t.jsx)(n.a,{href:"https://github.com/randao/randao",children:"RANDAO"})," and\n",(0,t.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Verifiable_random_function",children:"verifiable random functions"})," (VRFs). The\nlatter is what the relay chain uses as a base for its randomness."]}),"\n",(0,t.jsx)(n.h3,{id:"are-there-other-ways-of-acquiring-a-slot-besides-the-candle-auction",children:"Are there other ways of acquiring a slot besides the candle auction?"}),"\n",(0,t.jsx)(n.p,{children:"Aa parachain slot can also be acquired through a secondary market where a 3rd party has already won\na parachain slot and has the ability to resell the slot along with the associated deposit of tokens\nthat are locked up to another buyer. This would allow the seller to get liquid tokens in exchange\nfor the parachain slot and the buyer to acquire the slot as well as the deposited tokens."}),"\n",(0,t.jsxs)(n.p,{children:["A number of system or common-good parachains may be granted slots by the\n",(0,t.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"governance"})," of the relay chain. System parachains can be recognized\nby a parachain ID lower than 1_000, and common-good parachains by a parachain ID between 1_000 and\n1_999. Other parachains will have IDs 2_000 or higher. Such parachains would not have to bid for or\nrenew their slots as they would be considered essential to the ecosystem's future."]}),"\n",(0,t.jsx)(n.h3,{id:"how-are-auctions-scheduled",children:"How are auctions scheduled?"}),"\n",(0,t.jsxs)(n.p,{children:["The parachain slot auctions are scheduled through the governance. At least 2/3 of the Council can\ninitiate an auction, however, Root origin (via referendum) is needed to cancel an auction. Here is a\nproposal that gives a glimpse of what goes into planning auctions schedule -\n",(0,t.jsx)(n.a,{href:"https://polkadot.polkassembly.io/post/863",children:"Proposed Polkadot Auction Schedule 2022"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182287-how-does-a-parachain-slots-auction-work-",children:"How do Parachain Slot Auctions Work"})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://research.web3.foundation/Polkadot/overview/parachain-allocation",children:"Parachain Allocation"})," -\nW3F research page on parachain allocation that goes more in depth to the mechanism"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://polkadot.network/blog/research-update-the-case-for-candle-auctions/",children:"Research Update: The Case for Candle Auctions"})," -\nW3F breakdown and research update about candle auctions"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3846363",children:"Front-Running, Smart Contracts, and Candle Auctions"}),"\nW3F Research team discusses how to remedy current blockchain auction setbacks with candle auctions"]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},67141:(e,n,a)=>{a.d(n,{A:()=>o});var t=a(96540),i=a(74848);const o=function(e){var n,a=e.message,o=(0,t.useState)(!0),s=o[0],r=o[1];return(0,i.jsx)(i.Fragment,{children:s&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=a,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28836:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/images/para-swap-3c765fb9e6860c7d7489a758af065cb0.png"},28453:(e,n,a)=>{a.d(n,{R:()=>s,x:()=>r});var t=a(96540);const i={},o=t.createContext(i);function s(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/804b1e9f.30c585b4.js b/assets/js/804b1e9f.30c585b4.js deleted file mode 100644 index be45d7461a19..000000000000 --- a/assets/js/804b1e9f.30c585b4.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[1062],{98362:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var a=n(74848),o=n(28453),s=(n(47379),n(67141));n(3514);const i={id:"learn-guides-nominator",title:"Polkadot-JS Guides For Nominators",sidebar_label:"Nominator Guides",description:"Polkadot-JS Guides for Nominators.",keyword:["nominate","stake","staking","claim","rewards","polkadot-js"],slug:"../learn-guides-nominator"},r=void 0,l={id:"learn/learn-guides-nominator",title:"Polkadot-JS Guides For Nominators",description:"Polkadot-JS Guides for Nominators.",source:"@site/../docs/learn/learn-guides-nominator.md",sourceDirName:"learn",slug:"/learn-guides-nominator",permalink:"/docs/learn-guides-nominator",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-nominator.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-guides-nominator",title:"Polkadot-JS Guides For Nominators",sidebar_label:"Nominator Guides",description:"Polkadot-JS Guides for Nominators.",keyword:["nominate","stake","staking","claim","rewards","polkadot-js"],slug:"../learn-guides-nominator"},sidebar:"docs",previous:{title:"Staking Guides",permalink:"/docs/learn-guides-staking"},next:{title:"Nomination Pool Guides",permalink:"/docs/learn-guides-staking-pools"}},c={},d=[{value:"Nominate Using Polkadot-JS",id:"nominate-using-polkadot-js",level:2},{value:"Bond your tokens",id:"bond-your-tokens",level:3},{value:"Nominate a validator",id:"nominate-a-validator",level:3},{value:"Stop nominating",id:"stop-nominating",level:3},{value:"Claiming Rewards with Polkadot-JS",id:"claiming-rewards-with-polkadot-js",level:2},{value:"Using Command-Line Interface (CLI)",id:"using-command-line-interface-cli",level:2},{value:"Step 1: Install @polkadot/api-cli",id:"step-1-install-polkadotapi-cli",level:3},{value:"Step 2: Bond Tokens",id:"step-2-bond-tokens",level:3},{value:"Step 3: Nominate a validator",id:"step-3-nominate-a-validator",level:3}];function u(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,a.jsxs)(t.p,{children:["See ",(0,a.jsx)(t.a,{href:"/docs/learn-staking",children:"this page"})," to learn about staking."]}),"\n",(0,a.jsx)(t.h2,{id:"nominate-using-polkadot-js",children:"Nominate Using Polkadot-JS"}),"\n",(0,a.jsx)(t.admonition,{title:"Video Tutorials",type:"info",children:(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://youtu.be/FCXC0CDhyS4?t=219",children:"How to Nominate/Stake"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://youtu.be/7VlTncHCGPc",children:"Staking with a Ledger device and Polkadot-JS"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://www.youtube.com/watch?v=jL-N_IWiYVA",children:"Staking with a Ledger device and Ledger Live"})}),"\n"]})}),"\n",(0,a.jsx)(t.h3,{id:"bond-your-tokens",children:"Bond your tokens"}),"\n",(0,a.jsx)(t.admonition,{title:"Support Article",type:"info",children:(0,a.jsxs)(t.p,{children:["Read the support article about\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168057-polkadot-js-ui-how-do-i-stake-nominate-on-polkadot-",children:"How to Bond Tokens and Nominate"}),"."]})}),"\n",(0,a.jsxs)(t.p,{children:["On the ",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS UI"}),' navigate to the "Staking" tab (within the\n"Network" menu).']}),"\n",(0,a.jsxs)(t.p,{children:['The "Staking Overview" subsection will show you all the active validators and their information -\ntheir identities, the amount of KSM that are staking for them, amount that is their own provided\nstake, how much they charge in commission, the era points they\'ve earned in the current era, and the\nlast block number that they produced. If you click on the chart button it will take you to the\n"Validator Stats" page for that validator that shows you more detailed and historical information\nabout the validator\'s stake, rewards and ',(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashes"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:['The "Account actions" subsection (',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"link"}),") allows you\nto stake and nominate."]}),"\n",(0,a.jsxs)(t.p,{children:['The "Payouts" subsection (',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/payouts",children:"link"}),") allows you to\nclaim rewards from staking."]}),"\n",(0,a.jsxs)(t.p,{children:['The "Targets" subsection (',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/targets",children:"link"}),") will help you\nestimate your earnings and this is where it's good to start picking favorites."]}),"\n",(0,a.jsxs)(t.p,{children:['The "Waiting" subsection (',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/waiting",children:"link"}),") lists all pending\nvalidators that are awaiting more nominations to enter the active validator set. Validators will\nstay in the waiting queue until they have enough KSM backing them (as allocated through the\n",(0,a.jsx)(t.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n election mechanism"}),"). It is possible validator can remain in the\nqueue for a very long time if they never get enough backing."]}),"\n",(0,a.jsxs)(t.p,{children:['The "Validator Stats" subsection (',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/query",children:"link"}),") allows you\nto query a validator's stash address and see historical charts on era points, elected stake,\nrewards, and ",(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashes"}),"."]}),"\n",(0,a.jsx)(t.p,{children:'Pick "Account actions" underneath "Network" > "Staking", then click the "+ Nominator" button.'}),"\n",(0,a.jsx)(t.p,{children:"You will see a modal window that looks like the below:"}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"nominator-update-1",src:n(59300).A+"",width:"2194",height:"1170"})}),"\n",(0,a.jsxs)(t.p,{children:['Select a "value bonded" that is ',(0,a.jsx)(t.strong,{children:"less"})," than the total amount of KSM you have, so you have some\nleft over to pay transaction fees. Transaction fees are currently at least 0.01 KSM, but they are\ndynamic based on a variety of factors including the load of recent blocks."]}),"\n",(0,a.jsx)(t.p,{children:"Also be mindful of the reaping threshold - the amount that must remain in an account lest it be\nburned. That amount is 0.01 in Kusama, so it's recommended to keep at least 0.1 KSM in your account\nto be on the safe side."}),"\n",(0,a.jsx)(t.p,{children:"Choose whatever payment destination that makes sense to you. If you're unsure, you can choose \"Stash\naccount (increase amount at stake)\" to simply accrue the rewards into the amount you're staking and\nearn compound interest."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Payout account selection dropdown with the custom account option highlighted",src:n(15070).A+"",width:"742",height:"245"})}),"\n",(0,a.jsx)(t.h3,{id:"nominate-a-validator",children:"Nominate a validator"}),"\n",(0,a.jsx)(t.admonition,{title:"Support Article",type:"info",children:(0,a.jsxs)(t.p,{children:["Read the support article about\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000150130-how-do-i-know-which-validators-to-choose-",children:"How to Select Validators"}),"."]})}),"\n",(0,a.jsxs)(t.p,{children:["You are now bonded. Being bonded means your tokens are locked and could be\n",(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashed"})," if the validators you nominate misbehave. All bonded funds can be\ndistributed to ",(0,a.jsx)(t.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"multiple validators"}),".\nBe careful about the validators you choose since you will be slashed if your validator commits an\n",(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"offence"}),"."]}),"\n",(0,a.jsx)(t.p,{children:'Click on "Nominate" on an account you\'ve bonded and you will be presented with another popup asking\nyou to select some validators.'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Nominating validators",src:n(20412).A+"",width:"2208",height:"982"})}),"\n",(0,a.jsxs)(t.p,{children:["Select them, confirm the transaction, and you're done - you are now nominating. Your nominations\nwill become active in the next era. Eras last six hours on Kusama - depending on when you do this,\nyour nominations may become active almost immediately, or you may have to wait almost the entire six\nhours before your nominations are active. You can check how far along Kusama is in the current era\non the ",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking",children:"Staking page"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["Assuming at least one of your nominations ends up in the active validator set, you will start to get\nrewards allocated to you. In order to claim them (i.e., add them to your account), you must manually\nclaim them. To initiate a claim, you can do it yourself or have the validator that you staked for\ninitiate a claim. This is to help optimize the effectiveness and storage of payouts on Kusama. See\nthe ",(0,a.jsx)(t.a,{href:"/docs/learn-staking#claiming-rewards",children:"Claiming Rewards"})," section of the Staking wiki page for\nmore details."]}),"\n",(0,a.jsx)(t.h3,{id:"stop-nominating",children:"Stop nominating"}),"\n",(0,a.jsx)(t.admonition,{title:"Support Article",type:"info",children:(0,a.jsxs)(t.p,{children:["Read the support article about\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000167902-how-can-i-unstake-my-tokens-again-",children:"How to Stop Nominating & Unbond Tokens"}),".\nSee also the support article about\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170241-polkadot-js-ui-how-to-rebond-tokens-during-the-unbonding-period",children:"How to Rebond Tokens"}),"."]})}),"\n",(0,a.jsx)(t.p,{children:"At some point, you might decide to stop nominating one or more validators. You can always change who\nyou're nominating, but you cannot withdraw your tokens unless you unbond them."}),"\n",(0,a.jsx)(t.h2,{id:"claiming-rewards-with-polkadot-js",children:"Claiming Rewards with Polkadot-JS"}),"\n",(0,a.jsx)(t.p,{children:"Anyone can trigger a payout for any validator, as long as they are willing to pay the transaction\nfee. Someone must submit a transaction with a validator ID and an era index. Polkadot will\nautomatically calculate that validator's reward and distribute the rewards pro rata."}),"\n",(0,a.jsxs)(t.p,{children:["These details are handled for you automatically if you use the\n",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/payout",children:"Polkadot-JS UI"}),", which also allows you to submit\nbatches of eras at once."]}),"\n",(0,a.jsx)(t.p,{children:'To claim rewards on Polkadot-JS UI, you will need to be in the "Payouts" tab underneath "Staking",\nwhich will list all the pending payouts for your stashes.'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"pending-payouts",src:n(32630).A+"",width:"2876",height:"600"})}),"\n",(0,a.jsx)(t.p,{children:'To then claim your reward, select the "Payout all" button. This will prompt you to select your stash\naccounts for payout.'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"select-payouts",src:n(43233).A+"",width:"2192",height:"624"})}),"\n",(0,a.jsx)(t.p,{children:"Once you are done with payout, another screen will appear asking for you to sign and submit the\ntransaction."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"transaction-payouts",src:n(30626).A+"",width:"2878",height:"818"})}),"\n",(0,a.jsx)(t.h2,{id:"using-command-line-interface-cli",children:"Using Command-Line Interface (CLI)"}),"\n",(0,a.jsx)(t.p,{children:"Apart from using the Polkadot-JS UI to participate in the staking, you can do all these things in\nCLI instead. The CLI approach allows you to interact with the network without using Polkadot-JS."}),"\n",(0,a.jsx)(t.h3,{id:"step-1-install-polkadotapi-cli",children:"Step 1: Install @polkadot/api-cli"}),"\n",(0,a.jsxs)(t.p,{children:["We assume you have installed ",(0,a.jsx)(t.a,{href:"https://nodejs.org",children:"NodeJS with npm"}),". Run the following command to\ninstall the ",(0,a.jsx)(t.code,{children:"@polkadot/api-cli"})," globally:"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"npm install -g @polkadot/api-cli\n"})}),"\n",(0,a.jsx)(t.h3,{id:"step-2-bond-tokens",children:"Step 2: Bond Tokens"}),"\n",(0,a.jsx)(t.admonition,{title:"Controller accounts are deprecated",type:"info",children:(0,a.jsxs)(t.p,{children:["Controller accounts are deprecated. For more information, see\n",(0,a.jsx)(t.a,{href:"https://forum.polkadot.network/t/staking-controller-deprecation-plan-staking-ui-leads-comms/2748",children:"this discussion"}),"."]})}),"\n",(0,a.jsx)(t.p,{children:"Executing the following command:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "MNEMONIC_PHRASE" tx.staking.bond CONTROLLER_ADDRESS NUMBER_OF_TOKENS REWARD_DESTINATION --ws WEBSOCKET_ENDPOINT\n'})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"CONTROLLER_ADDRESS"}),": An address you would like to bond to the stash account. (Controller accounts\nare now deprecated. Refer to\n",(0,a.jsx)(t.a,{href:"https://forum.polkadot.network/t/staking-controller-deprecation-plan-staking-ui-leads-comms/2748",children:"this discussion"}),"\nfor additional context)"]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"NUMBER_OF_TOKENS"}),": The number of native tokens (in Plancks) you would like to stake to the network.\nFor more information, see ",(0,a.jsx)(t.a,{href:"/docs/learn-DOT",children:"this page"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"REWARD_DESTINATION"}),":"]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"Staked"})," - Pay into the stash account, increasing the amount at stake accordingly."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"Stash"})," - Pay into the stash account, not increasing the amount at stake."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"Account"})," - Pay into a custom account that is not the stash (can be a proxy or another type of\naccount)."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"Controller"})," - Pay into the controller account."]}),"\n"]}),"\n",(0,a.jsx)(t.p,{children:"Example for Kusama:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "xxxx xxxxx xxxx xxxxx" tx.staking.bond DMTHrNcmA8QbqRS4rBq8LXn8ipyczFoNMb1X4cY2WD9tdBX 1000000000000 Staked --ws wss://kusama-rpc.polkadot.io\n'})}),"\n",(0,a.jsxs)(t.p,{children:["For wss endpoints see ",(0,a.jsx)(t.a,{href:"/docs/maintain-endpoints",children:"this page"}),"."]}),"\n",(0,a.jsx)(t.p,{children:"Result:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'...\n...\n "status": {\n "InBlock": "0x0ed1ec0ba69564e8f98958d69f826adef895b5617366a32a3aa384290e98514e"\n }\n'})}),"\n",(0,a.jsxs)(t.p,{children:["You can check the transaction status by using the value of the ",(0,a.jsx)(t.code,{children:"InBlock"})," in\n",(0,a.jsx)(t.a,{href:"https://www.subscan.io/",children:"Subscan"}),". Also, you can verify the bonding state under the\n",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"Staking"})," page on the Polkadot-JS UI."]}),"\n",(0,a.jsx)(t.h3,{id:"step-3-nominate-a-validator",children:"Step 3: Nominate a validator"}),"\n",(0,a.jsx)(t.p,{children:"To nominate a validator, you can execute the following command:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "MNEMONIC_PHRASE" tx.staking.nominate \'["VALIDATOR_ADDRESS"]\' --ws WS_ENDPOINT\n'})}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "xxxx xxxxx xxxx xxxxx" tx.staking.nominate \'["CmD9vaMYoiKe7HiFnfkftwvhKbxN9bhyjcDrfFRGbifJEG8","E457XaKbj2yTB2URy8N4UuzmyuFRkcdxYs67UvSgVr7HyFb"]\' --ws wss://kusama-rpc.polkadot.io\n'})}),"\n",(0,a.jsx)(t.p,{children:"After a few seconds, you should see the hash of the transaction, and if you would like to verify the\nnomination status, you can check that on the Polkadot-JS UI as well."})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(u,{...e})}):u(e)}},67141:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(96540),o=n(74848);const s=function(e){var t,n=e.message,s=(0,a.useState)(!0),i=s[0],r=s[1];return(0,o.jsx)(o.Fragment,{children:i&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var a=n(90675),o=n(10467),s=n(96540),i=n(19588),r=n(2026),l=n(11135);function c(e,t,n){return d.apply(this,arguments)}function d(){return(d=(0,o.A)((0,a.A)().mark((function e(t,n,o){var s,l,c,d,u;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return c=new i.E(s),e.next=25,r.G.create({provider:c});case 25:d=e.sent,(u=n.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=u[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+u[0]+") in "+n);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function u(e,t,n,a){switch(t){case"humanReadable":(0,l.HumanReadable)(e,n,a);break;case"precise":(0,l.Precise)(e,n,a);break;case"blocksToDays":(0,l.BlocksToDays)(e,a);break;case"erasToDays":(0,l.ErasToDays)(e,a,n);break;case"percentage":(0,l.Percentage)(e,a);break;case"permillToPercent":(0,l.PermillToPercent)(e,a);break;case"arrayLength":(0,l.ArrayLength)(e,a);break;default:return void console.log("Ignoring unknown filter type")}}const h=function(e){var t=e.network,n=e.path,i=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,d=(0,s.useState)(""),h=d[0],p=d[1];return t=t.toLowerCase(),(0,s.useEffect)((function(){void 0!==l?u(i.toString(),l,t,p):p(i.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,o.A)((0,a.A)().mark((function e(){var o;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,n,p);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?u(o,l,t,p):p(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(r){console.log(r)}}}),[]),h}},11135:e=>{var t="polkadot",n="kusama",a="statemine",o="statemint",s="polkadotpeople",i="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var d=void 0;if(l===t||l===o)d=3;else if(l===n||l===a||l===s)d=6;else{if(l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),c((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(d)+" "+r[l].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/r[t].precision+" "+r[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var c=void 0;if(l===t||l===o||l==s)c=1;else{if(l!==n&&l!==a&&l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}r((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},3514:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});n(96540);var a=n(34164),o=n(26972),s=n(28774),i=n(53465),r=n(16654),l=n(21312),c=n(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=n(74848);function h(e){var t=e.href,n=e.children;return(0,u.jsx)(s.A,{href:t,className:(0,a.A)("card padding--lg",d.cardContainer),children:n})}function p(e){var t=e.href,n=e.icon,o=e.title,s=e.description;return(0,u.jsxs)(h,{href:t,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,a.A)("text--truncate",d.cardTitle),title:o,children:[n," ",o]}),s&&(0,u.jsx)("p",{className:(0,a.A)("text--truncate",d.cardDescription),title:s,children:s})]})}function m(e){var t,n,a=e.item,s=(0,o.Nr)(a),r=(n=(0,i.W)().selectMessage,function(e){return n(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,u.jsx)(p,{href:s,icon:"\ud83d\uddc3\ufe0f",title:a.label,description:null!=(t=a.description)?t:r(a.items.length)}):null}function k(e){var t,n,a=e.item,s=(0,r.A)(a.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",i=(0,o.cC)(null!=(t=a.docId)?t:void 0);return(0,u.jsx)(p,{href:a.href,icon:s,title:a.label,description:null!=(n=a.description)?n:null==i?void 0:i.description})}function g(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(k,{item:t});case"category":return(0,u.jsx)(m,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function f(e){var t=e.className,n=(0,o.$S)();return(0,u.jsx)(x,{items:n.items,className:t})}function x(e){var t=e.items,n=e.className;if(!t)return(0,u.jsx)(f,Object.assign({},e));var s=(0,o.d1)(t);return(0,u.jsx)("section",{className:(0,a.A)("row",n),children:s.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(g,{item:e})},t)}))})}},53465:(e,t,n)=>{"use strict";n.d(t,{W:()=>c});var a=n(96540),o=n(44586),s=["zero","one","two","few","many","other"];function i(e){return s.filter((function(t){return e.includes(t)}))}var r={locale:"en",pluralForms:i(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,o.A)().i18n.currentLocale;return(0,a.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:i(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(a){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+a.message+"\n"),r}var t,n}),[e])}function c(){var e=l();return{selectMessage:function(t,n){return function(e,t,n){var a=e.split("|");if(1===a.length)return a[0];a.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+a.length+": "+e);var o=n.select(t),s=n.pluralForms.indexOf(o);return a[Math.min(s,a.length-1)]}(n,t,e)}}}},59300:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/kusama_nominator_popup-633f75e8b404699f33b7d78f5ad7fd34.png"},20412:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/kusama_nominator_selection-8e7c4058648339294ebce2e1ce0c58e8.png"},15070:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/01-cc60f0cb7494041501c0ed80e5dca352.png"},30626:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/polkadotjs_payout_complete-87ad124d5d70e50c16f1434074562d70.png"},32630:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/polkadotjs_payout_page-fc4f62399f71b542e9eaac01405ef528.png"},43233:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/polkadotjs_payout_popup-feb847cdfae64f3fa247cdb2beea4ba6.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/804b1e9f.33cc02c9.js b/assets/js/804b1e9f.33cc02c9.js new file mode 100644 index 000000000000..4fe567f409f2 --- /dev/null +++ b/assets/js/804b1e9f.33cc02c9.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[1062],{98362:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var a=n(74848),o=n(28453),s=(n(47379),n(67141));n(3514);const i={id:"learn-guides-nominator",title:"Polkadot-JS Guides For Nominators",sidebar_label:"Nominator Guides",description:"Polkadot-JS Guides for Nominators.",keyword:["nominate","stake","staking","claim","rewards","polkadot-js"],slug:"../learn-guides-nominator"},r=void 0,l={id:"learn/learn-guides-nominator",title:"Polkadot-JS Guides For Nominators",description:"Polkadot-JS Guides for Nominators.",source:"@site/../docs/learn/learn-guides-nominator.md",sourceDirName:"learn",slug:"/learn-guides-nominator",permalink:"/docs/learn-guides-nominator",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-nominator.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-nominator",title:"Polkadot-JS Guides For Nominators",sidebar_label:"Nominator Guides",description:"Polkadot-JS Guides for Nominators.",keyword:["nominate","stake","staking","claim","rewards","polkadot-js"],slug:"../learn-guides-nominator"},sidebar:"docs",previous:{title:"Staking Guides",permalink:"/docs/learn-guides-staking"},next:{title:"Nomination Pool Guides",permalink:"/docs/learn-guides-staking-pools"}},c={},d=[{value:"Nominate Using Polkadot-JS",id:"nominate-using-polkadot-js",level:2},{value:"Bond your tokens",id:"bond-your-tokens",level:3},{value:"Nominate a validator",id:"nominate-a-validator",level:3},{value:"Stop nominating",id:"stop-nominating",level:3},{value:"Claiming Rewards with Polkadot-JS",id:"claiming-rewards-with-polkadot-js",level:2},{value:"Using Command-Line Interface (CLI)",id:"using-command-line-interface-cli",level:2},{value:"Step 1: Install @polkadot/api-cli",id:"step-1-install-polkadotapi-cli",level:3},{value:"Step 2: Bond Tokens",id:"step-2-bond-tokens",level:3},{value:"Step 3: Nominate a validator",id:"step-3-nominate-a-validator",level:3}];function u(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,a.jsxs)(t.p,{children:["See ",(0,a.jsx)(t.a,{href:"/docs/learn-staking",children:"this page"})," to learn about staking."]}),"\n",(0,a.jsx)(t.h2,{id:"nominate-using-polkadot-js",children:"Nominate Using Polkadot-JS"}),"\n",(0,a.jsx)(t.admonition,{title:"Video Tutorials",type:"info",children:(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://youtu.be/FCXC0CDhyS4?t=219",children:"How to Nominate/Stake"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://youtu.be/7VlTncHCGPc",children:"Staking with a Ledger device and Polkadot-JS"})}),"\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"https://www.youtube.com/watch?v=jL-N_IWiYVA",children:"Staking with a Ledger device and Ledger Live"})}),"\n"]})}),"\n",(0,a.jsx)(t.h3,{id:"bond-your-tokens",children:"Bond your tokens"}),"\n",(0,a.jsx)(t.admonition,{title:"Support Article",type:"info",children:(0,a.jsxs)(t.p,{children:["Read the support article about\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168057-polkadot-js-ui-how-do-i-stake-nominate-on-polkadot-",children:"How to Bond Tokens and Nominate"}),"."]})}),"\n",(0,a.jsxs)(t.p,{children:["On the ",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps",children:"Polkadot-JS UI"}),' navigate to the "Staking" tab (within the\n"Network" menu).']}),"\n",(0,a.jsxs)(t.p,{children:['The "Staking Overview" subsection will show you all the active validators and their information -\ntheir identities, the amount of KSM that are staking for them, amount that is their own provided\nstake, how much they charge in commission, the era points they\'ve earned in the current era, and the\nlast block number that they produced. If you click on the chart button it will take you to the\n"Validator Stats" page for that validator that shows you more detailed and historical information\nabout the validator\'s stake, rewards and ',(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashes"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:['The "Account actions" subsection (',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"link"}),") allows you\nto stake and nominate."]}),"\n",(0,a.jsxs)(t.p,{children:['The "Payouts" subsection (',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/payouts",children:"link"}),") allows you to\nclaim rewards from staking."]}),"\n",(0,a.jsxs)(t.p,{children:['The "Targets" subsection (',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/targets",children:"link"}),") will help you\nestimate your earnings and this is where it's good to start picking favorites."]}),"\n",(0,a.jsxs)(t.p,{children:['The "Waiting" subsection (',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/waiting",children:"link"}),") lists all pending\nvalidators that are awaiting more nominations to enter the active validator set. Validators will\nstay in the waiting queue until they have enough KSM backing them (as allocated through the\n",(0,a.jsx)(t.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n election mechanism"}),"). It is possible validator can remain in the\nqueue for a very long time if they never get enough backing."]}),"\n",(0,a.jsxs)(t.p,{children:['The "Validator Stats" subsection (',(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/query",children:"link"}),") allows you\nto query a validator's stash address and see historical charts on era points, elected stake,\nrewards, and ",(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashes"}),"."]}),"\n",(0,a.jsx)(t.p,{children:'Pick "Account actions" underneath "Network" > "Staking", then click the "+ Nominator" button.'}),"\n",(0,a.jsx)(t.p,{children:"You will see a modal window that looks like the below:"}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"nominator-update-1",src:n(59300).A+"",width:"2194",height:"1170"})}),"\n",(0,a.jsxs)(t.p,{children:['Select a "value bonded" that is ',(0,a.jsx)(t.strong,{children:"less"})," than the total amount of KSM you have, so you have some\nleft over to pay transaction fees. Transaction fees are currently at least 0.01 KSM, but they are\ndynamic based on a variety of factors including the load of recent blocks."]}),"\n",(0,a.jsx)(t.p,{children:"Also be mindful of the reaping threshold - the amount that must remain in an account lest it be\nburned. That amount is 0.01 in Kusama, so it's recommended to keep at least 0.1 KSM in your account\nto be on the safe side."}),"\n",(0,a.jsx)(t.p,{children:"Choose whatever payment destination that makes sense to you. If you're unsure, you can choose \"Stash\naccount (increase amount at stake)\" to simply accrue the rewards into the amount you're staking and\nearn compound interest."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Payout account selection dropdown with the custom account option highlighted",src:n(15070).A+"",width:"742",height:"245"})}),"\n",(0,a.jsx)(t.h3,{id:"nominate-a-validator",children:"Nominate a validator"}),"\n",(0,a.jsx)(t.admonition,{title:"Support Article",type:"info",children:(0,a.jsxs)(t.p,{children:["Read the support article about\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000150130-how-do-i-know-which-validators-to-choose-",children:"How to Select Validators"}),"."]})}),"\n",(0,a.jsxs)(t.p,{children:["You are now bonded. Being bonded means your tokens are locked and could be\n",(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"slashed"})," if the validators you nominate misbehave. All bonded funds can be\ndistributed to ",(0,a.jsx)(t.a,{href:"/docs/chain-state-values#maximum-votes-per-nominator",children:"multiple validators"}),".\nBe careful about the validators you choose since you will be slashed if your validator commits an\n",(0,a.jsx)(t.a,{href:"/docs/learn-offenses",children:"offence"}),"."]}),"\n",(0,a.jsx)(t.p,{children:'Click on "Nominate" on an account you\'ve bonded and you will be presented with another popup asking\nyou to select some validators.'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Nominating validators",src:n(20412).A+"",width:"2208",height:"982"})}),"\n",(0,a.jsxs)(t.p,{children:["Select them, confirm the transaction, and you're done - you are now nominating. Your nominations\nwill become active in the next era. Eras last six hours on Kusama - depending on when you do this,\nyour nominations may become active almost immediately, or you may have to wait almost the entire six\nhours before your nominations are active. You can check how far along Kusama is in the current era\non the ",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking",children:"Staking page"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["Assuming at least one of your nominations ends up in the active validator set, you will start to get\nrewards allocated to you. In order to claim them (i.e., add them to your account), you must manually\nclaim them. To initiate a claim, you can do it yourself or have the validator that you staked for\ninitiate a claim. This is to help optimize the effectiveness and storage of payouts on Kusama. See\nthe ",(0,a.jsx)(t.a,{href:"/docs/learn-staking#claiming-rewards",children:"Claiming Rewards"})," section of the Staking wiki page for\nmore details."]}),"\n",(0,a.jsx)(t.h3,{id:"stop-nominating",children:"Stop nominating"}),"\n",(0,a.jsx)(t.admonition,{title:"Support Article",type:"info",children:(0,a.jsxs)(t.p,{children:["Read the support article about\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000167902-how-can-i-unstake-my-tokens-again-",children:"How to Stop Nominating & Unbond Tokens"}),".\nSee also the support article about\n",(0,a.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170241-polkadot-js-ui-how-to-rebond-tokens-during-the-unbonding-period",children:"How to Rebond Tokens"}),"."]})}),"\n",(0,a.jsx)(t.p,{children:"At some point, you might decide to stop nominating one or more validators. You can always change who\nyou're nominating, but you cannot withdraw your tokens unless you unbond them."}),"\n",(0,a.jsx)(t.h2,{id:"claiming-rewards-with-polkadot-js",children:"Claiming Rewards with Polkadot-JS"}),"\n",(0,a.jsx)(t.p,{children:"Anyone can trigger a payout for any validator, as long as they are willing to pay the transaction\nfee. Someone must submit a transaction with a validator ID and an era index. Polkadot will\nautomatically calculate that validator's reward and distribute the rewards pro rata."}),"\n",(0,a.jsxs)(t.p,{children:["These details are handled for you automatically if you use the\n",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/payout",children:"Polkadot-JS UI"}),", which also allows you to submit\nbatches of eras at once."]}),"\n",(0,a.jsx)(t.p,{children:'To claim rewards on Polkadot-JS UI, you will need to be in the "Payouts" tab underneath "Staking",\nwhich will list all the pending payouts for your stashes.'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"pending-payouts",src:n(32630).A+"",width:"2876",height:"600"})}),"\n",(0,a.jsx)(t.p,{children:'To then claim your reward, select the "Payout all" button. This will prompt you to select your stash\naccounts for payout.'}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"select-payouts",src:n(43233).A+"",width:"2192",height:"624"})}),"\n",(0,a.jsx)(t.p,{children:"Once you are done with payout, another screen will appear asking for you to sign and submit the\ntransaction."}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"transaction-payouts",src:n(30626).A+"",width:"2878",height:"818"})}),"\n",(0,a.jsx)(t.h2,{id:"using-command-line-interface-cli",children:"Using Command-Line Interface (CLI)"}),"\n",(0,a.jsx)(t.p,{children:"Apart from using the Polkadot-JS UI to participate in the staking, you can do all these things in\nCLI instead. The CLI approach allows you to interact with the network without using Polkadot-JS."}),"\n",(0,a.jsx)(t.h3,{id:"step-1-install-polkadotapi-cli",children:"Step 1: Install @polkadot/api-cli"}),"\n",(0,a.jsxs)(t.p,{children:["We assume you have installed ",(0,a.jsx)(t.a,{href:"https://nodejs.org",children:"NodeJS with npm"}),". Run the following command to\ninstall the ",(0,a.jsx)(t.code,{children:"@polkadot/api-cli"})," globally:"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"npm install -g @polkadot/api-cli\n"})}),"\n",(0,a.jsx)(t.h3,{id:"step-2-bond-tokens",children:"Step 2: Bond Tokens"}),"\n",(0,a.jsx)(t.admonition,{title:"Controller accounts are deprecated",type:"info",children:(0,a.jsxs)(t.p,{children:["Controller accounts are deprecated. For more information, see\n",(0,a.jsx)(t.a,{href:"https://forum.polkadot.network/t/staking-controller-deprecation-plan-staking-ui-leads-comms/2748",children:"this discussion"}),"."]})}),"\n",(0,a.jsx)(t.p,{children:"Executing the following command:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "MNEMONIC_PHRASE" tx.staking.bond CONTROLLER_ADDRESS NUMBER_OF_TOKENS REWARD_DESTINATION --ws WEBSOCKET_ENDPOINT\n'})}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"CONTROLLER_ADDRESS"}),": An address you would like to bond to the stash account. (Controller accounts\nare now deprecated. Refer to\n",(0,a.jsx)(t.a,{href:"https://forum.polkadot.network/t/staking-controller-deprecation-plan-staking-ui-leads-comms/2748",children:"this discussion"}),"\nfor additional context)"]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"NUMBER_OF_TOKENS"}),": The number of native tokens (in Plancks) you would like to stake to the network.\nFor more information, see ",(0,a.jsx)(t.a,{href:"/docs/learn-DOT",children:"this page"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.code,{children:"REWARD_DESTINATION"}),":"]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"Staked"})," - Pay into the stash account, increasing the amount at stake accordingly."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"Stash"})," - Pay into the stash account, not increasing the amount at stake."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"Account"})," - Pay into a custom account that is not the stash (can be a proxy or another type of\naccount)."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.code,{children:"Controller"})," - Pay into the controller account."]}),"\n"]}),"\n",(0,a.jsx)(t.p,{children:"Example for Kusama:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "xxxx xxxxx xxxx xxxxx" tx.staking.bond DMTHrNcmA8QbqRS4rBq8LXn8ipyczFoNMb1X4cY2WD9tdBX 1000000000000 Staked --ws wss://kusama-rpc.polkadot.io\n'})}),"\n",(0,a.jsxs)(t.p,{children:["For wss endpoints see ",(0,a.jsx)(t.a,{href:"/docs/maintain-endpoints",children:"this page"}),"."]}),"\n",(0,a.jsx)(t.p,{children:"Result:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'...\n...\n "status": {\n "InBlock": "0x0ed1ec0ba69564e8f98958d69f826adef895b5617366a32a3aa384290e98514e"\n }\n'})}),"\n",(0,a.jsxs)(t.p,{children:["You can check the transaction status by using the value of the ",(0,a.jsx)(t.code,{children:"InBlock"})," in\n",(0,a.jsx)(t.a,{href:"https://www.subscan.io/",children:"Subscan"}),". Also, you can verify the bonding state under the\n",(0,a.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/staking/actions",children:"Staking"})," page on the Polkadot-JS UI."]}),"\n",(0,a.jsx)(t.h3,{id:"step-3-nominate-a-validator",children:"Step 3: Nominate a validator"}),"\n",(0,a.jsx)(t.p,{children:"To nominate a validator, you can execute the following command:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "MNEMONIC_PHRASE" tx.staking.nominate \'["VALIDATOR_ADDRESS"]\' --ws WS_ENDPOINT\n'})}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'polkadot-js-api --seed "xxxx xxxxx xxxx xxxxx" tx.staking.nominate \'["CmD9vaMYoiKe7HiFnfkftwvhKbxN9bhyjcDrfFRGbifJEG8","E457XaKbj2yTB2URy8N4UuzmyuFRkcdxYs67UvSgVr7HyFb"]\' --ws wss://kusama-rpc.polkadot.io\n'})}),"\n",(0,a.jsx)(t.p,{children:"After a few seconds, you should see the hash of the transaction, and if you would like to verify the\nnomination status, you can check that on the Polkadot-JS UI as well."})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(u,{...e})}):u(e)}},67141:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(96540),o=n(74848);const s=function(e){var t,n=e.message,s=(0,a.useState)(!0),i=s[0],r=s[1];return(0,o.jsx)(o.Fragment,{children:i&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var a=n(90675),o=n(10467),s=n(96540),i=n(19588),r=n(2026),l=n(11135);function c(e,t,n){return d.apply(this,arguments)}function d(){return(d=(0,o.A)((0,a.A)().mark((function e(t,n,o){var s,l,c,d,u;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return c=new i.E(s),e.next=25,r.G.create({provider:c});case 25:d=e.sent,(u=n.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=u[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+u[0]+") in "+n);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function u(e,t,n,a){switch(t){case"humanReadable":(0,l.HumanReadable)(e,n,a);break;case"precise":(0,l.Precise)(e,n,a);break;case"blocksToDays":(0,l.BlocksToDays)(e,a);break;case"erasToDays":(0,l.ErasToDays)(e,a,n);break;case"percentage":(0,l.Percentage)(e,a);break;case"permillToPercent":(0,l.PermillToPercent)(e,a);break;case"arrayLength":(0,l.ArrayLength)(e,a);break;default:return void console.log("Ignoring unknown filter type")}}const h=function(e){var t=e.network,n=e.path,i=e.defaultValue,r=e.filter,l=void 0===r?void 0:r,d=(0,s.useState)(""),h=d[0],p=d[1];return t=t.toLowerCase(),(0,s.useEffect)((function(){void 0!==l?u(i.toString(),l,t,p):p(i.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,o.A)((0,a.A)().mark((function e(){var o;return(0,a.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,n,p);case 2:if(void 0!==(o=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?u(o,l,t,p):p(o);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(r){console.log(r)}}}),[]),h}},11135:e=>{var t="polkadot",n="kusama",a="statemine",o="statemint",s="polkadotpeople",i="kusamapeople",r={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var d=void 0;if(l===t||l===o)d=3;else if(l===n||l===a||l===s)d=6;else{if(l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),c((e=Number.isInteger(e/r[l].precision)?e/r[l].precision+" "+r[l].symbol:(e/r[l].precision).toFixed(d)+" "+r[l].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/r[t].precision+" "+r[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,r,l){var c=void 0;if(l===t||l===o||l==s)c=1;else{if(l!==n&&l!==a&&l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}r((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},3514:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});n(96540);var a=n(34164),o=n(26972),s=n(28774),i=n(53465),r=n(16654),l=n(21312),c=n(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=n(74848);function h(e){var t=e.href,n=e.children;return(0,u.jsx)(s.A,{href:t,className:(0,a.A)("card padding--lg",d.cardContainer),children:n})}function p(e){var t=e.href,n=e.icon,o=e.title,s=e.description;return(0,u.jsxs)(h,{href:t,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,a.A)("text--truncate",d.cardTitle),title:o,children:[n," ",o]}),s&&(0,u.jsx)("p",{className:(0,a.A)("text--truncate",d.cardDescription),title:s,children:s})]})}function m(e){var t,n,a=e.item,s=(0,o.Nr)(a),r=(n=(0,i.W)().selectMessage,function(e){return n(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,u.jsx)(p,{href:s,icon:"\ud83d\uddc3\ufe0f",title:a.label,description:null!=(t=a.description)?t:r(a.items.length)}):null}function k(e){var t,n,a=e.item,s=(0,r.A)(a.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",i=(0,o.cC)(null!=(t=a.docId)?t:void 0);return(0,u.jsx)(p,{href:a.href,icon:s,title:a.label,description:null!=(n=a.description)?n:null==i?void 0:i.description})}function g(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(k,{item:t});case"category":return(0,u.jsx)(m,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function f(e){var t=e.className,n=(0,o.$S)();return(0,u.jsx)(x,{items:n.items,className:t})}function x(e){var t=e.items,n=e.className;if(!t)return(0,u.jsx)(f,Object.assign({},e));var s=(0,o.d1)(t);return(0,u.jsx)("section",{className:(0,a.A)("row",n),children:s.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(g,{item:e})},t)}))})}},53465:(e,t,n)=>{"use strict";n.d(t,{W:()=>c});var a=n(96540),o=n(44586),s=["zero","one","two","few","many","other"];function i(e){return s.filter((function(t){return e.includes(t)}))}var r={locale:"en",pluralForms:i(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,o.A)().i18n.currentLocale;return(0,a.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:i(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(a){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+a.message+"\n"),r}var t,n}),[e])}function c(){var e=l();return{selectMessage:function(t,n){return function(e,t,n){var a=e.split("|");if(1===a.length)return a[0];a.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+a.length+": "+e);var o=n.select(t),s=n.pluralForms.indexOf(o);return a[Math.min(s,a.length-1)]}(n,t,e)}}}},59300:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/kusama_nominator_popup-633f75e8b404699f33b7d78f5ad7fd34.png"},20412:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/kusama_nominator_selection-8e7c4058648339294ebce2e1ce0c58e8.png"},15070:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/01-cc60f0cb7494041501c0ed80e5dca352.png"},30626:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/polkadotjs_payout_complete-87ad124d5d70e50c16f1434074562d70.png"},32630:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/polkadotjs_payout_page-fc4f62399f71b542e9eaac01405ef528.png"},43233:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=n.p+"assets/images/polkadotjs_payout_popup-feb847cdfae64f3fa247cdb2beea4ba6.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/84ede15a.3947595e.js b/assets/js/84ede15a.3947595e.js new file mode 100644 index 000000000000..3cf88568f364 --- /dev/null +++ b/assets/js/84ede15a.3947595e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6124],{88779:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var s=n(74848),a=n(28453),o=(n(11470),n(19365),n(67141));const i={id:"learn-guides-transfers",title:"Polkadot-JS Guides about Transfers",sidebar_label:"Transfer Guides",description:"Polkadot-JS Guides about Balances Transfers.",keywords:["gides","advanced","polkadot-js","transfers"],slug:"../learn-guides-transfers"},r=void 0,l={id:"learn/learn-guides-transfers",title:"Polkadot-JS Guides about Transfers",description:"Polkadot-JS Guides about Balances Transfers.",source:"@site/../docs/learn/learn-guides-transfers.md",sourceDirName:"learn",slug:"/learn-guides-transfers",permalink:"/docs/learn-guides-transfers",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-transfers.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-transfers",title:"Polkadot-JS Guides about Transfers",sidebar_label:"Transfer Guides",description:"Polkadot-JS Guides about Balances Transfers.",keywords:["gides","advanced","polkadot-js","transfers"],slug:"../learn-guides-transfers"},sidebar:"docs",previous:{title:"Pure Proxy Guides",permalink:"/docs/learn-guides-accounts-proxy-pure"},next:{title:"Staking Guides",permalink:"/docs/learn-guides-staking"}},c={},d=[{value:"Metadata Updates with the Polkadot-JS Browser Extension",id:"metadata-updates-with-the-polkadot-js-browser-extension",level:2},{value:"Transfers using the Polkadot-JS UI and Browser Extension",id:"transfers-using-the-polkadot-js-ui-and-browser-extension",level:2},{value:"Verify Extrinsics with the Polkadot-JS Browser Extension",id:"verify-extrinsics-with-the-polkadot-js-browser-extension",level:3},{value:"Verify Extrinsics with the Polkadot-JS UI",id:"verify-extrinsics-with-the-polkadot-js-ui",level:3},{value:"Keep-Alive Checks with the Polkadot-JS UI",id:"keep-alive-checks-with-the-polkadot-js-ui",level:3},{value:"Vested Transfers with the Polkadot-JS UI",id:"vested-transfers-with-the-polkadot-js-ui",level:3},{value:"Lazy Vesting",id:"lazy-vesting",level:4},{value:"Calculating When Vesting DOT Will Be Available",id:"calculating-when-vesting-dot-will-be-available",level:4},{value:"Batch Transfers with the Polkadot-JS UI",id:"batch-transfers-with-the-polkadot-js-ui",level:3},{value:"Teleporting Tokens using the Polkadot-JS UI",id:"teleporting-tokens-using-the-polkadot-js-ui",level:3},{value:"Calculating Fees with Polkadot-JS",id:"calculating-fees-with-polkadot-js",level:2},{value:"Existing Reference Error",id:"existing-reference-error",level:2},{value:"Bonded Tokens",id:"bonded-tokens",level:3},{value:"Checking for Locks",id:"checking-for-locks",level:3},{value:"Purging Session Keys",id:"purging-session-keys",level:3},{value:"Existing Recovery Info",id:"existing-recovery-info",level:3},{value:"Existing Non-Native Assets",id:"existing-non-native-assets",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsx)(t.h2,{id:"metadata-updates-with-the-polkadot-js-browser-extension",children:"Metadata Updates with the Polkadot-JS Browser Extension"}),"\n",(0,s.jsxs)(t.p,{children:["Before signing extrinsics with the Polkadot-JS Browser Extension, always check for metadata updates.\n",(0,s.jsx)(t.a,{href:"https://youtu.be/gbvrHzr4EDY?t=84",children:(0,s.jsx)(t.strong,{children:"This video tutorial"})})," will explain how to do it."]}),"\n",(0,s.jsx)(t.admonition,{title:"Polkadot Vault vs Polkadot-JS Browser Extension",type:"info",children:(0,s.jsx)(t.p,{children:"The Polkadot Vault app updates the full metadata through the QR fountain while the extension updates\nthe metadata index (the metadata is not loaded into it). As a consequence the process of updating\nmetadata is different in this two cases (you will notice that on the Vault app the update takes\nlonger for example). Having outdated metadata on the Vault app will prevent you from signing, while\non the extension you will be able to click the sign button but the extrinsic will likely fail\n(similarly of having an outdated Ledger app). In general, failing to update metadata will most\nlikely result in you not being able to sign extrinsics."})}),"\n",(0,s.jsx)(t.h2,{id:"transfers-using-the-polkadot-js-ui-and-browser-extension",children:"Transfers using the Polkadot-JS UI and Browser Extension"}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=gbvrHzr4EDY",children:"this video tutorial"})," to learn how to send funds\nusing the Polkadot-JS UI and Browser Extension. See also the Polkadot Support pages for detailed\ninformation about signing transactions using\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181993-how-to-sign-a-transaction-directly-on-polkadot-js-ui",children:"the Polkadot-JS UI"}),"\nand\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181989",children:"the Polkadot-JS browser extension"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"verify-extrinsics-with-the-polkadot-js-browser-extension",children:"Verify Extrinsics with the Polkadot-JS Browser Extension"}),"\n",(0,s.jsxs)(t.p,{children:["Visit the\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-in-the-Polkadot-extension",children:(0,s.jsx)(t.strong,{children:"dedicated support page"})}),"\nand see ",(0,s.jsx)(t.a,{href:"https://youtu.be/bxMs-9fBtFk?t=261",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," tutorial to learn about how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nto you while signing for transactions."]}),"\n",(0,s.jsx)(t.h3,{id:"verify-extrinsics-with-the-polkadot-js-ui",children:"Verify Extrinsics with the Polkadot-JS UI"}),"\n",(0,s.jsxs)(t.p,{children:["Visit the\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-in-the-Polkadot-JS-UI",children:(0,s.jsx)(t.strong,{children:"dedicated support page"})}),"\nand see ",(0,s.jsx)(t.a,{href:"https://youtu.be/bxMs-9fBtFk?t=163",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," tutorial to learn about how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nto you while signing for transactions."]}),"\n",(0,s.jsx)(t.h3,{id:"keep-alive-checks-with-the-polkadot-js-ui",children:"Keep-Alive Checks with the Polkadot-JS UI"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://youtu.be/mgPHVztHJWk",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," and\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168651-what-is-the-existential-deposit-",children:(0,s.jsx)(t.strong,{children:"this support page"})}),"\nto learn about keep-alive checks and existential deposit."]})}),"\n",(0,s.jsx)(t.p,{children:"In Polkadot there are two main ways to transfer funds from one account to another:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"transfer keep-alive"})," (default option) will not allow you to send an amount that would allow the\nsending account to be removed due to it going below the\n",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#existential-deposit",children:"existential deposit"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"transfer allow-death"})," will allow you to send tokens regardless of the consequence. If the balance\ndrops below the existential deposit your account will be reaped. It may be that you do not want to\nkeep the account alive (for example, because you are moving all of your funds to a different\naddress). To switch the keep-alive check off visit\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169248",children:"this support article"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.admonition,{type:"info",children:[(0,s.jsxs)(t.p,{children:["Attempting to send less than the\n",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#existential-deposit",children:"existential deposit"})," to an account with zero\nbalance will always fail, no matter if the keep-alive check is on or not."]}),(0,s.jsx)(t.p,{children:"Even if the transfer fails due to a keep-alive check, the transaction fee will be deducted from the\nsending account if you attempt to transfer."})]}),"\n",(0,s.jsx)(t.h3,{id:"vested-transfers-with-the-polkadot-js-ui",children:"Vested Transfers with the Polkadot-JS UI"}),"\n",(0,s.jsxs)(t.p,{children:["You can watch ",(0,s.jsx)(t.a,{href:"https://youtu.be/JVlwTQBwNGc",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," to understand how to do vested\ntransfers using the Polkadot-JS UI, including linear and cliff vesting. Note the tutorial uses the\nWestend Testnet, but the same applies to Polkadot and Kusama."]}),"\n",(0,s.jsx)(t.p,{children:"There are two ways that vesting schedules can be created."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["One way is through an extrinsic type available in the Vesting pallet, ",(0,s.jsx)(t.code,{children:"vested_transfer"}),". The\nvested transfer function allows anyone to create a vesting schedule with a transfer of funds, as\nlong as the account for which the vesting schedule will be created does not already have one and\nthe transfer moves at least ",(0,s.jsx)(t.code,{children:"MinVestedTransfer"})," funds, which is specified as a chain constant."]}),"\n",(0,s.jsx)(t.li,{children:"A second way is as part of the genesis configuration of the chain. In the case of Polkadot, the\nchain specification genesis script reads the state of the Claims contract that exists on the\nEthereum blockchain and creates vesting schedules in genesis for all the allocations registered as\nbeing vested."}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Vesting schedules have three parameters:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"locked"}),", the amount of tokens to be transferred in\n",(0,s.jsx)(t.a,{href:"../learn/learn-DOT#the-planck-unit",children:"Planck units"}),")"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"per block"}),", the number of tokens that are released per block"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"starting block"}),", the block number after which the vesting schedule starts"]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"The configuration of these three fields dictates the amount of funds that are originally locked, the\nslope of the unlock line and the block number for when the unlocking begins."}),"\n",(0,s.jsx)(t.h4,{id:"lazy-vesting",children:"Lazy Vesting"}),"\n",(0,s.jsxs)(t.p,{children:["Like ",(0,s.jsx)(t.a,{href:"/docs/learn-staking-advanced",children:"simple payouts"}),", vesting is ",(0,s.jsx)(t.em,{children:"lazy"}),", which means that someone must\nexplicitly call an extrinsic to update the lock that is placed on an account."]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["The ",(0,s.jsx)(t.code,{children:"vest"})," extrinsic will update the lock that is placed on the caller."]}),"\n",(0,s.jsxs)(t.li,{children:["The ",(0,s.jsx)(t.code,{children:"vest_other"}),' will update the lock that is placed on another "target" account\'s funds.']}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"These extrinsics are exposed from the Vesting pallet."}),"\n",(0,s.jsxs)(t.p,{children:["If you are using ",(0,s.jsx)(t.a,{href:"/docs/learn-polkadotjs",children:"the Polkadot-JS UI"}),", when there are tokens available to\nvest for an account, you can unlock tokens that have already been vested from the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts"})," page."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"unbond",src:n(52697).A+"",width:"241",height:"301"})}),"\n",(0,s.jsx)(t.h4,{id:"calculating-when-vesting-dot-will-be-available",children:"Calculating When Vesting DOT Will Be Available"}),"\n",(0,s.jsxs)(t.p,{children:["Generally, you should be able to see from the ",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts"}),' by\nlooking at your accounts and seeing when the vesting will finish. However, some DOT vest with\n"cliffs" - a single block where all the DOT are released, instead of vesting over time. In this\ncase, you will have to query the chain state directly to see when they will be available (since\ntechnically, the vesting has not yet started - all of the vesting will occur in a single block in\nthe future).']}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["Navigate to the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/chainstate",children:"Chain State"})," page on\nPolkadot-JS."]}),"\n",(0,s.jsxs)(t.li,{children:["Query chain state for ",(0,s.jsx)(t.code,{children:"vesting.vesting(ACCOUNT_ID)"})]}),"\n",(0,s.jsxs)(t.li,{children:["Note the ",(0,s.jsx)(t.code,{children:"startingBlock"})," where the unlock starts, and how much DOT is unlocked per block\n(",(0,s.jsx)(t.code,{children:"perBlock"}),")."]}),"\n",(0,s.jsxs)(t.li,{children:['You will have to calculate the result into \u201chuman time". To do this, remember that there are\napproximately 14\u2019400 blocks per day, and you can see what the latest block is shown on the\n',(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/explorer",children:"Explorer"})," page."]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"batch-transfers-with-the-polkadot-js-ui",children:"Batch Transfers with the Polkadot-JS UI"}),"\n",(0,s.jsx)(t.p,{children:"Batch transfers are balances transfers to multiple accounts executed by one account. In order to\nconstruct a batch transfer you need to:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Create a ",(0,s.jsx)(t.code,{children:"utility.batch(calls)"})," extrinsic using the\n",(0,s.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_utility/index.html",children:"utility pallet"}),", and"]}),"\n",(0,s.jsxs)(t.li,{children:["Within the batch call you can create multiple ",(0,s.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsics using the\n",(0,s.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_balances/index.html",children:"balances pallet"}),". You\ncan specify as many receivers as you desire."]}),"\n"]}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["You can watch ",(0,s.jsx)(t.a,{href:"https://youtu.be/uoUC2K8muvw",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," to learn how to do batch\ntransfers. Note the tutorial uses the Westend Testnet, but the same applies to both Polkadot and\nKusama."]})}),"\n",(0,s.jsx)(t.h3,{id:"teleporting-tokens-using-the-polkadot-js-ui",children:"Teleporting Tokens using the Polkadot-JS UI"}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://youtu.be/3tE9ouub5Tg",children:"this video tutorial"})," and\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181119-how-to-teleport-dot-or-ksm-between-statemint-or-statemine",children:"this additional support article"}),"\nto learn more about how to teleport tokens."]}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsx)(t.p,{children:'If you do not see "Accounts > Teleport" in the Polkadot-JS UI, the source chain that you have\nselected does not support teleportation yet.'})}),"\n",(0,s.jsx)(t.h2,{id:"calculating-fees-with-polkadot-js",children:"Calculating Fees with Polkadot-JS"}),"\n",(0,s.jsx)(t.p,{children:"To calculate fees you can go to Developer > Runtime Calls and select the following extrinsics:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"transactionPaymentApi.queryInfo"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"transactionPaymentApi.queryFeeDetails"})}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["and specify the ",(0,s.jsx)(t.code,{children:"0x"})," prefixed hex call data and its length."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Fee details",src:n(76379).A+"",width:"1161",height:"668"})}),"\n",(0,s.jsxs)(t.p,{children:["The sum of ",(0,s.jsx)(t.code,{children:"baseFee"}),", ",(0,s.jsx)(t.code,{children:"lenFee"})," and ",(0,s.jsx)(t.code,{children:"adjustedWeightFee"})," will yield the ",(0,s.jsx)(t.code,{children:"partialFee"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["One useful utility for estimating transaction fees programmatically is the via the\n",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/@polkadot/api",children:"@polkadot/api"}),". Check out the following script that\nlogs some relevant fee information:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-js",children:"// Estimate the fees as RuntimeDispatchInfo using the signer\nconst info = await api.tx.balances.transfer(recipient, 123).paymentInfo(sender);\n\n// Log relevant info, partialFee is Balance, estimated for current\nconsole.log(`\n class=${info.class.toString()},\n weight=${info.weight.toString()},\n partialFee=${info.partialFee.toHuman()}\n`);\n"})}),"\n",(0,s.jsxs)(t.p,{children:["For additional information on interacting with the API, checkout\n",(0,s.jsx)(t.a,{href:"/docs/polkadotjs",children:"Polkadot-JS"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"existing-reference-error",children:"Existing Reference Error"}),"\n",(0,s.jsxs)(t.p,{children:["If you are trying to reap an account and you receive an error similar to\n",(0,s.jsx)(t.code,{children:'"There is an existing reference count on the sender account. As such the account cannot be reaped from the state"'}),",\nthen you have existing references to this account that must be first removed before it can be\nreaped. References may still exist from:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Bonded tokens (most likely)"}),"\n",(0,s.jsx)(t.li,{children:"Unpurged session keys (if you were previously a validator)"}),"\n",(0,s.jsx)(t.li,{children:"Token locks"}),"\n",(0,s.jsx)(t.li,{children:"Existing recovery info"}),"\n",(0,s.jsx)(t.li,{children:"Existing assets"}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"bonded-tokens",children:"Bonded Tokens"}),"\n",(0,s.jsxs)(t.p,{children:["If you have tokens that are bonded, you will need to unbond them before you can reap your account.\nFollow the instructions at ",(0,s.jsx)(t.a,{href:"/docs/learn-guides-nominator#bond-your-tokens",children:"Unbonding and Rebonding"}),"\nto check if you have bonded tokens, stop nominating (if necessary) and unbond your tokens."]}),"\n",(0,s.jsx)(t.h3,{id:"checking-for-locks",children:"Checking for Locks"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://youtu.be/LHgY7ds_bZ0",children:"this video tutorial"})," and\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169437-why-can-t-i-transfer-tokens-",children:"this support page"}),"\nto learn how to check for locks and remove them."]})}),"\n",(0,s.jsxs)(t.p,{children:["You can also check for locks by querying ",(0,s.jsx)(t.code,{children:"system.account(AccountId)"})," in\n",(0,s.jsxs)(t.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:[(0,s.jsx)(t.code,{children:"Chain state"})," tab under the ",(0,s.jsx)(t.code,{children:"Developer"})," drop-down menu in the Polkadot-JS UI"]}),'.\nSelect your account, then click the "+" button next to the dropdowns, and check the relative ',(0,s.jsx)(t.code,{children:"data"}),"\nJSON object. If you see a non-zero value for anything other than ",(0,s.jsx)(t.code,{children:"free"}),", you have locks on your\naccount that need to get resolved."]}),"\n",(0,s.jsx)(t.h3,{id:"purging-session-keys",children:"Purging Session Keys"}),"\n",(0,s.jsxs)(t.p,{children:["If you used this account to set up a validator and you did not purge your keys before unbonding your\ntokens, you need to purge your keys. You can do this by seeing the\n",(0,s.jsx)(t.a,{href:"/docs/maintain-guides-how-to-stop-validating",children:"How to Stop Validating"})," page. This can also\nbe checked by checking ",(0,s.jsx)(t.code,{children:"session.nextKeys"})," in the chain state for an existing key."]}),"\n",(0,s.jsx)(t.h3,{id:"existing-recovery-info",children:"Existing Recovery Info"}),"\n",(0,s.jsxs)(t.p,{children:["Currently, Polkadot does not use the\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/recovery/",children:"Recovery Pallet"}),",\nso this is probably not the reason for your tokens having existing references."]}),"\n",(0,s.jsxs)(t.p,{children:["On Kusama, you can check if recovery has been set up by checking the\n",(0,s.jsx)(t.code,{children:"recovery.recoverable(AccountId)"})," chain state. This can be found under ",(0,s.jsx)(t.code,{children:"Developer > Chain state"})," in\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/",children:"PolkadotJS Apps"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"existing-non-native-assets",children:"Existing Non-Native Assets"}),"\n",(0,s.jsxs)(t.p,{children:["Currently, Polkadot does not use the\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/assets",children:"Assets Pallet"}),", so\nthis is probably not the reason for your tokens having existing references."]})]})}function u(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>o});var s=n(96540),a=n(74848);const o=function(e){var t,n=e.message,o=(0,s.useState)(!0),i=o[0],r=o[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},19365:(e,t,n)=>{n.d(t,{A:()=>i});n(96540);var s=n(34164);const a={tabItem:"tabItem_Ymn6"};var o=n(74848);function i(e){var t=e.children,n=e.hidden,i=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(a.tabItem,i),hidden:n,children:t})}},11470:(e,t,n)=>{n.d(t,{A:()=>y});var s=n(96540),a=n(34164),o=n(23104),i=n(56347),r=n(205),l=n(57485),c=n(31682),d=n(75376);function h(e){var t,n;return null!=(t=null==(n=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function u(e){var t=e.values,n=e.children;return(0,s.useMemo)((function(){var e=null!=t?t:function(e){return h(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,c.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function f(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId,o=(0,i.W6)(),r=function(e){var t=e.queryString,n=void 0!==t&&t,s=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:n,groupId:a});return[(0,l.aZ)(r),(0,s.useCallback)((function(e){if(r){var t=new URLSearchParams(o.location.search);t.set(r,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[r,o])]}function x(e){var t,n,a,o,i=e.defaultValue,l=e.queryString,c=void 0!==l&&l,h=e.groupId,x=u(e),g=(0,s.useState)((function(){return function(e){var t,n=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var a=null!=(t=s.find((function(e){return e.default})))?t:s[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:i,tabValues:x})})),v=g[0],k=g[1],j=f({queryString:c,groupId:h}),b=j[0],m=j[1],y=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),n=(0,d.Dv)(t),a=n[0],o=n[1],[a,(0,s.useCallback)((function(e){t&&o.set(e)}),[t,o])]),w=y[0],S=y[1],T=function(){var e=null!=b?b:w;return p({value:e,tabValues:x})?e:null}();return(0,r.A)((function(){T&&k(T)}),[T]),{selectedValue:v,selectValue:(0,s.useCallback)((function(e){if(!p({value:e,tabValues:x}))throw new Error("Can't select invalid tab value="+e);k(e),m(e),S(e)}),[m,S,x]),tabValues:x}}var g=n(92303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var k=n(74848);function j(e){var t=e.className,n=e.block,s=e.selectedValue,i=e.selectValue,r=e.tabValues,l=[],c=(0,o.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,n=l.indexOf(t),a=r[n].value;a!==s&&(c(t),i(a))},h=function(e){var t,n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var s,a=l.indexOf(e.currentTarget)+1;n=null!=(s=l[a])?s:l[0];break;case"ArrowLeft":var o,i=l.indexOf(e.currentTarget)-1;n=null!=(o=l[i])?o:l[l.length-1]}null==(t=n)||t.focus()};return(0,k.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":n},t),children:r.map((function(e){var t=e.value,n=e.label,o=e.attributes;return(0,k.jsx)("li",Object.assign({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,ref:function(e){return l.push(e)},onKeyDown:h,onClick:d},o,{className:(0,a.A)("tabs__item",v.tabItem,null==o?void 0:o.className,{"tabs__item--active":s===t}),children:null!=n?n:t}),t)}))})}function b(e){var t=e.lazy,n=e.children,o=e.selectedValue,i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var r=i.find((function(e){return e.props.value===o}));return r?(0,s.cloneElement)(r,{className:(0,a.A)("margin-top--md",r.props.className)}):null}return(0,k.jsx)("div",{className:"margin-top--md",children:i.map((function(e,t){return(0,s.cloneElement)(e,{key:t,hidden:e.props.value!==o})}))})}function m(e){var t=x(e);return(0,k.jsxs)("div",{className:(0,a.A)("tabs-container",v.tabList),children:[(0,k.jsx)(j,Object.assign({},t,e)),(0,k.jsx)(b,Object.assign({},t,e))]})}function y(e){var t=(0,g.A)();return(0,k.jsx)(m,Object.assign({},e,{children:h(e.children)}),String(t))}},76379:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/fee-details-e61cb9c6939a0364802da2b98129d80d.png"},52697:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/unlock-vesting-deefc0d6d9a08a91af1490a82e01069b.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var s=n(96540);const a={},o=s.createContext(a);function i(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/84ede15a.9eec9eca.js b/assets/js/84ede15a.9eec9eca.js deleted file mode 100644 index bdce39ae6402..000000000000 --- a/assets/js/84ede15a.9eec9eca.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6124],{88779:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var s=n(74848),a=n(28453),o=(n(11470),n(19365),n(67141));const i={id:"learn-guides-transfers",title:"Polkadot-JS Guides about Transfers",sidebar_label:"Transfer Guides",description:"Polkadot-JS Guides about Balances Transfers.",keywords:["gides","advanced","polkadot-js","transfers"],slug:"../learn-guides-transfers"},r=void 0,l={id:"learn/learn-guides-transfers",title:"Polkadot-JS Guides about Transfers",description:"Polkadot-JS Guides about Balances Transfers.",source:"@site/../docs/learn/learn-guides-transfers.md",sourceDirName:"learn",slug:"/learn-guides-transfers",permalink:"/docs/learn-guides-transfers",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-transfers.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-guides-transfers",title:"Polkadot-JS Guides about Transfers",sidebar_label:"Transfer Guides",description:"Polkadot-JS Guides about Balances Transfers.",keywords:["gides","advanced","polkadot-js","transfers"],slug:"../learn-guides-transfers"},sidebar:"docs",previous:{title:"Pure Proxy Guides",permalink:"/docs/learn-guides-accounts-proxy-pure"},next:{title:"Staking Guides",permalink:"/docs/learn-guides-staking"}},c={},d=[{value:"Metadata Updates with the Polkadot-JS Browser Extension",id:"metadata-updates-with-the-polkadot-js-browser-extension",level:2},{value:"Transfers using the Polkadot-JS UI and Browser Extension",id:"transfers-using-the-polkadot-js-ui-and-browser-extension",level:2},{value:"Verify Extrinsics with the Polkadot-JS Browser Extension",id:"verify-extrinsics-with-the-polkadot-js-browser-extension",level:3},{value:"Verify Extrinsics with the Polkadot-JS UI",id:"verify-extrinsics-with-the-polkadot-js-ui",level:3},{value:"Keep-Alive Checks with the Polkadot-JS UI",id:"keep-alive-checks-with-the-polkadot-js-ui",level:3},{value:"Vested Transfers with the Polkadot-JS UI",id:"vested-transfers-with-the-polkadot-js-ui",level:3},{value:"Lazy Vesting",id:"lazy-vesting",level:4},{value:"Calculating When Vesting DOT Will Be Available",id:"calculating-when-vesting-dot-will-be-available",level:4},{value:"Batch Transfers with the Polkadot-JS UI",id:"batch-transfers-with-the-polkadot-js-ui",level:3},{value:"Teleporting Tokens using the Polkadot-JS UI",id:"teleporting-tokens-using-the-polkadot-js-ui",level:3},{value:"Calculating Fees with Polkadot-JS",id:"calculating-fees-with-polkadot-js",level:2},{value:"Existing Reference Error",id:"existing-reference-error",level:2},{value:"Bonded Tokens",id:"bonded-tokens",level:3},{value:"Checking for Locks",id:"checking-for-locks",level:3},{value:"Purging Session Keys",id:"purging-session-keys",level:3},{value:"Existing Recovery Info",id:"existing-recovery-info",level:3},{value:"Existing Non-Native Assets",id:"existing-non-native-assets",level:3}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsx)(t.h2,{id:"metadata-updates-with-the-polkadot-js-browser-extension",children:"Metadata Updates with the Polkadot-JS Browser Extension"}),"\n",(0,s.jsxs)(t.p,{children:["Before signing extrinsics with the Polkadot-JS Browser Extension, always check for metadata updates.\n",(0,s.jsx)(t.a,{href:"https://youtu.be/gbvrHzr4EDY?t=84",children:(0,s.jsx)(t.strong,{children:"This video tutorial"})})," will explain how to do it."]}),"\n",(0,s.jsx)(t.admonition,{title:"Polkadot Vault vs Polkadot-JS Browser Extension",type:"info",children:(0,s.jsx)(t.p,{children:"The Polkadot Vault app updates the full metadata through the QR fountain while the extension updates\nthe metadata index (the metadata is not loaded into it). As a consequence the process of updating\nmetadata is different in this two cases (you will notice that on the Vault app the update takes\nlonger for example). Having outdated metadata on the Vault app will prevent you from signing, while\non the extension you will be able to click the sign button but the extrinsic will likely fail\n(similarly of having an outdated Ledger app). In general, failing to update metadata will most\nlikely result in you not being able to sign extrinsics."})}),"\n",(0,s.jsx)(t.h2,{id:"transfers-using-the-polkadot-js-ui-and-browser-extension",children:"Transfers using the Polkadot-JS UI and Browser Extension"}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=gbvrHzr4EDY",children:"this video tutorial"})," to learn how to send funds\nusing the Polkadot-JS UI and Browser Extension. See also the Polkadot Support pages for detailed\ninformation about signing transactions using\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181993-how-to-sign-a-transaction-directly-on-polkadot-js-ui",children:"the Polkadot-JS UI"}),"\nand\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181989",children:"the Polkadot-JS browser extension"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"verify-extrinsics-with-the-polkadot-js-browser-extension",children:"Verify Extrinsics with the Polkadot-JS Browser Extension"}),"\n",(0,s.jsxs)(t.p,{children:["Visit the\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-in-the-Polkadot-extension",children:(0,s.jsx)(t.strong,{children:"dedicated support page"})}),"\nand see ",(0,s.jsx)(t.a,{href:"https://youtu.be/bxMs-9fBtFk?t=261",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," tutorial to learn about how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nto you while signing for transactions."]}),"\n",(0,s.jsx)(t.h3,{id:"verify-extrinsics-with-the-polkadot-js-ui",children:"Verify Extrinsics with the Polkadot-JS UI"}),"\n",(0,s.jsxs)(t.p,{children:["Visit the\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-in-the-Polkadot-JS-UI",children:(0,s.jsx)(t.strong,{children:"dedicated support page"})}),"\nand see ",(0,s.jsx)(t.a,{href:"https://youtu.be/bxMs-9fBtFk?t=163",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," tutorial to learn about how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nto you while signing for transactions."]}),"\n",(0,s.jsx)(t.h3,{id:"keep-alive-checks-with-the-polkadot-js-ui",children:"Keep-Alive Checks with the Polkadot-JS UI"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://youtu.be/mgPHVztHJWk",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," and\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168651-what-is-the-existential-deposit-",children:(0,s.jsx)(t.strong,{children:"this support page"})}),"\nto learn about keep-alive checks and existential deposit."]})}),"\n",(0,s.jsx)(t.p,{children:"In Polkadot there are two main ways to transfer funds from one account to another:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"transfer keep-alive"})," (default option) will not allow you to send an amount that would allow the\nsending account to be removed due to it going below the\n",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#existential-deposit",children:"existential deposit"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"transfer allow-death"})," will allow you to send tokens regardless of the consequence. If the balance\ndrops below the existential deposit your account will be reaped. It may be that you do not want to\nkeep the account alive (for example, because you are moving all of your funds to a different\naddress). To switch the keep-alive check off visit\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169248",children:"this support article"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.admonition,{type:"info",children:[(0,s.jsxs)(t.p,{children:["Attempting to send less than the\n",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#existential-deposit",children:"existential deposit"})," to an account with zero\nbalance will always fail, no matter if the keep-alive check is on or not."]}),(0,s.jsx)(t.p,{children:"Even if the transfer fails due to a keep-alive check, the transaction fee will be deducted from the\nsending account if you attempt to transfer."})]}),"\n",(0,s.jsx)(t.h3,{id:"vested-transfers-with-the-polkadot-js-ui",children:"Vested Transfers with the Polkadot-JS UI"}),"\n",(0,s.jsxs)(t.p,{children:["You can watch ",(0,s.jsx)(t.a,{href:"https://youtu.be/JVlwTQBwNGc",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," to understand how to do vested\ntransfers using the Polkadot-JS UI, including linear and cliff vesting. Note the tutorial uses the\nWestend Testnet, but the same applies to Polkadot and Kusama."]}),"\n",(0,s.jsx)(t.p,{children:"There are two ways that vesting schedules can be created."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["One way is through an extrinsic type available in the Vesting pallet, ",(0,s.jsx)(t.code,{children:"vested_transfer"}),". The\nvested transfer function allows anyone to create a vesting schedule with a transfer of funds, as\nlong as the account for which the vesting schedule will be created does not already have one and\nthe transfer moves at least ",(0,s.jsx)(t.code,{children:"MinVestedTransfer"})," funds, which is specified as a chain constant."]}),"\n",(0,s.jsx)(t.li,{children:"A second way is as part of the genesis configuration of the chain. In the case of Polkadot, the\nchain specification genesis script reads the state of the Claims contract that exists on the\nEthereum blockchain and creates vesting schedules in genesis for all the allocations registered as\nbeing vested."}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Vesting schedules have three parameters:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"locked"}),", the amount of tokens to be transferred in\n",(0,s.jsx)(t.a,{href:"../learn/learn-DOT#the-planck-unit",children:"Planck units"}),")"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"per block"}),", the number of tokens that are released per block"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"starting block"}),", the block number after which the vesting schedule starts"]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"The configuration of these three fields dictates the amount of funds that are originally locked, the\nslope of the unlock line and the block number for when the unlocking begins."}),"\n",(0,s.jsx)(t.h4,{id:"lazy-vesting",children:"Lazy Vesting"}),"\n",(0,s.jsxs)(t.p,{children:["Like ",(0,s.jsx)(t.a,{href:"/docs/learn-staking-advanced",children:"simple payouts"}),", vesting is ",(0,s.jsx)(t.em,{children:"lazy"}),", which means that someone must\nexplicitly call an extrinsic to update the lock that is placed on an account."]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["The ",(0,s.jsx)(t.code,{children:"vest"})," extrinsic will update the lock that is placed on the caller."]}),"\n",(0,s.jsxs)(t.li,{children:["The ",(0,s.jsx)(t.code,{children:"vest_other"}),' will update the lock that is placed on another "target" account\'s funds.']}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"These extrinsics are exposed from the Vesting pallet."}),"\n",(0,s.jsxs)(t.p,{children:["If you are using ",(0,s.jsx)(t.a,{href:"/docs/learn-polkadotjs",children:"the Polkadot-JS UI"}),", when there are tokens available to\nvest for an account, you can unlock tokens that have already been vested from the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts"})," page."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"unbond",src:n(52697).A+"",width:"241",height:"301"})}),"\n",(0,s.jsx)(t.h4,{id:"calculating-when-vesting-dot-will-be-available",children:"Calculating When Vesting DOT Will Be Available"}),"\n",(0,s.jsxs)(t.p,{children:["Generally, you should be able to see from the ",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts"}),' by\nlooking at your accounts and seeing when the vesting will finish. However, some DOT vest with\n"cliffs" - a single block where all the DOT are released, instead of vesting over time. In this\ncase, you will have to query the chain state directly to see when they will be available (since\ntechnically, the vesting has not yet started - all of the vesting will occur in a single block in\nthe future).']}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["Navigate to the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/chainstate",children:"Chain State"})," page on\nPolkadot-JS."]}),"\n",(0,s.jsxs)(t.li,{children:["Query chain state for ",(0,s.jsx)(t.code,{children:"vesting.vesting(ACCOUNT_ID)"})]}),"\n",(0,s.jsxs)(t.li,{children:["Note the ",(0,s.jsx)(t.code,{children:"startingBlock"})," where the unlock starts, and how much DOT is unlocked per block\n(",(0,s.jsx)(t.code,{children:"perBlock"}),")."]}),"\n",(0,s.jsxs)(t.li,{children:['You will have to calculate the result into \u201chuman time". To do this, remember that there are\napproximately 14\u2019400 blocks per day, and you can see what the latest block is shown on the\n',(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/explorer",children:"Explorer"})," page."]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"batch-transfers-with-the-polkadot-js-ui",children:"Batch Transfers with the Polkadot-JS UI"}),"\n",(0,s.jsx)(t.p,{children:"Batch transfers are balances transfers to multiple accounts executed by one account. In order to\nconstruct a batch transfer you need to:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Create a ",(0,s.jsx)(t.code,{children:"utility.batch(calls)"})," extrinsic using the\n",(0,s.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_utility/index.html",children:"utility pallet"}),", and"]}),"\n",(0,s.jsxs)(t.li,{children:["Within the batch call you can create multiple ",(0,s.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsics using the\n",(0,s.jsx)(t.a,{href:"https://paritytech.github.io/substrate/master/pallet_balances/index.html",children:"balances pallet"}),". You\ncan specify as many receivers as you desire."]}),"\n"]}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["You can watch ",(0,s.jsx)(t.a,{href:"https://youtu.be/uoUC2K8muvw",children:(0,s.jsx)(t.strong,{children:"this video tutorial"})})," to learn how to do batch\ntransfers. Note the tutorial uses the Westend Testnet, but the same applies to both Polkadot and\nKusama."]})}),"\n",(0,s.jsx)(t.h3,{id:"teleporting-tokens-using-the-polkadot-js-ui",children:"Teleporting Tokens using the Polkadot-JS UI"}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://youtu.be/3tE9ouub5Tg",children:"this video tutorial"})," and\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181119-how-to-teleport-dot-or-ksm-between-statemint-or-statemine",children:"this additional support article"}),"\nto learn more about how to teleport tokens."]}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsx)(t.p,{children:'If you do not see "Accounts > Teleport" in the Polkadot-JS UI, the source chain that you have\nselected does not support teleportation yet.'})}),"\n",(0,s.jsx)(t.h2,{id:"calculating-fees-with-polkadot-js",children:"Calculating Fees with Polkadot-JS"}),"\n",(0,s.jsx)(t.p,{children:"To calculate fees you can go to Developer > Runtime Calls and select the following extrinsics:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"transactionPaymentApi.queryInfo"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"transactionPaymentApi.queryFeeDetails"})}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["and specify the ",(0,s.jsx)(t.code,{children:"0x"})," prefixed hex call data and its length."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Fee details",src:n(76379).A+"",width:"1161",height:"668"})}),"\n",(0,s.jsxs)(t.p,{children:["The sum of ",(0,s.jsx)(t.code,{children:"baseFee"}),", ",(0,s.jsx)(t.code,{children:"lenFee"})," and ",(0,s.jsx)(t.code,{children:"adjustedWeightFee"})," will yield the ",(0,s.jsx)(t.code,{children:"partialFee"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["One useful utility for estimating transaction fees programmatically is the via the\n",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/@polkadot/api",children:"@polkadot/api"}),". Check out the following script that\nlogs some relevant fee information:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-js",children:"// Estimate the fees as RuntimeDispatchInfo using the signer\nconst info = await api.tx.balances.transfer(recipient, 123).paymentInfo(sender);\n\n// Log relevant info, partialFee is Balance, estimated for current\nconsole.log(`\n class=${info.class.toString()},\n weight=${info.weight.toString()},\n partialFee=${info.partialFee.toHuman()}\n`);\n"})}),"\n",(0,s.jsxs)(t.p,{children:["For additional information on interacting with the API, checkout\n",(0,s.jsx)(t.a,{href:"/docs/polkadotjs",children:"Polkadot-JS"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"existing-reference-error",children:"Existing Reference Error"}),"\n",(0,s.jsxs)(t.p,{children:["If you are trying to reap an account and you receive an error similar to\n",(0,s.jsx)(t.code,{children:'"There is an existing reference count on the sender account. As such the account cannot be reaped from the state"'}),",\nthen you have existing references to this account that must be first removed before it can be\nreaped. References may still exist from:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Bonded tokens (most likely)"}),"\n",(0,s.jsx)(t.li,{children:"Unpurged session keys (if you were previously a validator)"}),"\n",(0,s.jsx)(t.li,{children:"Token locks"}),"\n",(0,s.jsx)(t.li,{children:"Existing recovery info"}),"\n",(0,s.jsx)(t.li,{children:"Existing assets"}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"bonded-tokens",children:"Bonded Tokens"}),"\n",(0,s.jsxs)(t.p,{children:["If you have tokens that are bonded, you will need to unbond them before you can reap your account.\nFollow the instructions at ",(0,s.jsx)(t.a,{href:"/docs/learn-guides-nominator#bond-your-tokens",children:"Unbonding and Rebonding"}),"\nto check if you have bonded tokens, stop nominating (if necessary) and unbond your tokens."]}),"\n",(0,s.jsx)(t.h3,{id:"checking-for-locks",children:"Checking for Locks"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://youtu.be/LHgY7ds_bZ0",children:"this video tutorial"})," and\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169437-why-can-t-i-transfer-tokens-",children:"this support page"}),"\nto learn how to check for locks and remove them."]})}),"\n",(0,s.jsxs)(t.p,{children:["You can also check for locks by querying ",(0,s.jsx)(t.code,{children:"system.account(AccountId)"})," in\n",(0,s.jsxs)(t.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:[(0,s.jsx)(t.code,{children:"Chain state"})," tab under the ",(0,s.jsx)(t.code,{children:"Developer"})," drop-down menu in the Polkadot-JS UI"]}),'.\nSelect your account, then click the "+" button next to the dropdowns, and check the relative ',(0,s.jsx)(t.code,{children:"data"}),"\nJSON object. If you see a non-zero value for anything other than ",(0,s.jsx)(t.code,{children:"free"}),", you have locks on your\naccount that need to get resolved."]}),"\n",(0,s.jsx)(t.h3,{id:"purging-session-keys",children:"Purging Session Keys"}),"\n",(0,s.jsxs)(t.p,{children:["If you used this account to set up a validator and you did not purge your keys before unbonding your\ntokens, you need to purge your keys. You can do this by seeing the\n",(0,s.jsx)(t.a,{href:"/docs/maintain-guides-how-to-stop-validating",children:"How to Stop Validating"})," page. This can also\nbe checked by checking ",(0,s.jsx)(t.code,{children:"session.nextKeys"})," in the chain state for an existing key."]}),"\n",(0,s.jsx)(t.h3,{id:"existing-recovery-info",children:"Existing Recovery Info"}),"\n",(0,s.jsxs)(t.p,{children:["Currently, Polkadot does not use the\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/recovery/",children:"Recovery Pallet"}),",\nso this is probably not the reason for your tokens having existing references."]}),"\n",(0,s.jsxs)(t.p,{children:["On Kusama, you can check if recovery has been set up by checking the\n",(0,s.jsx)(t.code,{children:"recovery.recoverable(AccountId)"})," chain state. This can be found under ",(0,s.jsx)(t.code,{children:"Developer > Chain state"})," in\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/",children:"PolkadotJS Apps"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"existing-non-native-assets",children:"Existing Non-Native Assets"}),"\n",(0,s.jsxs)(t.p,{children:["Currently, Polkadot does not use the\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/assets",children:"Assets Pallet"}),", so\nthis is probably not the reason for your tokens having existing references."]})]})}function u(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>o});var s=n(96540),a=n(74848);const o=function(e){var t,n=e.message,o=(0,s.useState)(!0),i=o[0],r=o[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},19365:(e,t,n)=>{n.d(t,{A:()=>i});n(96540);var s=n(34164);const a={tabItem:"tabItem_Ymn6"};var o=n(74848);function i(e){var t=e.children,n=e.hidden,i=e.className;return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(a.tabItem,i),hidden:n,children:t})}},11470:(e,t,n)=>{n.d(t,{A:()=>y});var s=n(96540),a=n(34164),o=n(23104),i=n(56347),r=n(205),l=n(57485),c=n(31682),d=n(75376);function h(e){var t,n;return null!=(t=null==(n=s.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,s.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function u(e){var t=e.values,n=e.children;return(0,s.useMemo)((function(){var e=null!=t?t:function(e){return h(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,c.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function f(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId,o=(0,i.W6)(),r=function(e){var t=e.queryString,n=void 0!==t&&t,s=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=s?s:null}({queryString:n,groupId:a});return[(0,l.aZ)(r),(0,s.useCallback)((function(e){if(r){var t=new URLSearchParams(o.location.search);t.set(r,e),o.replace(Object.assign({},o.location,{search:t.toString()}))}}),[r,o])]}function g(e){var t,n,a,o,i=e.defaultValue,l=e.queryString,c=void 0!==l&&l,h=e.groupId,g=u(e),x=(0,s.useState)((function(){return function(e){var t,n=e.defaultValue,s=e.tabValues;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:s}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+s.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var a=null!=(t=s.find((function(e){return e.default})))?t:s[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:i,tabValues:g})})),v=x[0],k=x[1],j=f({queryString:c,groupId:h}),b=j[0],m=j[1],y=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:h}.groupId),n=(0,d.Dv)(t),a=n[0],o=n[1],[a,(0,s.useCallback)((function(e){t&&o.set(e)}),[t,o])]),w=y[0],S=y[1],T=function(){var e=null!=b?b:w;return p({value:e,tabValues:g})?e:null}();return(0,r.A)((function(){T&&k(T)}),[T]),{selectedValue:v,selectValue:(0,s.useCallback)((function(e){if(!p({value:e,tabValues:g}))throw new Error("Can't select invalid tab value="+e);k(e),m(e),S(e)}),[m,S,g]),tabValues:g}}var x=n(92303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var k=n(74848);function j(e){var t=e.className,n=e.block,s=e.selectedValue,i=e.selectValue,r=e.tabValues,l=[],c=(0,o.a_)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,n=l.indexOf(t),a=r[n].value;a!==s&&(c(t),i(a))},h=function(e){var t,n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var s,a=l.indexOf(e.currentTarget)+1;n=null!=(s=l[a])?s:l[0];break;case"ArrowLeft":var o,i=l.indexOf(e.currentTarget)-1;n=null!=(o=l[i])?o:l[l.length-1]}null==(t=n)||t.focus()};return(0,k.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":n},t),children:r.map((function(e){var t=e.value,n=e.label,o=e.attributes;return(0,k.jsx)("li",Object.assign({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,ref:function(e){return l.push(e)},onKeyDown:h,onClick:d},o,{className:(0,a.A)("tabs__item",v.tabItem,null==o?void 0:o.className,{"tabs__item--active":s===t}),children:null!=n?n:t}),t)}))})}function b(e){var t=e.lazy,n=e.children,o=e.selectedValue,i=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var r=i.find((function(e){return e.props.value===o}));return r?(0,s.cloneElement)(r,{className:(0,a.A)("margin-top--md",r.props.className)}):null}return(0,k.jsx)("div",{className:"margin-top--md",children:i.map((function(e,t){return(0,s.cloneElement)(e,{key:t,hidden:e.props.value!==o})}))})}function m(e){var t=g(e);return(0,k.jsxs)("div",{className:(0,a.A)("tabs-container",v.tabList),children:[(0,k.jsx)(j,Object.assign({},t,e)),(0,k.jsx)(b,Object.assign({},t,e))]})}function y(e){var t=(0,x.A)();return(0,k.jsx)(m,Object.assign({},e,{children:h(e.children)}),String(t))}},76379:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/fee-details-e61cb9c6939a0364802da2b98129d80d.png"},52697:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/unlock-vesting-deefc0d6d9a08a91af1490a82e01069b.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var s=n(96540);const a={},o=s.createContext(a);function i(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/943aba4c.615dd79e.js b/assets/js/943aba4c.615dd79e.js deleted file mode 100644 index c2d198f2e7d8..000000000000 --- a/assets/js/943aba4c.615dd79e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1112],{83686:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var o=n(74848),a=n(28453),s=n(67141);const i={id:"learn-guides-claims",title:"Polkadot-JS Guides about Claims",sidebar_label:"Claim Guides",description:"Step-by-step guide on how to claim your tokens.",keywords:["claims","tokens","kusama","polkadot"],slug:"../learn-guides-claims"},l=void 0,c={id:"learn/learn-guides-claims",title:"Polkadot-JS Guides about Claims",description:"Step-by-step guide on how to claim your tokens.",source:"@site/../docs/learn/learn-guides-claims.md",sourceDirName:"learn",slug:"/learn-guides-claims",permalink:"/docs/learn-guides-claims",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-claims.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-guides-claims",title:"Polkadot-JS Guides about Claims",sidebar_label:"Claim Guides",description:"Step-by-step guide on how to claim your tokens.",keywords:["claims","tokens","kusama","polkadot"],slug:"../learn-guides-claims"},sidebar:"docs",previous:{title:"DOT <> KSM Bridge",permalink:"/docs/learn-guides-dot-ksm-bridge"},next:{title:"Architecture",permalink:"/docs/learn-architecture"}},r={},d=[{value:"Generate an Account",id:"generate-an-account",level:2},{value:"Claiming Tokens",id:"claiming-tokens",level:2},{value:"Select Accounts",id:"select-accounts",level:3},{value:"Select Account on Ethereum",id:"select-account-on-ethereum",level:4},{value:"Sign Message on Ethereum & Claim",id:"sign-message-on-ethereum--claim",level:3},{value:"Verifying your Claim",id:"verifying-your-claim",level:3}];function u(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",img:"img",p:"p",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsx)(s.A,{message:"Screenshots on this page are based on Polkadot, but note that the same process applies to Kusama."}),"\n",(0,o.jsx)(t.p,{children:"If you participated in a previous DOT sale before 2020 and received your DOT allocation indicator\ntokens, you can now claim your DOT (and a proportional amount of KSM on the Kusama network). The\nclaim process connects the address where your DOT indicators have been stored on Ethereum with a\nnative Polkadot address and, if your ETH address is eligible, will pay the tokens to the Polkadot\naddress."}),"\n",(0,o.jsxs)(t.p,{children:["To do this, you must sign a message on Ethereum containing the address of your Polkadot account. You\ncan do this by using the Polkadot-JS UI ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/claims",children:"Claims app"}),". Ensure\nthat you are connected to the Polkadot network (displayed in the upper-left-hand corner of the\nscreen)."]}),"\n",(0,o.jsx)(t.admonition,{title:"Third-party claim processes",type:"warning",children:(0,o.jsx)(t.p,{children:"Claiming using a third-party process can lead to losing your allocation; therefore, we cannot\nrecommend using any third-party apps. Manually specifying your transaction data, as specified in our\nclaims process below, is the only way to ensure you will receive your allocation."})}),"\n",(0,o.jsx)(t.h2,{id:"generate-an-account",children:"Generate an Account"}),"\n",(0,o.jsxs)(t.p,{children:["You will need to generate an account on the relay chain to claim DOT (or KSM on Kusama). See the\n",(0,o.jsx)(t.a,{href:"/docs/wallets-and-extensions",children:"available wallets and extensions"})," for more information about\nwallets and browser extensions you can use to create an account. In terms of hardware wallet\nsupport, you can use the ",(0,o.jsx)(t.a,{href:"/docs/ledger",children:"Ledger"})," devices or\n",(0,o.jsx)(t.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"claiming-tokens",children:"Claiming Tokens"}),"\n",(0,o.jsxs)(t.p,{children:["The Polkadot-JS ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/claims",children:"Claims app"})," will guide you through the\nprocess of claiming the tokens."]}),"\n",(0,o.jsx)(t.h3,{id:"select-accounts",children:"Select Accounts"}),"\n",(0,o.jsx)(t.p,{children:'Select the account you would like to claim the tokens into and click the "Continue" button to\nproceed. Your screen should look something like this:'}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"claim select dot account",src:n(53825).A+"",width:"1102",height:"301"})}),"\n",(0,o.jsx)(t.h4,{id:"select-account-on-ethereum",children:"Select Account on Ethereum"}),"\n",(0,o.jsx)(t.p,{children:'Paste the Ethereum address with the DOT allocation indicator tokens and click the "Continue" button\nto proceed.'}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"claim select eth account",src:n(21765).A+"",width:"1092",height:"453"})}),"\n",(0,o.jsx)(t.h3,{id:"sign-message-on-ethereum--claim",children:"Sign Message on Ethereum & Claim"}),"\n",(0,o.jsxs)(t.p,{children:['The hex-encoded string that follows the sentence "Pay DOT to the Polkadot account:" is the\nhex-encoded public key of your Polkadot account, minus the ',(0,o.jsx)(t.code,{children:"0x"})," prefix."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"claim copy msg",src:n(60894).A+"",width:"1107",height:"888"})}),"\n",(0,o.jsxs)(t.p,{children:["Go to\n",(0,o.jsx)(t.a,{href:"https://app.mycrypto.com/sign-message",children:'the "Sign & Verify Message" tab on the MyCrypto web application'}),'.\nMyCrypto is good to use if you have stored the key to the Ethereum account holding your DOT\nindicator tokens on a hardware device like a Ledger Nano. It also supports raw private keys,\nmnemonics, and the Polkadot Vault. After unlocking your Ethereum wallet, copy and paste the\noutputted sentence on the Polkadot-JS UI into the message box on the MyCrypto app. When you click\n"Sign Message" you will get a JSON output signature as shown below:']}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"claim get signature",src:n(55860).A+"",width:"847",height:"673"})}),"\n",(0,o.jsx)(t.p,{children:'Copy and paste the JSON output of the signed message from MyCrypto into the input box on the\nPolkadot-JS UI and click "Confirm Claim."'}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"claim paste signature",src:n(22145).A+"",width:"1933",height:"823"})}),"\n",(0,o.jsxs)(t.p,{children:["At this point, if you are eligible, you will see a success message if everything went right and your\ntokens will now be in the account that you claimed to. Congratulations! You can now participate in\naspects of the network such as ",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov",children:"governance"})," and\n",(0,o.jsx)(t.a,{href:"/docs/learn-staking",children:"staking"}),"."]}),"\n",(0,o.jsx)(t.h3,{id:"verifying-your-claim",children:"Verifying your Claim"}),"\n",(0,o.jsx)(t.p,{children:"After you make an on-chain claim, your Your account balance should be updated immediately."})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(96540),a=n(74848);const s=function(e){var t,n=e.message,s=(0,o.useState)(!0),i=s[0],l=s[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},60894:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-copy-msg-9202762828ee9a331ef58dd563e555b5.png"},55860:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-get-signature-654200548d6f5f1a374d9ccc9a164c67.png"},22145:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-paste-signature-2f64e7c24774df3fede97597551cc9c1.png"},53825:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-select-dot-account-a31d56bcfdb38d2783dd347b8e902e68.png"},21765:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-select-eth-account-d1e003f87a8b53786a325ec5339a626d.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>l});var o=n(96540);const a={},s=o.createContext(a);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/943aba4c.bd51f365.js b/assets/js/943aba4c.bd51f365.js new file mode 100644 index 000000000000..65178ec3b72a --- /dev/null +++ b/assets/js/943aba4c.bd51f365.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1112],{83686:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var o=n(74848),a=n(28453),s=n(67141);const i={id:"learn-guides-claims",title:"Polkadot-JS Guides about Claims",sidebar_label:"Claim Guides",description:"Step-by-step guide on how to claim your tokens.",keywords:["claims","tokens","kusama","polkadot"],slug:"../learn-guides-claims"},c=void 0,l={id:"learn/learn-guides-claims",title:"Polkadot-JS Guides about Claims",description:"Step-by-step guide on how to claim your tokens.",source:"@site/../docs/learn/learn-guides-claims.md",sourceDirName:"learn",slug:"/learn-guides-claims",permalink:"/docs/learn-guides-claims",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-claims.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-claims",title:"Polkadot-JS Guides about Claims",sidebar_label:"Claim Guides",description:"Step-by-step guide on how to claim your tokens.",keywords:["claims","tokens","kusama","polkadot"],slug:"../learn-guides-claims"},sidebar:"docs",previous:{title:"DOT <> KSM Bridge",permalink:"/docs/learn-guides-dot-ksm-bridge"},next:{title:"Architecture",permalink:"/docs/learn-architecture"}},r={},d=[{value:"Generate an Account",id:"generate-an-account",level:2},{value:"Claiming Tokens",id:"claiming-tokens",level:2},{value:"Select Accounts",id:"select-accounts",level:3},{value:"Select Account on Ethereum",id:"select-account-on-ethereum",level:4},{value:"Sign Message on Ethereum & Claim",id:"sign-message-on-ethereum--claim",level:3},{value:"Verifying your Claim",id:"verifying-your-claim",level:3}];function u(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",img:"img",p:"p",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsx)(s.A,{message:"Screenshots on this page are based on Polkadot, but note that the same process applies to Kusama."}),"\n",(0,o.jsx)(t.p,{children:"If you participated in a previous DOT sale before 2020 and received your DOT allocation indicator\ntokens, you can now claim your DOT (and a proportional amount of KSM on the Kusama network). The\nclaim process connects the address where your DOT indicators have been stored on Ethereum with a\nnative Polkadot address and, if your ETH address is eligible, will pay the tokens to the Polkadot\naddress."}),"\n",(0,o.jsxs)(t.p,{children:["To do this, you must sign a message on Ethereum containing the address of your Polkadot account. You\ncan do this by using the Polkadot-JS UI ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/claims",children:"Claims app"}),". Ensure\nthat you are connected to the Polkadot network (displayed in the upper-left-hand corner of the\nscreen)."]}),"\n",(0,o.jsx)(t.admonition,{title:"Third-party claim processes",type:"warning",children:(0,o.jsx)(t.p,{children:"Claiming using a third-party process can lead to losing your allocation; therefore, we cannot\nrecommend using any third-party apps. Manually specifying your transaction data, as specified in our\nclaims process below, is the only way to ensure you will receive your allocation."})}),"\n",(0,o.jsx)(t.h2,{id:"generate-an-account",children:"Generate an Account"}),"\n",(0,o.jsxs)(t.p,{children:["You will need to generate an account on the relay chain to claim DOT (or KSM on Kusama). See the\n",(0,o.jsx)(t.a,{href:"/docs/wallets-and-extensions",children:"available wallets and extensions"})," for more information about\nwallets and browser extensions you can use to create an account. In terms of hardware wallet\nsupport, you can use the ",(0,o.jsx)(t.a,{href:"/docs/ledger",children:"Ledger"})," devices or\n",(0,o.jsx)(t.a,{href:"/docs/polkadot-vault",children:"Polkadot Vault"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"claiming-tokens",children:"Claiming Tokens"}),"\n",(0,o.jsxs)(t.p,{children:["The Polkadot-JS ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/claims",children:"Claims app"})," will guide you through the\nprocess of claiming the tokens."]}),"\n",(0,o.jsx)(t.h3,{id:"select-accounts",children:"Select Accounts"}),"\n",(0,o.jsx)(t.p,{children:'Select the account you would like to claim the tokens into and click the "Continue" button to\nproceed. Your screen should look something like this:'}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"claim select dot account",src:n(53825).A+"",width:"1102",height:"301"})}),"\n",(0,o.jsx)(t.h4,{id:"select-account-on-ethereum",children:"Select Account on Ethereum"}),"\n",(0,o.jsx)(t.p,{children:'Paste the Ethereum address with the DOT allocation indicator tokens and click the "Continue" button\nto proceed.'}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"claim select eth account",src:n(21765).A+"",width:"1092",height:"453"})}),"\n",(0,o.jsx)(t.h3,{id:"sign-message-on-ethereum--claim",children:"Sign Message on Ethereum & Claim"}),"\n",(0,o.jsxs)(t.p,{children:['The hex-encoded string that follows the sentence "Pay DOT to the Polkadot account:" is the\nhex-encoded public key of your Polkadot account, minus the ',(0,o.jsx)(t.code,{children:"0x"})," prefix."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"claim copy msg",src:n(60894).A+"",width:"1107",height:"888"})}),"\n",(0,o.jsxs)(t.p,{children:["Go to\n",(0,o.jsx)(t.a,{href:"https://app.mycrypto.com/sign-message",children:'the "Sign & Verify Message" tab on the MyCrypto web application'}),'.\nMyCrypto is good to use if you have stored the key to the Ethereum account holding your DOT\nindicator tokens on a hardware device like a Ledger Nano. It also supports raw private keys,\nmnemonics, and the Polkadot Vault. After unlocking your Ethereum wallet, copy and paste the\noutputted sentence on the Polkadot-JS UI into the message box on the MyCrypto app. When you click\n"Sign Message" you will get a JSON output signature as shown below:']}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"claim get signature",src:n(55860).A+"",width:"847",height:"673"})}),"\n",(0,o.jsx)(t.p,{children:'Copy and paste the JSON output of the signed message from MyCrypto into the input box on the\nPolkadot-JS UI and click "Confirm Claim."'}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"claim paste signature",src:n(22145).A+"",width:"1933",height:"823"})}),"\n",(0,o.jsxs)(t.p,{children:["At this point, if you are eligible, you will see a success message if everything went right and your\ntokens will now be in the account that you claimed to. Congratulations! You can now participate in\naspects of the network such as ",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov",children:"governance"})," and\n",(0,o.jsx)(t.a,{href:"/docs/learn-staking",children:"staking"}),"."]}),"\n",(0,o.jsx)(t.h3,{id:"verifying-your-claim",children:"Verifying your Claim"}),"\n",(0,o.jsx)(t.p,{children:"After you make an on-chain claim, your Your account balance should be updated immediately."})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(96540),a=n(74848);const s=function(e){var t,n=e.message,s=(0,o.useState)(!0),i=s[0],c=s[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){c(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},60894:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-copy-msg-9202762828ee9a331ef58dd563e555b5.png"},55860:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-get-signature-654200548d6f5f1a374d9ccc9a164c67.png"},22145:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-paste-signature-2f64e7c24774df3fede97597551cc9c1.png"},53825:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-select-dot-account-a31d56bcfdb38d2783dd347b8e902e68.png"},21765:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/claim-select-eth-account-d1e003f87a8b53786a325ec5339a626d.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>c});var o=n(96540);const a={},s=o.createContext(a);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9662c81e.5e211e69.js b/assets/js/9662c81e.5e211e69.js new file mode 100644 index 000000000000..dcd22538ea44 --- /dev/null +++ b/assets/js/9662c81e.5e211e69.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7809],{5771:(n,e,o)=>{o.r(e),o.d(e,{assets:()=>r,contentTitle:()=>s,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>l});var i=o(74848),t=o(28453),a=o(67141);const c={id:"maintain-guides-how-to-join-council",title:"Join the Council",sidebar_label:"Join the Council",description:"Steps on how to join the official on-chain council.",keywords:["council","how to join council","governance","candidate"],slug:"../maintain-guides-how-to-join-council"},s=void 0,d={id:"maintain/archive/maintain-guides-how-to-join-council",title:"Join the Council",description:"Steps on how to join the official on-chain council.",source:"@site/../docs/maintain/archive/maintain-guides-how-to-join-council.md",sourceDirName:"maintain/archive",slug:"/maintain/maintain-guides-how-to-join-council",permalink:"/docs/maintain/maintain-guides-how-to-join-council",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/archive/maintain-guides-how-to-join-council.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"maintain-guides-how-to-join-council",title:"Join the Council",sidebar_label:"Join the Council",description:"Steps on how to join the official on-chain council.",keywords:["council","how to join council","governance","candidate"],slug:"../maintain-guides-how-to-join-council"},sidebar:"docs",previous:{title:"Participate in Democracy",permalink:"/docs/maintain/maintain-guides-democracy"},next:{title:"Voting for Councillors",permalink:"/docs/maintain/maintain-guides-how-to-vote-councillor"}},r={},l=[{value:"Submit Candidacy",id:"submit-candidacy",level:2},{value:"Voting on Candidates",id:"voting-on-candidates",level:2},{value:"Winning",id:"winning",level:2}];function u(n){const e={a:"a",admonition:"admonition",h2:"h2",img:"img",p:"p",...(0,t.R)(),...n.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../learn-polkadot-opengov)."}),"\n",(0,i.jsxs)(e.p,{children:["The council is an elected body of on-chain accounts that are intended to represent the passive\nstakeholders of Polkadot and/or Kusama. The council has two major tasks in governance: proposing\nreferenda and vetoing dangerous or malicious referenda. For more information on the council, see the\n",(0,i.jsx)(e.a,{href:"/docs/learn/learn-governance#council",children:"governance page"}),". This guide will walk you through\nentering your candidacy to the council."]}),"\n",(0,i.jsx)(e.h2,{id:"submit-candidacy",children:"Submit Candidacy"}),"\n",(0,i.jsx)(e.p,{children:"Submitting your candidacy for the council requires a small bond of DOT / KSM. Unless your candidacy\nwins, the bond will be forfeited. You can receive your bond back if you manually renounce your\ncandidacy before losing. Runners-up are selected after every round and are reserved members in case\none of the winners gets forcefully removed."}),"\n",(0,i.jsx)(e.admonition,{type:"note",children:(0,i.jsx)(e.p,{children:"Currently the bond for submitting a council candidacy on Polkadot is 100 DOT, and 0.0033 KSM on\nKusama."})}),"\n",(0,i.jsx)(e.p,{children:"It is a good idea to announce your council intention before submitting your candidacy so that your\nsupporters will know when they can start to vote for you. You can also vote for yourself in case no\none else does."}),"\n",(0,i.jsxs)(e.p,{children:["Go to ",(0,i.jsx)(e.a,{href:"https://polkadot.js.org/apps",children:"Polkadot Apps Dashboard"}),' and navigate to the "Council" tab.\nClick the button on the right that says "Submit Candidacy."']}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"submit candidacy button",src:o(96113).A+"",width:"580",height:"120"})}),"\n",(0,i.jsx)(e.p,{children:'After making the transaction, you will see your account appear underneath the row "Candidates."'}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"candidates list",src:o(97214).A+"",width:"2880",height:"298"})}),"\n",(0,i.jsx)(e.p,{children:"It is a good idea now to lead by example and give yourself a vote."}),"\n",(0,i.jsx)(e.h2,{id:"voting-on-candidates",children:"Voting on Candidates"}),"\n",(0,i.jsx)(e.p,{children:'Next to the button to submit candidacy is another button titled "Vote." You will click this button\nto make a vote for yourself (optional).'}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"voting button on UI",src:o(35349).A+"",width:"556",height:"120"})}),"\n",(0,i.jsxs)(e.p,{children:["The council uses ",(0,i.jsx)(e.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n"}),' approval voting, which is also used in\nthe validator elections. This means that you can choose up to 16 distinct candidates to vote for and\nyour stake will equalize between them. For this guide, choose to approve your own candidacy by\nclicking on the switch next to your account and changing it to say "Aye."']}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"voting pop up on UI",src:o(39365).A+"",width:"2186",height:"1104"})}),"\n",(0,i.jsx)(e.h2,{id:"winning",children:"Winning"}),"\n",(0,i.jsx)(e.p,{children:'If you are one of the lucky ones to win a council election you will see your account move underneath\nthe row "Members".'}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"council members list",src:o(5483).A+"",width:"2880",height:"1346"})}),"\n",(0,i.jsxs)(e.p,{children:["Now you are able to participate on the council by making motions or voting proposals. To join in on\nthe active discussions, join the\n",(0,i.jsx)(e.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction channel"}),"."]})]})}function h(n={}){const{wrapper:e}={...(0,t.R)(),...n.components};return e?(0,i.jsx)(e,{...n,children:(0,i.jsx)(u,{...n})}):u(n)}},67141:(n,e,o)=>{o.d(e,{A:()=>a});var i=o(96540),t=o(74848);const a=function(n){var e,o=n.message,a=(0,i.useState)(!0),c=a[0],s=a[1];return(0,t.jsx)(t.Fragment,{children:c&&(0,t.jsxs)("div",{className:"message-box",children:[(0,t.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,t.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=o,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},97214:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_candidates-bc420d7637b02bd43169dd6bc44a9bd9.png"},5483:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_council_members-c731a3fa3e5eb821427126149431dbfe.png"},96113:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_submit_candidancy-04eabb0aa998c350427386dcff208d1c.png"},35349:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_vote_button-9f5daf5f27fda6df219d0f959e7632b4.png"},39365:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_voting-cc5698e8e8f5de77644d3a7cb316a2ea.png"},28453:(n,e,o)=>{o.d(e,{R:()=>c,x:()=>s});var i=o(96540);const t={},a=i.createContext(t);function c(n){const e=i.useContext(a);return i.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function s(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(t):n.components||t:c(n.components),i.createElement(a.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/9662c81e.a4ac6511.js b/assets/js/9662c81e.a4ac6511.js deleted file mode 100644 index 338c827a8a99..000000000000 --- a/assets/js/9662c81e.a4ac6511.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7809],{5771:(n,e,o)=>{o.r(e),o.d(e,{assets:()=>r,contentTitle:()=>s,default:()=>h,frontMatter:()=>c,metadata:()=>d,toc:()=>l});var i=o(74848),t=o(28453),a=o(67141);const c={id:"maintain-guides-how-to-join-council",title:"Join the Council",sidebar_label:"Join the Council",description:"Steps on how to join the official on-chain council.",keywords:["council","how to join council","governance","candidate"],slug:"../maintain-guides-how-to-join-council"},s=void 0,d={id:"maintain/archive/maintain-guides-how-to-join-council",title:"Join the Council",description:"Steps on how to join the official on-chain council.",source:"@site/../docs/maintain/archive/maintain-guides-how-to-join-council.md",sourceDirName:"maintain/archive",slug:"/maintain/maintain-guides-how-to-join-council",permalink:"/docs/maintain/maintain-guides-how-to-join-council",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/archive/maintain-guides-how-to-join-council.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1714545713e3,frontMatter:{id:"maintain-guides-how-to-join-council",title:"Join the Council",sidebar_label:"Join the Council",description:"Steps on how to join the official on-chain council.",keywords:["council","how to join council","governance","candidate"],slug:"../maintain-guides-how-to-join-council"},sidebar:"docs",previous:{title:"Participate in Democracy",permalink:"/docs/maintain/maintain-guides-democracy"},next:{title:"Voting for Councillors",permalink:"/docs/maintain/maintain-guides-how-to-vote-councillor"}},r={},l=[{value:"Submit Candidacy",id:"submit-candidacy",level:2},{value:"Voting on Candidates",id:"voting-on-candidates",level:2},{value:"Winning",id:"winning",level:2}];function u(n){const e={a:"a",admonition:"admonition",h2:"h2",img:"img",p:"p",...(0,t.R)(),...n.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../../learn/learn-polkadot-opengov.md)."}),"\n",(0,i.jsxs)(e.p,{children:["The council is an elected body of on-chain accounts that are intended to represent the passive\nstakeholders of Polkadot and/or Kusama. The council has two major tasks in governance: proposing\nreferenda and vetoing dangerous or malicious referenda. For more information on the council, see the\n",(0,i.jsx)(e.a,{href:"/docs/learn/learn-governance#council",children:"governance page"}),". This guide will walk you through\nentering your candidacy to the council."]}),"\n",(0,i.jsx)(e.h2,{id:"submit-candidacy",children:"Submit Candidacy"}),"\n",(0,i.jsx)(e.p,{children:"Submitting your candidacy for the council requires a small bond of DOT / KSM. Unless your candidacy\nwins, the bond will be forfeited. You can receive your bond back if you manually renounce your\ncandidacy before losing. Runners-up are selected after every round and are reserved members in case\none of the winners gets forcefully removed."}),"\n",(0,i.jsx)(e.admonition,{type:"note",children:(0,i.jsx)(e.p,{children:"Currently the bond for submitting a council candidacy on Polkadot is 100 DOT, and 0.0033 KSM on\nKusama."})}),"\n",(0,i.jsx)(e.p,{children:"It is a good idea to announce your council intention before submitting your candidacy so that your\nsupporters will know when they can start to vote for you. You can also vote for yourself in case no\none else does."}),"\n",(0,i.jsxs)(e.p,{children:["Go to ",(0,i.jsx)(e.a,{href:"https://polkadot.js.org/apps",children:"Polkadot Apps Dashboard"}),' and navigate to the "Council" tab.\nClick the button on the right that says "Submit Candidacy."']}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"submit candidacy button",src:o(96113).A+"",width:"580",height:"120"})}),"\n",(0,i.jsx)(e.p,{children:'After making the transaction, you will see your account appear underneath the row "Candidates."'}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"candidates list",src:o(97214).A+"",width:"2880",height:"298"})}),"\n",(0,i.jsx)(e.p,{children:"It is a good idea now to lead by example and give yourself a vote."}),"\n",(0,i.jsx)(e.h2,{id:"voting-on-candidates",children:"Voting on Candidates"}),"\n",(0,i.jsx)(e.p,{children:'Next to the button to submit candidacy is another button titled "Vote." You will click this button\nto make a vote for yourself (optional).'}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"voting button on UI",src:o(35349).A+"",width:"556",height:"120"})}),"\n",(0,i.jsxs)(e.p,{children:["The council uses ",(0,i.jsx)(e.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n"}),' approval voting, which is also used in\nthe validator elections. This means that you can choose up to 16 distinct candidates to vote for and\nyour stake will equalize between them. For this guide, choose to approve your own candidacy by\nclicking on the switch next to your account and changing it to say "Aye."']}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"voting pop up on UI",src:o(39365).A+"",width:"2186",height:"1104"})}),"\n",(0,i.jsx)(e.h2,{id:"winning",children:"Winning"}),"\n",(0,i.jsx)(e.p,{children:'If you are one of the lucky ones to win a council election you will see your account move underneath\nthe row "Members".'}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:"council members list",src:o(5483).A+"",width:"2880",height:"1346"})}),"\n",(0,i.jsxs)(e.p,{children:["Now you are able to participate on the council by making motions or voting proposals. To join in on\nthe active discussions, join the\n",(0,i.jsx)(e.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction channel"}),"."]})]})}function h(n={}){const{wrapper:e}={...(0,t.R)(),...n.components};return e?(0,i.jsx)(e,{...n,children:(0,i.jsx)(u,{...n})}):u(n)}},67141:(n,e,o)=>{o.d(e,{A:()=>a});var i=o(96540),t=o(74848);const a=function(n){var e,o=n.message,a=(0,i.useState)(!0),c=a[0],s=a[1];return(0,t.jsx)(t.Fragment,{children:c&&(0,t.jsxs)("div",{className:"message-box",children:[(0,t.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,t.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=o,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},97214:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_candidates-bc420d7637b02bd43169dd6bc44a9bd9.png"},5483:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_council_members-c731a3fa3e5eb821427126149431dbfe.png"},96113:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_submit_candidancy-04eabb0aa998c350427386dcff208d1c.png"},35349:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_vote_button-9f5daf5f27fda6df219d0f959e7632b4.png"},39365:(n,e,o)=>{o.d(e,{A:()=>i});const i=o.p+"assets/images/polkadotjs_voting-cc5698e8e8f5de77644d3a7cb316a2ea.png"},28453:(n,e,o)=>{o.d(e,{R:()=>c,x:()=>s});var i=o(96540);const t={},a=i.createContext(t);function c(n){const e=i.useContext(a);return i.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function s(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(t):n.components||t:c(n.components),i.createElement(a.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/967fa6d4.32b03252.js b/assets/js/967fa6d4.32b03252.js new file mode 100644 index 000000000000..4ab914dd07d0 --- /dev/null +++ b/assets/js/967fa6d4.32b03252.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7876],{62482:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>o,metadata:()=>r,toc:()=>d});var s=i(74848),n=i(28453),a=i(67141);const o={id:"learn-guides-accounts-multisig",title:"Polkadot-JS Guides about Multi-signature Accounts",sidebar_label:"Multisig Guides",description:"Polkadot-JS Guides about Multi-signature Accounts",keyword:["guides","polkadot-js","accounts","multisig","multi-signature"],slug:"../learn-guides-accounts-multisig"},l=void 0,r={id:"learn/learn-guides-accounts-multisig",title:"Polkadot-JS Guides about Multi-signature Accounts",description:"Polkadot-JS Guides about Multi-signature Accounts",source:"@site/../docs/learn/learn-guides-accounts-multisig.md",sourceDirName:"learn",slug:"/learn-guides-accounts-multisig",permalink:"/docs/learn-guides-accounts-multisig",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts-multisig.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-accounts-multisig",title:"Polkadot-JS Guides about Multi-signature Accounts",sidebar_label:"Multisig Guides",description:"Polkadot-JS Guides about Multi-signature Accounts",keyword:["guides","polkadot-js","accounts","multisig","multi-signature"],slug:"../learn-guides-accounts-multisig"},sidebar:"docs",previous:{title:"Account Guides",permalink:"/docs/learn-guides-accounts"},next:{title:"Proxy Guides",permalink:"/docs/learn-guides-accounts-proxy"}},c={},d=[{value:"Creating a Multisig Account",id:"creating-a-multisig-account",level:2},{value:"Multisig Transactions with Accounts Tab",id:"multisig-transactions-with-accounts-tab",level:2},{value:"Multisig Transactions with Extrinsic Tab",id:"multisig-transactions-with-extrinsic-tab",level:2},{value:"Multisig Call Deposit",id:"multisig-call-deposit",level:3},{value:"Example using Multisig Accounts",id:"example-using-multisig-accounts",level:3},{value:"Decoding Multisig Call Data",id:"decoding-multisig-call-data",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsx)(t.h2,{id:"creating-a-multisig-account",children:"Creating a Multisig Account"}),"\n",(0,s.jsxs)(t.p,{children:['Check the "How to create a multisig account" section on\n',(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181826-how-to-create-and-use-a-multisig-account",children:"this support page"}),".\nWe recommend trying out the tutorial on\n",(0,s.jsx)(t.a,{href:"/docs/maintain-networks#westend-test-network",children:"Westend network"})," - Polkadot's testnet."]}),"\n",(0,s.jsx)(t.h2,{id:"multisig-transactions-with-accounts-tab",children:"Multisig Transactions with Accounts Tab"}),"\n",(0,s.jsx)(t.admonition,{title:"Walkthrough Video Tutorial",type:"info",children:(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=-cPiKMslZqI",children:"this video tutorial"})," to learn how to transact with\na multisig account using the Accounts Tab in the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS UI"}),"."]})}),"\n",(0,s.jsxs)(t.p,{children:["You can create a multisig account directly on the Accounts Tab of the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS UI"}),", and use this account to send funds. See\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181826-how-to-create-and-use-a-multisig-account",children:"this support article"}),"\nfor more information."]}),"\n",(0,s.jsx)(t.h2,{id:"multisig-transactions-with-extrinsic-tab",children:"Multisig Transactions with Extrinsic Tab"}),"\n",(0,s.jsx)(t.p,{children:"See the video tutorial below to learn about multi-signature accounts and how you can transact with\nthem using the Polkadot-JS UI."}),"\n",(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=2109",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=2109",children:"Transact with Multi-signature Accounts"})})]})}),"\n",(0,s.jsx)(t.p,{children:"There are three types of actions you can take with a multisig account:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Executing a call ",(0,s.jsx)(t.code,{children:"asMulti"}),". This is used to begin or end a multisig transaction."]}),"\n",(0,s.jsxs)(t.li,{children:["Approving a call ",(0,s.jsx)(t.code,{children:"approveAsMulti"}),". This is used to approve an extrinsic and pass-on to the next\nsignatory (see ",(0,s.jsx)(t.a,{href:"#example-using-multi-signature-accounts",children:"example below"})," for more information)."]}),"\n",(0,s.jsxs)(t.li,{children:["Cancelling a call ",(0,s.jsx)(t.code,{children:"cancelAsMulti"}),"."]}),"\n"]}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["Check out ",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/docs/substrate/extrinsics#multisig",children:"this page"})," for more\ninformation about the actions you can take with a multi-signature account."]})}),"\n",(0,s.jsxs)(t.p,{children:["In scenarios where only a single approval is needed, a convenience method ",(0,s.jsx)(t.code,{children:"as_multi_threshold_1"}),"\nshould be used. This function takes only the other signatories and the raw call as arguments. Note\nthat the Polkadot-JS UI does not have integration for this call because it is not possible to create\nmultisig accounts with ",(0,s.jsx)(t.code,{children:"threshold=1"}),". If you want to create a multisig with threshold 1, you can use\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/txwrapper-core",children:"txwrapper-core"}),", which is developed and supported by\nParity Technologies. There is a detailed\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/txwrapper-core/tree/main/packages/txwrapper-examples/multisig",children:"multisig example"}),"\nthat you can try out and change to see how it works."]}),"\n",(0,s.jsx)(t.p,{children:"However, in anything but the simple one approval case, you will likely need more than one of the\nsignatories to approve the call before finally executing it."}),"\n",(0,s.jsx)(t.h3,{id:"multisig-call-deposit",children:"Multisig Call Deposit"}),"\n",(0,s.jsxs)(t.p,{children:["When you create a new multi-sig call, you will need to place a\n",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#multisig-deposit-base",children:"deposit"}),". The deposit stays locked until\nthe call is executed. This deposit is to establish an economic cost on the storage space that the\nmultisig call takes up in the chain state and discourage users from creating multisig calls that\nnever get executed. The deposit will be reserved in the call initiator's account."]}),"\n",(0,s.jsxs)(t.p,{children:["The deposit is dependent on the ",(0,s.jsx)(t.code,{children:"threshold"})," parameter and is calculated as follows:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"Deposit = depositBase + threshold * depositFactor\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Where ",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#multisig-deposit-base",children:(0,s.jsx)(t.code,{children:"depositBase"})})," and\n",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#multisig-deposit-factor",children:(0,s.jsx)(t.code,{children:"depositFactor"})})," are chain constants set\nin the runtime code."]}),"\n",(0,s.jsx)(t.p,{children:"The other signatory accounts should have enough funds to pay for the transaction fees associated\nwith approving the multisig call. The deposit is for the call; that is, other signatories will not\nneed to place additional deposits. Once the multisig call is executed or rejected, the deposit is\nreleased on the account that initiated the call."}),"\n",(0,s.jsx)(t.h3,{id:"example-using-multisig-accounts",children:"Example using Multisig Accounts"}),"\n",(0,s.jsx)(t.admonition,{title:"Walk-through video tutorial",type:"info",children:(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T0vIuJcTJeQ",children:"this video tutorial"})," to learn how to transact with\na multisig account using the Extrinsic Tab in the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS UI"}),"."]})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"multisig diagram",src:i(97978).A+"",width:"1920",height:"800"})}),"\n",(0,s.jsxs)(t.p,{children:["Let's consider an example of a multisig on Polkadot with a threshold of 2 and 3 signers: Charlie,\nDan, and Eleanor. First, Charlie will create the call on-chain by calling the ",(0,s.jsx)(t.code,{children:"multisig.asMulti"}),"\nextrinsic with the raw call, in this case, a balance transfer (",(0,s.jsx)(t.code,{children:"balances.transferKeepAlive"}),"\nextrinsic) from multisig CDE to Frank's account. When doing this, Charlie will have to deposit\n",(0,s.jsx)(t.code,{children:"DepositBase + (2 * DepositFactor) = 20.152 DOT"})," while he waits for either Dan or Eleanor also to\napprove the balance transfer call using the ",(0,s.jsx)(t.code,{children:"multisig.approveAsMulti"})," or the ",(0,s.jsx)(t.code,{children:"multisig.asMulti"}),"\nextrinsics."]}),"\n",(0,s.jsxs)(t.p,{children:["If Dan submits the ",(0,s.jsx)(t.code,{children:"multisig.approveAsMulti"})," extrinsic, he approves Charlie's call but he passes on\nthe final approval to Eleanor. So, although the multisig has threshold 2, in this case all 3/3\nsignatories need to participate in the transaction approval. Eleanor will need to submit a\n",(0,s.jsx)(t.code,{children:"multisig.asMulti"})," or ",(0,s.jsx)(t.code,{children:"multisig.approveAsMulti"})," extrinsic to transfer funds from CDE to Frank."]}),"\n",(0,s.jsxs)(t.p,{children:["Alternatively, Dan or Eleanor can just submit a ",(0,s.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic after Charlie to\ntransfer the funds. In this case, 2/3 signatories will participate in the transaction approval. The\naccounts approving Charlie's call will not need to place the deposit, and Charlie will receive his\ndeposit back once the transfer is successful or canceled. To cancel the transaction, Dan or Eleanor\ncan use the ",(0,s.jsx)(t.code,{children:"multisig.cancelAsMulti"})," extrinsic."]}),"\n",(0,s.jsxs)(t.p,{children:["Note that multisigs are ",(0,s.jsx)(t.strong,{children:"deterministic"}),", which means that multisig addresses are generated from\nthe addresses of signers and the threshold of the multisig wallet. No matter the order of the\nsignatories' accounts, the multisig will always have the same address because accounts' addresses\nare sorted in ascending order."]}),"\n",(0,s.jsx)(t.admonition,{title:"Addresses that are provided to the multisig wallet are sorted",type:"note",children:(0,s.jsxs)(t.p,{children:["Public keys of signers' wallets are compared byte-for-byte and sorted ascending before being used to\ngenerate the multisig address. For example, consider the scenario with three addresses, A, B, and C,\nstarting with ",(0,s.jsx)(t.code,{children:"5FUGT"}),", ",(0,s.jsx)(t.code,{children:"5HMfS"}),", and ",(0,s.jsx)(t.code,{children:"5GhKJ"}),". If we build the ABC multisig with the accounts in that\nspecific order (i.e. first A, then B, and C), the real order of the accounts in the multisig will be\nACB. If, in the Extrinsic tab, we initiate a multisig call with C, the order of the other\nsignatories will be first A, then B. If we put first B, then A, the transaction will fail."]})}),"\n",(0,s.jsxs)(t.p,{children:["This has some implications when using the Extrinsics tab on the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS UI"})," to perform multisig transactions. If the\norder of the ",(0,s.jsx)(t.em,{children:"other signatories"})," is wrong, the transaction will fail. This does not happen if the\nmultisig is executed directly from the Accounts tab (recommended). The Polkadot-JS UI supports\nmultisig accounts, as documented on the ",(0,s.jsx)(t.a,{href:"/docs/learn-account-multisig",children:"Account Generation page"}),". You\ncan see our video tutorials for more information about creating multisig accounts and transacting\nwith them using both the ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=-cPiKMslZqI",children:"Accounts Tab"})," and the\n",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T0vIuJcTJeQ",children:"Extrinsic Tab"})," in the Polkadot-JS UI."]}),"\n",(0,s.jsx)(t.h2,{id:"decoding-multisig-call-data",children:"Decoding Multisig Call Data"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["Before signing a transaction, it is important to know the exact specifics of what is being signed.\nCheck the\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181826-how-to-create-and-use-a-multisig-account",children:'"How to use a multisig account"'}),"\nin the support docs on how to decode the multisig call data."]})})]})}function u(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},67141:(e,t,i)=>{i.d(t,{A:()=>a});var s=i(96540),n=i(74848);const a=function(e){var t,i=e.message,a=(0,s.useState)(!0),o=a[0],l=a[1];return(0,n.jsx)(n.Fragment,{children:o&&(0,n.jsxs)("div",{className:"message-box",children:[(0,n.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,n.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=i,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},97978:(e,t,i)=>{i.d(t,{A:()=>s});const s=i.p+"assets/images/multisig-diagram-90327330a3e865703a0ab1a1cc1eee47.png"},28453:(e,t,i)=>{i.d(t,{R:()=>o,x:()=>l});var s=i(96540);const n={},a=s.createContext(n);function o(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/967fa6d4.39fd171c.js b/assets/js/967fa6d4.39fd171c.js deleted file mode 100644 index 5afacda6384d..000000000000 --- a/assets/js/967fa6d4.39fd171c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7876],{62482:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>o,metadata:()=>r,toc:()=>d});var s=i(74848),n=i(28453),a=i(67141);const o={id:"learn-guides-accounts-multisig",title:"Polkadot-JS Guides about Multi-signature Accounts",sidebar_label:"Multisig Guides",description:"Polkadot-JS Guides about Multi-signature Accounts",keyword:["guides","polkadot-js","accounts","multisig","multi-signature"],slug:"../learn-guides-accounts-multisig"},l=void 0,r={id:"learn/learn-guides-accounts-multisig",title:"Polkadot-JS Guides about Multi-signature Accounts",description:"Polkadot-JS Guides about Multi-signature Accounts",source:"@site/../docs/learn/learn-guides-accounts-multisig.md",sourceDirName:"learn",slug:"/learn-guides-accounts-multisig",permalink:"/docs/learn-guides-accounts-multisig",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts-multisig.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-guides-accounts-multisig",title:"Polkadot-JS Guides about Multi-signature Accounts",sidebar_label:"Multisig Guides",description:"Polkadot-JS Guides about Multi-signature Accounts",keyword:["guides","polkadot-js","accounts","multisig","multi-signature"],slug:"../learn-guides-accounts-multisig"},sidebar:"docs",previous:{title:"Account Guides",permalink:"/docs/learn-guides-accounts"},next:{title:"Proxy Guides",permalink:"/docs/learn-guides-accounts-proxy"}},c={},d=[{value:"Creating a Multisig Account",id:"creating-a-multisig-account",level:2},{value:"Multisig Transactions with Accounts Tab",id:"multisig-transactions-with-accounts-tab",level:2},{value:"Multisig Transactions with Extrinsic Tab",id:"multisig-transactions-with-extrinsic-tab",level:2},{value:"Multisig Call Deposit",id:"multisig-call-deposit",level:3},{value:"Example using Multisig Accounts",id:"example-using-multisig-accounts",level:3},{value:"Decoding Multisig Call Data",id:"decoding-multisig-call-data",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,s.jsx)(t.h2,{id:"creating-a-multisig-account",children:"Creating a Multisig Account"}),"\n",(0,s.jsxs)(t.p,{children:['Check the "How to create a multisig account" section on\n',(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181826-how-to-create-and-use-a-multisig-account",children:"this support page"}),".\nWe recommend trying out the tutorial on\n",(0,s.jsx)(t.a,{href:"/docs/maintain-networks#westend-test-network",children:"Westend network"})," - Polkadot's testnet."]}),"\n",(0,s.jsx)(t.h2,{id:"multisig-transactions-with-accounts-tab",children:"Multisig Transactions with Accounts Tab"}),"\n",(0,s.jsx)(t.admonition,{title:"Walkthrough Video Tutorial",type:"info",children:(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=-cPiKMslZqI",children:"this video tutorial"})," to learn how to transact with\na multisig account using the Accounts Tab in the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS UI"}),"."]})}),"\n",(0,s.jsxs)(t.p,{children:["You can create a multisig account directly on the Accounts Tab of the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS UI"}),", and use this account to send funds. See\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181826-how-to-create-and-use-a-multisig-account",children:"this support article"}),"\nfor more information."]}),"\n",(0,s.jsx)(t.h2,{id:"multisig-transactions-with-extrinsic-tab",children:"Multisig Transactions with Extrinsic Tab"}),"\n",(0,s.jsx)(t.p,{children:"See the video tutorial below to learn about multi-signature accounts and how you can transact with\nthem using the Polkadot-JS UI."}),"\n",(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col text--center",children:[(0,s.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=2109",children:(0,s.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=2109",children:"Transact with Multi-signature Accounts"})})]})}),"\n",(0,s.jsx)(t.p,{children:"There are three types of actions you can take with a multisig account:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Executing a call ",(0,s.jsx)(t.code,{children:"asMulti"}),". This is used to begin or end a multisig transaction."]}),"\n",(0,s.jsxs)(t.li,{children:["Approving a call ",(0,s.jsx)(t.code,{children:"approveAsMulti"}),". This is used to approve an extrinsic and pass-on to the next\nsignatory (see ",(0,s.jsx)(t.a,{href:"#example-using-multi-signature-accounts",children:"example below"})," for more information)."]}),"\n",(0,s.jsxs)(t.li,{children:["Cancelling a call ",(0,s.jsx)(t.code,{children:"cancelAsMulti"}),"."]}),"\n"]}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["Check out ",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/docs/substrate/extrinsics#multisig",children:"this page"})," for more\ninformation about the actions you can take with a multi-signature account."]})}),"\n",(0,s.jsxs)(t.p,{children:["In scenarios where only a single approval is needed, a convenience method ",(0,s.jsx)(t.code,{children:"as_multi_threshold_1"}),"\nshould be used. This function takes only the other signatories and the raw call as arguments. Note\nthat the Polkadot-JS UI does not have integration for this call because it is not possible to create\nmultisig accounts with ",(0,s.jsx)(t.code,{children:"threshold=1"}),". If you want to create a multisig with threshold 1, you can use\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/txwrapper-core",children:"txwrapper-core"}),", which is developed and supported by\nParity Technologies. There is a detailed\n",(0,s.jsx)(t.a,{href:"https://github.com/paritytech/txwrapper-core/tree/main/packages/txwrapper-examples/multisig",children:"multisig example"}),"\nthat you can try out and change to see how it works."]}),"\n",(0,s.jsx)(t.p,{children:"However, in anything but the simple one approval case, you will likely need more than one of the\nsignatories to approve the call before finally executing it."}),"\n",(0,s.jsx)(t.h3,{id:"multisig-call-deposit",children:"Multisig Call Deposit"}),"\n",(0,s.jsxs)(t.p,{children:["When you create a new multi-sig call, you will need to place a\n",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#multisig-deposit-base",children:"deposit"}),". The deposit stays locked until\nthe call is executed. This deposit is to establish an economic cost on the storage space that the\nmultisig call takes up in the chain state and discourage users from creating multisig calls that\nnever get executed. The deposit will be reserved in the call initiator's account."]}),"\n",(0,s.jsxs)(t.p,{children:["The deposit is dependent on the ",(0,s.jsx)(t.code,{children:"threshold"})," parameter and is calculated as follows:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"Deposit = depositBase + threshold * depositFactor\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Where ",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#multisig-deposit-base",children:(0,s.jsx)(t.code,{children:"depositBase"})})," and\n",(0,s.jsx)(t.a,{href:"/docs/chain-state-values#multisig-deposit-factor",children:(0,s.jsx)(t.code,{children:"depositFactor"})})," are chain constants set\nin the runtime code."]}),"\n",(0,s.jsx)(t.p,{children:"The other signatory accounts should have enough funds to pay for the transaction fees associated\nwith approving the multisig call. The deposit is for the call; that is, other signatories will not\nneed to place additional deposits. Once the multisig call is executed or rejected, the deposit is\nreleased on the account that initiated the call."}),"\n",(0,s.jsx)(t.h3,{id:"example-using-multisig-accounts",children:"Example using Multisig Accounts"}),"\n",(0,s.jsx)(t.admonition,{title:"Walk-through video tutorial",type:"info",children:(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T0vIuJcTJeQ",children:"this video tutorial"})," to learn how to transact with\na multisig account using the Extrinsic Tab in the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS UI"}),"."]})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"multisig diagram",src:i(97978).A+"",width:"1920",height:"800"})}),"\n",(0,s.jsxs)(t.p,{children:["Let's consider an example of a multisig on Polkadot with a threshold of 2 and 3 signers: Charlie,\nDan, and Eleanor. First, Charlie will create the call on-chain by calling the ",(0,s.jsx)(t.code,{children:"multisig.asMulti"}),"\nextrinsic with the raw call, in this case, a balance transfer (",(0,s.jsx)(t.code,{children:"balances.transferKeepAlive"}),"\nextrinsic) from multisig CDE to Frank's account. When doing this, Charlie will have to deposit\n",(0,s.jsx)(t.code,{children:"DepositBase + (2 * DepositFactor) = 20.152 DOT"})," while he waits for either Dan or Eleanor also to\napprove the balance transfer call using the ",(0,s.jsx)(t.code,{children:"multisig.approveAsMulti"})," or the ",(0,s.jsx)(t.code,{children:"multisig.asMulti"}),"\nextrinsics."]}),"\n",(0,s.jsxs)(t.p,{children:["If Dan submits the ",(0,s.jsx)(t.code,{children:"multisig.approveAsMulti"})," extrinsic, he approves Charlie's call but he passes on\nthe final approval to Eleanor. So, although the multisig has threshold 2, in this case all 3/3\nsignatories need to participate in the transaction approval. Eleanor will need to submit a\n",(0,s.jsx)(t.code,{children:"multisig.asMulti"})," or ",(0,s.jsx)(t.code,{children:"multisig.approveAsMulti"})," extrinsic to transfer funds from CDE to Frank."]}),"\n",(0,s.jsxs)(t.p,{children:["Alternatively, Dan or Eleanor can just submit a ",(0,s.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic after Charlie to\ntransfer the funds. In this case, 2/3 signatories will participate in the transaction approval. The\naccounts approving Charlie's call will not need to place the deposit, and Charlie will receive his\ndeposit back once the transfer is successful or canceled. To cancel the transaction, Dan or Eleanor\ncan use the ",(0,s.jsx)(t.code,{children:"multisig.cancelAsMulti"})," extrinsic."]}),"\n",(0,s.jsxs)(t.p,{children:["Note that multisigs are ",(0,s.jsx)(t.strong,{children:"deterministic"}),", which means that multisig addresses are generated from\nthe addresses of signers and the threshold of the multisig wallet. No matter the order of the\nsignatories' accounts, the multisig will always have the same address because accounts' addresses\nare sorted in ascending order."]}),"\n",(0,s.jsx)(t.admonition,{title:"Addresses that are provided to the multisig wallet are sorted",type:"note",children:(0,s.jsxs)(t.p,{children:["Public keys of signers' wallets are compared byte-for-byte and sorted ascending before being used to\ngenerate the multisig address. For example, consider the scenario with three addresses, A, B, and C,\nstarting with ",(0,s.jsx)(t.code,{children:"5FUGT"}),", ",(0,s.jsx)(t.code,{children:"5HMfS"}),", and ",(0,s.jsx)(t.code,{children:"5GhKJ"}),". If we build the ABC multisig with the accounts in that\nspecific order (i.e. first A, then B, and C), the real order of the accounts in the multisig will be\nACB. If, in the Extrinsic tab, we initiate a multisig call with C, the order of the other\nsignatories will be first A, then B. If we put first B, then A, the transaction will fail."]})}),"\n",(0,s.jsxs)(t.p,{children:["This has some implications when using the Extrinsics tab on the\n",(0,s.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS UI"})," to perform multisig transactions. If the\norder of the ",(0,s.jsx)(t.em,{children:"other signatories"})," is wrong, the transaction will fail. This does not happen if the\nmultisig is executed directly from the Accounts tab (recommended). The Polkadot-JS UI supports\nmultisig accounts, as documented on the ",(0,s.jsx)(t.a,{href:"/docs/learn-account-multisig",children:"Account Generation page"}),". You\ncan see our video tutorials for more information about creating multisig accounts and transacting\nwith them using both the ",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=-cPiKMslZqI",children:"Accounts Tab"})," and the\n",(0,s.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T0vIuJcTJeQ",children:"Extrinsic Tab"})," in the Polkadot-JS UI."]}),"\n",(0,s.jsx)(t.h2,{id:"decoding-multisig-call-data",children:"Decoding Multisig Call Data"}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["Before signing a transaction, it is important to know the exact specifics of what is being signed.\nCheck the\n",(0,s.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181826-how-to-create-and-use-a-multisig-account",children:'"How to use a multisig account"'}),"\nin the support docs on how to decode the multisig call data."]})})]})}function u(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},67141:(e,t,i)=>{i.d(t,{A:()=>a});var s=i(96540),n=i(74848);const a=function(e){var t,i=e.message,a=(0,s.useState)(!0),o=a[0],l=a[1];return(0,n.jsx)(n.Fragment,{children:o&&(0,n.jsxs)("div",{className:"message-box",children:[(0,n.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,n.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=i,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},97978:(e,t,i)=>{i.d(t,{A:()=>s});const s=i.p+"assets/images/multisig-diagram-90327330a3e865703a0ab1a1cc1eee47.png"},28453:(e,t,i)=>{i.d(t,{R:()=>o,x:()=>l});var s=i(96540);const n={},a=s.createContext(n);function o(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9913464d.9f0529b2.js b/assets/js/9913464d.9f0529b2.js new file mode 100644 index 000000000000..010aab81f608 --- /dev/null +++ b/assets/js/9913464d.9f0529b2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5883],{9296:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var o=n(74848),r=n(28453),s=n(67141);const i={id:"learn-governance",title:"Governance V1",sidebar_label:"Governance V1",description:"Polkadot's First Governance Model.",keywords:["governance","referenda","proposal","voting","endorse"],slug:"../learn-governance"},a=void 0,l={id:"learn/archive/learn-governance",title:"Governance V1",description:"Polkadot's First Governance Model.",source:"@site/../docs/learn/archive/learn-governance.md",sourceDirName:"learn/archive",slug:"/learn/learn-governance",permalink:"/docs/learn/learn-governance",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-governance.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-governance",title:"Governance V1",sidebar_label:"Governance V1",description:"Polkadot's First Governance Model.",keywords:["governance","referenda","proposal","voting","endorse"],slug:"../learn-governance"},sidebar:"docs",previous:{title:"Archive",permalink:"/docs/learn-archive"},next:{title:"Gov1 Treasury",permalink:"/docs/learn/learn-treasury"}},c={},d=[{value:"Governance Summary",id:"governance-summary",level:2},{value:"Proposals",id:"proposals",level:2},{value:"Endorsing Proposals",id:"endorsing-proposals",level:3},{value:"Cancelling Proposals",id:"cancelling-proposals",level:3},{value:"Blacklisting Proposals",id:"blacklisting-proposals",level:3},{value:"Referenda",id:"referenda",level:2},{value:"Referenda Timeline",id:"referenda-timeline",level:3},{value:"Public Referenda",id:"public-referenda",level:3},{value:"Council Referenda",id:"council-referenda",level:3},{value:"Alternating Voting Timetable",id:"alternating-voting-timetable",level:3},{value:"Adaptive Quorum Biasing",id:"adaptive-quorum-biasing",level:3},{value:"Example of Adaptive Quorum Biasing",id:"example-of-adaptive-quorum-biasing",level:4},{value:"Enactment",id:"enactment",level:3},{value:"Voting on a Referendum",id:"voting-on-a-referendum",level:2},{value:"Voluntary Locking",id:"voluntary-locking",level:3},{value:"Delegations",id:"delegations",level:3},{value:"Council",id:"council",level:2},{value:"Prime Members",id:"prime-members",level:3},{value:"Technical Committee",id:"technical-committee",level:2},{value:"Frequently Asked Questions",id:"frequently-asked-questions",level:2},{value:"How to be a council member?",id:"how-to-be-a-council-member",level:3},{value:"How can I appeal to the council to enact a change on my behalf?",id:"how-can-i-appeal-to-the-council-to-enact-a-change-on-my-behalf",level:3},{value:"Gov1 Runtime Upgrade Monitoring",id:"gov1-runtime-upgrade-monitoring",level:2},{value:"Resources",id:"resources",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../learn-polkadot-opengov)."}),"\n",(0,o.jsx)(t.p,{children:"Polkadot uses a sophisticated governance mechanism that allows it to evolve gracefully overtime at\nthe ultimate behest of its assembled stakeholders. The stated goal is to ensure that the majority of\nthe stake can always command the network."}),"\n",(0,o.jsxs)(t.p,{children:["Polkadot brings together various novel mechanisms, including an amorphous (abstract) form of\nstate-transition function stored on-chain defined in a platform-agnostic language (i.e.\n",(0,o.jsx)(t.a,{href:"/docs/learn-wasm",children:"WebAssembly"}),"). It also allows for several on-chain voting mechanisms, such as\nreferenda with the novel concept of ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:"Adaptive Quorum Biasing"})," and batch\napproval voting. All changes to the protocol must be agreed upon by stake-weighted referenda."]}),"\n",(0,o.jsxs)(t.p,{children:["To make any changes to the network, the idea is to compose active token holders and the council\ntogether to administrate a network upgrade decision. No matter whether the proposal is proposed by\nthe public (token holders) or the ",(0,o.jsx)(t.a,{href:"#council",children:"Council"}),", it finally will have to go through a vote on\na referendum to let all holders, weighted by stake, make the decision."]}),"\n",(0,o.jsx)(t.h2,{id:"governance-summary",children:"Governance Summary"}),"\n",(0,o.jsx)(t.p,{children:"The figure below shows an overview of Governance V1 with the key actors and different paths for\nsubmitting a proposal that can potentially be voted on as a referendum."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"gov1-overview",src:n(89005).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(t.p,{children:["The public (i.e. token holders) can submit a proposal that gets added to the proposal queue. Here,\nproposals are ",(0,o.jsx)(t.a,{href:"#endorsing-proposals",children:"endorsed"}),", and the one that gets the most support will climb to\nthe top of the queue. When it is time, the proposal at the top of the queue will become a\n",(0,o.jsx)(t.a,{href:"#public-referenda",children:"Public Referendum"}),". For instance, the proposal with 11 endorsements is shown at\nthe top of the queue in the figure, which is ready to become a referendum."]}),"\n",(0,o.jsxs)(t.p,{children:["The public can also submit a ",(0,o.jsx)(t.a,{href:"/docs/learn/learn-treasury#creating-a-treasury-proposal",children:"treasury proposal"}),",\nwhich must be evaluated by the ",(0,o.jsx)(t.a,{href:"#council",children:"Council"})," through a motion. If the Council motion passes,\nthe treasury proposal can be directly executed or go to the external queue, which will be voted on\nthrough a ",(0,o.jsx)(t.a,{href:"#council-referenda",children:"Council Referendum"}),". See the figure's green horizontal path from the\nPublic (green) to the Council (yellow). Treasury proposals and Council proposals can be directly\nexecuted (horizontal yellow arrows) or go to the external queue, where they will become a referendum"]}),"\n",(0,o.jsxs)(t.p,{children:["Note that the external queue always consists of\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/substrate/blob/f4a2e84ee5974b219f2a03cd195105060c41e3cd/frame/democracy/src/lib.rs#LL29C8-L31C4",children:"a single proposal"}),".\nA proposal in the external queue can be fast-tracked by the\n",(0,o.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"})," (light blue). The fast track can contain as many\nproposals as possible (also called emergency proposals) that can be voted on simultaneously with\nwith the referenda introduced either by the Council or the Public. See in the figure the yellow\ncircle (i.e. Council Proposal) exiting the external queue, and the yellow circle with a light-blue\nborder also leaving the queue and being fast-tracked by the Technical Committee (TC). Once empty,\nthe external queue can be filled with another Council proposal."]}),"\n",(0,o.jsxs)(t.p,{children:["The Council can also submit proposals that will end up in the external queue. Voting on Council and\nPublic proposals subject to an ",(0,o.jsx)(t.a,{href:"#alternating-voting-timetable",children:"alternating timetable"}),', shown in the\nfigure as the "on" and "off" toggles on the external and proposal queues. In this example, the\nPublic proposal will be voted on together with the fast-tracked Council Proposal. Voting on\nnon-fast-tracked Council Proposals will be blocked until the alternating timetable switches the\ntoggles, which stops Public proposals from becoming a referenda.']}),"\n",(0,o.jsxs)(t.p,{children:["Referenda will follow an ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:"adaptive quorum biasing"})," mechanism for deciding\nwhether they get enacted, and if they do, they will be executed after an\n",(0,o.jsx)(t.a,{href:"#enactment",children:"enactment period"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"Token holders can delegate their votes (with a conviction multiplier) to another account belonging\nto a trusted entity voting on their behalf."}),"\n",(0,o.jsx)(t.h2,{id:"proposals",children:"Proposals"}),"\n",(0,o.jsx)(t.p,{children:"Referenda can be started in different ways:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Publicly submitted proposals"}),"\n",(0,o.jsx)(t.li,{children:"Proposals submitted by the council, either through a majority or unanimously"}),"\n",(0,o.jsxs)(t.li,{children:["Proposals submitted as part of the ",(0,o.jsx)(t.a,{href:"#enactment",children:"enactment"})," of a prior referendum (i.e. making a\nreferendum to start a new referendum)"]}),"\n",(0,o.jsxs)(t.li,{children:["Emergency proposals submitted by the ",(0,o.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"})," and approved by\nthe ",(0,o.jsx)(t.a,{href:"#council",children:"Council"})]}),"\n"]}),"\n",(0,o.jsx)(t.admonition,{title:"Starting a proposal in Governance V1",type:"info",children:(0,o.jsxs)(t.p,{children:["For more information about how to start a proposal, see the\n",(0,o.jsx)(t.a,{href:"/docs/maintain/maintain-guides-democracy#proposing-an-action",children:"dedicated page"}),"."]})}),"\n",(0,o.jsx)(t.h3,{id:"endorsing-proposals",children:"Endorsing Proposals"}),"\n",(0,o.jsxs)(t.p,{children:["Anyone can submit a proposal by depositing the minimum amount of tokens for a certain period (number\nof blocks). If someone agrees with the proposal, they may deposit the same amount of tokens to\nsupport it - this action is called\n",(0,o.jsx)(t.a,{href:"/docs/maintain/maintain-guides-democracy#endorsing-a-proposal",children:(0,o.jsx)(t.em,{children:"endorsing"})}),". The\nproposal with the highest amount of bonded support will be selected to be a referendum in the next\nvoting cycle based on an ",(0,o.jsx)(t.a,{href:"#alternating-voting-timetable",children:"alternating voting timetable"}),"."]}),"\n",(0,o.jsx)(t.h3,{id:"cancelling-proposals",children:"Cancelling Proposals"}),"\n",(0,o.jsxs)(t.p,{children:["A proposal can be canceled if the ",(0,o.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"})," unanimously agrees to\ndo so or if Root Origin (e.g. sudo) triggers this functionality. A canceled proposal's deposit is\nburned."]}),"\n",(0,o.jsx)(t.p,{children:"Additionally, a two-thirds majority of the council can cancel a referendum. This may function as a\nlast-resort if there is an issue found late in a referendum's proposal, such as a bug in the code of\nthe runtime that the proposal would institute."}),"\n",(0,o.jsxs)(t.p,{children:["If the cancellation is controversial enough that the council cannot get a two-thirds majority, then\nit will be left to the stakeholders ",(0,o.jsx)(t.em,{children:"en masse"})," to determine the proposal\u2019s fate."]}),"\n",(0,o.jsx)(t.h3,{id:"blacklisting-proposals",children:"Blacklisting Proposals"}),"\n",(0,o.jsxs)(t.p,{children:["A proposal can be blacklisted by Root Origin (e.g. sudo). A blacklisted proposal and its related\nreferendum (if any) are immediately ",(0,o.jsx)(t.a,{href:"#canceling",children:"canceled"}),". Additionally, a blacklisted proposal's\nhash cannot re-appear in the proposal queue. Blacklisting is useful when removing erroneous\nproposals that could be submitted with the same hash."]}),"\n",(0,o.jsx)(t.p,{children:"Upon seeing their proposal removed, a submitter who is not properly introduced to the democracy\nsystem of Polkadot might be tempted to re-submit the same proposal. That said, this is far from a\nfool-proof method of preventing invalid proposals from being submitted - a single changed character\nin a proposal's text will also change the hash of the proposal, rendering the per-hash blacklist\ninvalid."}),"\n",(0,o.jsx)(t.h2,{id:"referenda",children:"Referenda"}),"\n",(0,o.jsxs)(t.p,{children:["Referenda are simple, inclusive, stake-based voting schemes. Each referendum has a specific proposal\nthat takes the form of a ",(0,o.jsx)(t.strong,{children:"privileged function"})," call in the runtime. That function includes the\nmost powerful ",(0,o.jsx)(t.strong,{children:"call"}),": ",(0,o.jsx)(t.code,{children:"set_code"}),', which can switch out the entire runtime code, achieving what\nwould otherwise require a "hard fork".']}),"\n",(0,o.jsx)(t.p,{children:'Referenda are discrete events, have a fixed period where voting happens, and then are tallied, and\nthe function call is executed if the vote is approved. Referenda are always binary: your only\noptions in voting are "aye", "nay", or abstaining entirely.'}),"\n",(0,o.jsx)(t.h3,{id:"referenda-timeline",children:"Referenda Timeline"}),"\n",(0,o.jsx)(t.p,{children:"The structure of the timeline for all referenda is the same regardless of who initiates the\nproposal, although the timeline length can vary (see below)."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"gov1-timeline",src:n(96601).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(t.p,{children:"The figure above provides a summary view of the referenda timeline for Governance V1."}),"\n",(0,o.jsxs)(t.p,{children:["In (1), the proposal is submitted, and the Launch Period starts. During this period of indefinite\nlength the voters can ",(0,o.jsx)(t.a,{href:"#endorsing-proposals",children:"endorse"})," proposals by bonding the same amount of tokens\nused by the depositor. Deposited tokens for endorsement will be returned once the proposal becomes a\nreferendum. During the launch period, the proposal will compete with other proposals, and the one\nthat gets to the top will be selected for a referendum when the next voting period starts."]}),"\n",(0,o.jsx)(t.p,{children:"The figure shows that the launch period is shown with a fixed length. Still, it varies depending on\nwho initiated the proposal and how many proposals there are in the pipeline. Council motions will\nlikely have a short launch period when compared to the public referenda which might take longer\nunless they are the only ones in the pipeline."}),"\n",(0,o.jsxs)(t.p,{children:["In (2), the proposal is selected for a referendum. Proposals initiated by the public will become a\n",(0,o.jsx)(t.a,{href:"#public-referenda",children:"public referendum"}),", while those initiated by the council will become\n",(0,o.jsx)(t.a,{href:"#council-referenda",children:"council referenda"}),". The voting period lasts 28 days (7 days on Kusama), after\nwhich, if the proposal is approved, it will go through an enactment period. Rejected proposals will\nneed to start from (1). Note that Governance V1 uses an\n",(0,o.jsx)(t.a,{href:"#alternating-voting-timetable",children:"alternating voting timeline"})," where voters can vote either for a\npublic proposal or a council motion every 28 days (7 days on Kusama)."]}),"\n",(0,o.jsxs)(t.p,{children:["In (3), the proposal is approved and moves through the ",(0,o.jsx)(t.a,{href:"#enactment",children:"enactment period"})," that can be of\ndifferent lengths depending on who initiated the proposal in the first place, with emergency\nproposals being the fastest ones and the only ones that can be voted simultaneously with other\nreferenda."]}),"\n",(0,o.jsx)(t.h3,{id:"public-referenda",children:"Public Referenda"}),"\n",(0,o.jsxs)(t.p,{children:["Public referenda will have a ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:(0,o.jsx)(t.strong,{children:"positive turnout bias"})}),", meaning that\nthey will require a heavy supermajority of ",(0,o.jsx)(t.em,{children:"aye"})," votes to pass at low turnouts but as turnout\nincreases towards 100%, it will require a simple majority of ",(0,o.jsx)(t.em,{children:"aye"})," votes to pass (i.e. 51% wins)."]}),"\n",(0,o.jsx)(t.p,{children:"Note that the bonded tokens will be released once the proposal is tabled (that is, brought to a\nvote), and a maximum of 100 public proposals can be in the proposal queue."}),"\n",(0,o.jsx)(t.admonition,{title:"turnout",type:"info",children:(0,o.jsxs)(t.p,{children:["The total number of voting tokens excluding conviction or ",(0,o.jsx)(t.a,{href:"#voluntary-locking",children:"voluntary locking"}),"."]})}),"\n",(0,o.jsx)(t.h3,{id:"council-referenda",children:"Council Referenda"}),"\n",(0,o.jsxs)(t.p,{children:["Unanimous Council - When all council members agree on a proposal, it can be moved to a referendum\nwith a ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:(0,o.jsx)(t.strong,{children:"negative turnout bias"})}),". Briefly, it will require a heavy\nsupermajority of ",(0,o.jsx)(t.em,{children:"nay"})," votes to reject at low turnouts, but as turnout increases towards 100%, it\nwill require a simple majority of ",(0,o.jsx)(t.em,{children:"nay"})," votes to fail (i.e. 51% wins)."]}),"\n",(0,o.jsxs)(t.p,{children:["Majority Council - When agreement from only a simple majority of council members occurs, the\nreferendum will need ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:(0,o.jsx)(t.strong,{children:"simple majority"})})," to pass."]}),"\n",(0,o.jsx)(t.admonition,{title:"Public- vs. Council-initiated Referenda",type:"info",children:(0,o.jsx)(t.p,{children:"Public referenda must be agreed upon using a positive bias to mitigate attacks by malicious or\nill-conceived proposals. Conversely, when a proposal is unanimously voted in favor by the council,\nit benefits from using the negative bias. We assume low turnout is less problematic if the council\nproposes a referendum. Also, the council members are elected by the community and have strong\ntechnical as well as functional knowledge about the system, and we assume solid justifications back\nchanges proposed by the council."})}),"\n",(0,o.jsx)(t.h3,{id:"alternating-voting-timetable",children:"Alternating Voting Timetable"}),"\n",(0,o.jsx)(t.p,{children:"All referenda are executed by Root Origin. It follows that multiple referenda cannot be voted upon\nin the same period, excluding emergency referenda. An emergency referendum occurring at the same\ntime as a regular referendum (either public- or council-proposed) is the only time multiple\nreferenda can be voted on."}),"\n",(0,o.jsxs)(t.p,{children:["Every 28 days (7 days on Kusama), a new referendum will come up for a vote, assuming there is at\nleast one proposal in one of the queues. There is a queue for Council-approved proposals and a queue\nfor publicly-submitted proposals. The referendum to be voted upon alternates between the top\nproposal in the two queues, where the proposals' rank is based on\n",(0,o.jsx)(t.a,{href:"#endorsing-proposals",children:"endorsement"})," (i.e. bonded tokens)."]}),"\n",(0,o.jsx)(t.h3,{id:"adaptive-quorum-biasing",children:"Adaptive Quorum Biasing"}),"\n",(0,o.jsxs)(t.p,{children:["Polkadot introduces the concept of ",(0,o.jsx)(t.strong,{children:"Adaptive Quorum Biasing"}),", which is used to alter the effective\nsuper-majority required to make it easier or more difficult for a proposal to pass depending on\nvoting power (turnout) and origin (Council or public)."]}),"\n",(0,o.jsx)(t.p,{children:"Adaptive Quorum Biasing creates three tallying mechanisms: majority carry, super-majority approve,\nand super-majority against. They all equate to a simple majority-carry system at 100% turnout. Their\nselection depends on which entity proposed the proposal and whether all Council members voted yes\n(in the case of Council Referenda)."}),"\n",(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Entity"})}),(0,o.jsx)(t.th,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Metric"})})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Public"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Positive Turnout Bias (Super-Majority Approve)"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Council (Complete agreement)"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Negative Turnout Bias (Super-Majority Against)"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Council (Majority agreement)"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Simple Majority"})]})]})]}),"\n",(0,o.jsx)(t.p,{children:"Let's use the image below as an example."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"adaptive-quorum-biasing",src:n(87635).A+"",width:"537",height:"439"})}),"\n",(0,o.jsxs)(t.p,{children:["If a publicly submitted referendum only has a 25% turnout, the tally of ",(0,o.jsx)(t.em,{children:"aye"})," votes has to reach 66%\nfor it to pass since we applied ",(0,o.jsx)(t.strong,{children:"Positive Turnout Bias"}),". In contrast, when it has a 75% turnout,\nthe tally of ",(0,o.jsx)(t.em,{children:"aye"})," votes has to reach 54%, which means that the super-majority required decreases as\nthe turnout increases. A positive turnout bias, whereby a heavy super-majority of aye votes is\nrequired to carry at low turnouts. However, as turnout increases towards 100%, it becomes a simple\nmajority carry as below."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7Bagainst&space;%5Cover&space;%5Csqrt%7Bturnout%7D%7D&space;%3C&space;%7Bapprove&space;%5Cover&space;%5Csqrt%7Belectorate%7D%7D",alt:""})}),"\n",(0,o.jsxs)(t.p,{children:["Where ",(0,o.jsx)(t.code,{children:"approve"})," is the number of ",(0,o.jsx)(t.em,{children:"aye"})," votes, ",(0,o.jsx)(t.code,{children:"against"})," is the number of ",(0,o.jsx)(t.em,{children:"nay"})," votes, ",(0,o.jsx)(t.code,{children:"turnout"})," is\nthe total number of voting tokens excluding ",(0,o.jsx)(t.a,{href:"#voluntary-locking",children:"voluntary locking"}),", and\n",(0,o.jsx)(t.code,{children:"electorate"})," is the total number of tokens issued in the network."]}),"\n",(0,o.jsxs)(t.p,{children:["When the council proposes a new proposal through unanimous consent, the referendum would be put to\nthe vote using ",(0,o.jsx)(t.strong,{children:"Negative Turnout Bias"}),". Referring to the above image, when a Council referendum\nonly has a 25% turnout, the tally of ",(0,o.jsx)(t.em,{children:"aye"})," votes has to reach 34% for it to pass, while if the\nturnout increases to 75%, the tally of ",(0,o.jsx)(t.em,{children:"aye"})," votes has to reach 46%. A negative turnout bias\nrequires a heavy super-majority of ",(0,o.jsx)(t.em,{children:"nay"})," votes to reject at low turnouts. However, as turnout\nincreases towards 100%, it becomes a simple majority carry as below."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7Bagainst&space;%5Cover&space;%5Csqrt%7Belectorate%7D%7D&space;%3C&space;%7Bapprove&space;%5Cover&space;%5Csqrt%7Bturnout%7D%7D",alt:""})}),"\n",(0,o.jsxs)(t.p,{children:["In short, when the turnout rate is low, a super-majority is required to reject the proposal, which\nmeans a lower threshold of ",(0,o.jsx)(t.em,{children:"aye"})," votes must be reached. As turnout increases toward 100%, it becomes\na simple majority, a simple comparison of votes. If there are more ",(0,o.jsx)(t.em,{children:"aye"})," votes than ",(0,o.jsx)(t.em,{children:"nay"}),", then the\nproposal is carried, no matter how much stake votes on the proposal."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7Bapprove%7D&space;%3E&space;%7Bagainst%7D",alt:""})}),"\n",(0,o.jsxs)(t.p,{children:["To know more about where these above formulas come from, please read the\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/democracy/src/vote_threshold.rs",children:"democracy pallet"}),"."]}),"\n",(0,o.jsx)(t.h4,{id:"example-of-adaptive-quorum-biasing",children:"Example of Adaptive Quorum Biasing"}),"\n",(0,o.jsx)(t.p,{children:"Let's assume we only have 1,500 DOT tokens in total and that this is a public proposal."}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"John: 500 DOT"}),"\n",(0,o.jsx)(t.li,{children:"Peter: 100 DOT"}),"\n",(0,o.jsx)(t.li,{children:"Lilly: 150 DOT"}),"\n",(0,o.jsx)(t.li,{children:"JJ: 150 DOT"}),"\n",(0,o.jsx)(t.li,{children:"Ken: 600 DOT"}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["John: Votes ",(0,o.jsx)(t.code,{children:"Yes"})," for a 4 week lock period => 500 x 1 = 500 Votes"]}),"\n",(0,o.jsxs)(t.p,{children:["Peter: Votes ",(0,o.jsx)(t.code,{children:"Yes"})," for a 4 week lock period => 100 x 1 = 100 Votes"]}),"\n",(0,o.jsxs)(t.p,{children:["JJ: Votes ",(0,o.jsx)(t.code,{children:"No"})," for a 16 week lock period => 150 x 3 = 450 Votes"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"approve = 600 Votes"}),"\n",(0,o.jsx)(t.li,{children:"against = 450 Votes"}),"\n",(0,o.jsx)(t.li,{children:"turnout = 750 Votes"}),"\n",(0,o.jsx)(t.li,{children:"electorate = 1500 Votes"}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%5Cfrac%7B450%7D%7B%5Csqrt%7B750%7D%7D&space;%3C&space;%5Cfrac%7B600%7D%7B%5Csqrt%7B1500%7D%7D",alt:""})}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7B16.432%7D&space;%3C&space;%7B15.492%7D",alt:""})}),"\n",(0,o.jsxs)(t.p,{children:["Since the above example is a public referendum, ",(0,o.jsx)(t.strong,{children:"Super-Majority Approve"})," would be used to\ncalculate the result. Super-Majority Approve requires more ",(0,o.jsx)(t.em,{children:"aye"})," votes to pass the referendum when\nturnout is low; therefore, based on the above result, the referendum will be rejected."]}),"\n",(0,o.jsx)(t.admonition,{title:"only the winning voter's tokens are locked.",type:"info",children:(0,o.jsxs)(t.p,{children:["If the voters on the losing side of the referendum believe that the outcome will have adverse\neffects, their tokens are transferrable, so they will not be locked into the decision. Winning\nproposals are autonomously enacted after the ",(0,o.jsx)(t.a,{href:"#enactment",children:"enactment period"}),"."]})}),"\n",(0,o.jsx)(t.h3,{id:"enactment",children:"Enactment"}),"\n",(0,o.jsxs)(t.p,{children:["Referenda are considered ",(0,o.jsx)(t.em,{children:"baked"})," if they are closed and tallied. Assuming a referendum is approved,\nit will be scheduled for ",(0,o.jsx)(t.strong,{children:"enactment"}),". Referenda are considered ",(0,o.jsx)(t.em,{children:"unbaked"})," if they are pending an\noutcome, i.e. being voted on."]}),"\n",(0,o.jsxs)(t.p,{children:["All referenda are associated with an enactment delay or ",(0,o.jsx)(t.strong,{children:"enactment period"}),". This is the period\nbetween a referendum ending and (assuming it was approved) the changes being enacted."]}),"\n",(0,o.jsx)(t.p,{children:'For public and Council referenda, the enactment period is a fixed time of 28 days (8 days on\nKusama). For proposals submitted as part of the enactment of a prior referendum, it can be set as\ndesired. Emergency proposals deal with major problems with the network and need to be\n"fast-tracked". These will have a shorter enactment period.'}),"\n",(0,o.jsx)(t.h2,{id:"voting-on-a-referendum",children:"Voting on a Referendum"}),"\n",(0,o.jsx)(t.p,{children:"To vote, a voter generally must lock their tokens up for at least the enactment period beyond the\nend of the referendum. This is to ensure that some minimal economic buy-in to the result is needed\nand to dissuade vote selling."}),"\n",(0,o.jsx)(t.admonition,{title:"Referenda explainer video",type:"note",children:(0,o.jsxs)(t.p,{children:["To learn more about voting on referenda, please check out our\n",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=BkbhhlsezGA&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=31&ab_channel=Polkadot",children:"technical explainer video"}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:["It is possible to vote without locking, but your vote is worth a small fraction of a normal vote,\ngiven your stake. At the same time, holding only a small amount of tokens does not mean that the\nholder cannot influence the referendum result, thanks to time-locking or ",(0,o.jsx)(t.strong,{children:"voluntary locking"})," (see\nbelow)."]}),"\n",(0,o.jsx)(t.h3,{id:"voluntary-locking",children:"Voluntary Locking"}),"\n",(0,o.jsx)(t.admonition,{title:"Voluntary Locking",type:"info",children:(0,o.jsxs)(t.p,{children:["For more information about voluntary locking or conviction voting see\n",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov#voluntary-locking",children:"Polkadot OpenGov"}),"."]})}),"\n",(0,o.jsx)(t.h3,{id:"delegations",children:"Delegations"}),"\n",(0,o.jsxs)(t.p,{children:["In Polkadot, you can\n",(0,o.jsx)(t.a,{href:"/docs/maintain/maintain-guides-democracy#delegate-a-vote",children:"delegate your voting power"})," to\nanother account you trust if you are not willing to stay up-to-date with all referenda."]}),"\n",(0,o.jsxs)(t.p,{children:["You can also use a ",(0,o.jsx)(t.a,{href:"/docs/learn-proxies#governance-proxy",children:"governance proxy"})," to vote on behalf of\nyour stash account. The proxy can be yours, or you can authorize a third-party governance proxy to\nvote with your stash. Learn more from the ",(0,o.jsx)(t.a,{href:"/docs/learn-proxies",children:"dedicated page on Proxy Accounts"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"council",children:"Council"}),"\n",(0,o.jsx)(t.p,{children:'To represent passive stakeholders, Polkadot introduces the idea of a "council". The council is an\non-chain entity comprising several actors, each represented as an on-chain account. The Polkadot\ncouncil consists of 13 members (19 on Kusama).'}),"\n",(0,o.jsxs)(t.p,{children:["Along with ",(0,o.jsx)(t.a,{href:"/docs/learn/learn-treasury",children:"controlling the treasury"}),", the council is called upon primarily for\nthree tasks of governance:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Proposing sensible referenda"}),"\n",(0,o.jsx)(t.li,{children:"Cancelling uncontroversially dangerous or malicious referenda"}),"\n",(0,o.jsxs)(t.li,{children:["Electing the ",(0,o.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"}),"."]}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"For a referendum to be proposed by the council, a strict majority of members must be in favor, with\nno member exercising a veto. Vetoes may be exercised only once by a member for any single proposal.\nIf the proposal is resubmitted after a cool-down period, they may not veto it a second time."}),"\n",(0,o.jsxs)(t.p,{children:["Council motion that pass with a 3/5 (60%) super-majority - but without reaching unanimous support -\nwill move to a public referendum under a neutral, majority-carries voting scheme. In the case that\nall members of the council that voted are in favor of a motion, the vote is considered unanimous and\nbecomes a referendum with ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:"negative turnout bias"}),"."]}),"\n",(0,o.jsx)(t.admonition,{title:"Explainer video on the Council",type:"note",children:(0,o.jsxs)(t.p,{children:["For more information, check out our\n",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=837Vv3gdRzI",children:"video explainer on Council"})]})}),"\n",(0,o.jsx)(t.h3,{id:"prime-members",children:"Prime Members"}),"\n",(0,o.jsxs)(t.p,{children:["The council, being an instantiation of\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/collective",children:"Substrate's Collective pallet"}),",\nimplements what's called a ",(0,o.jsx)(t.em,{children:"prime member"})," whose vote acts as the default for other members that fail\nto vote before the timeout."]}),"\n",(0,o.jsxs)(t.p,{children:["The prime member is chosen based on a ",(0,o.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Borda_count",children:"Borda count"}),"."]}),"\n",(0,o.jsx)(t.p,{children:'The purpose of having a prime council member is to ensure a quorum, even when several members\nabstain from a vote. Council members might be tempted to vote a "soft rejection" or a "soft\napproval" by not voting and letting the others vote. The existence of a prime member forces\ncouncilors to be explicit in their votes or have their vote counted for whatever is voted on by the\nprime.'}),"\n",(0,o.jsx)(t.h2,{id:"technical-committee",children:"Technical Committee"}),"\n",(0,o.jsxs)(t.p,{children:["The Technical Committee(TC) was introduced in the\n",(0,o.jsx)(t.a,{href:"https://polkadot.network/kusama-rollout-and-governance/",children:"Kusama rollout and governance post"})," as one\nof the three chambers of Kusama governance (along with the Council and the Referendum chamber). The\nTC is composed of the teams that have successfully implemented or specified either a Polkadot\nruntime or Polkadot Host. Teams are added or removed from the TC via a simple majority vote of the\n",(0,o.jsx)(t.a,{href:"#council",children:"Council"}),"."]}),"\n",(0,o.jsx)(t.p,{children:'The TC aims to safeguard against malicious referenda, implement bug fixes, reverse faulty runtime\nupdates, or add new but battle-tested features. The TC can fast-track proposals using the Democracy\npallet and is the only origin that can trigger the fast-tracking functionality. We can think of the\nTC as a "unique origin" that cannot generate proposals but fast-track existing ones.'}),"\n",(0,o.jsx)(t.p,{children:"Fast-tracked referenda are the only referenda that can be active alongside another active\nreferendum. Thus, with fast-tracked referenda, it is possible to have two active referendums\nsimultaneously. Voting on one does not prevent a user from voting on the other."}),"\n",(0,o.jsx)(t.h2,{id:"frequently-asked-questions",children:"Frequently Asked Questions"}),"\n",(0,o.jsx)(t.h3,{id:"how-to-be-a-council-member",children:"How to be a council member?"}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"approval-vote",src:n(87507).A+"",width:"850",height:"340"})}),"\n",(0,o.jsx)(t.p,{children:"All stakeholders can signal their approval of any of the registered candidates."}),"\n",(0,o.jsxs)(t.p,{children:["Council elections are handled by the same ",(0,o.jsx)(t.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n election"})," process that\nselects validators from the available pool based on nominations. However, token holders' votes for\ncouncilors are isolated from any nominations they may have on validators. Council terms last for one\nweek on Polkadot and one day day on Kusama."]}),"\n",(0,o.jsxs)(t.p,{children:["At the end of each term, ",(0,o.jsx)(t.a,{href:"../learn-phragmen#algorithm",children:"Phragm\xe9n election algorithm"})," runs and the\nresult will choose the new councilors based on the vote configurations of all voters. The election\nalso chooses a set number of runners-up, which is 20 on Polkadot (12 on Kusama), that will remain in\nthe queue with their votes intact."]}),"\n",(0,o.jsx)(t.p,{children:'As opposed to a "first-past-the-post" electoral system, where voters can only vote for a single\ncandidate from a list, a Phragm\xe9n election is a more expressive way to include each voter\u2019s views.\nToken holders can treat it as a way to support as many candidates as they want. The election\nalgorithm will find a fair subset of the candidates that most closely matches the expressed\nindications of the electorate as a whole.'}),"\n",(0,o.jsx)(t.p,{children:"Let's take a look at the example below."}),"\n",(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{style:{textAlign:"center"},children:"Round 1"}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Token Holders"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Candidates"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"A"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"B"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"C"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"D"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"E"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Peter"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Alice"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Bob"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Kelvin"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Total"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"2"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"1"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"3"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"2"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"2"})]})]})]}),"\n",(0,o.jsx)(t.p,{children:"The above example shows that candidate C wins the election in round 1, while candidates A, B, D & E\nkeep remaining on the candidates' list for the next round."}),"\n",(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{style:{textAlign:"center"},children:"Round 2"}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Token Holders"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Candidates"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"A"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"B"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"D"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"E"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Peter"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Alice"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Bob"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Kelvin"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Total"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"4"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"4"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"1"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"1"})]})]})]}),"\n",(0,o.jsx)(t.p,{children:"The top-N (say 4 in this example) runners-up can remain, and their votes persist until the next\nelection. After round 2, even though candidates A & B get the same number of votes in this round,\ncandidate A gets elected because after adding the older unused approvals, it is higher than B."}),"\n",(0,o.jsx)(t.h3,{id:"how-can-i-appeal-to-the-council-to-enact-a-change-on-my-behalf",children:"How can I appeal to the council to enact a change on my behalf?"}),"\n",(0,o.jsxs)(t.p,{children:["In some circumstances, you may want to appeal to the on-chain council to enact a change on your\nbehalf. One example of this circumstance is the case of lost or locked funds when the funds were\nlost due to a human interface error (such as inputting an address for another network). Another\nexample is if you participated in the 2017 Polkadot ICO with a multi-sig address which now does not\nlet you sign a message easily. When these circumstances can be proven beyond a reasonable doubt to\nbe an error, the council ",(0,o.jsx)(t.em,{children:"may"})," consider a governance motion to correct it."]}),"\n",(0,o.jsxs)(t.p,{children:["The first step to appeal to the council is to contact the councilors. There is no singular place\nwhere you are guaranteed to grab every councilor\u2019s ear with your message. However, there are\n",(0,o.jsx)(t.a,{href:"/docs/community",children:"a handful of good places"})," to start where you can get the attention of\nsome of them. After creating an account and joining this room, you can post a well-thought-through\nmessage here that lays down your case and justifies why you think the council should consider\nenacting a change to the protocol on your behalf."]}),"\n",(0,o.jsxs)(t.p,{children:["At some point, you will likely need a place for a longer-form discussion. For this, making a post on\n",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/",children:"Polkassembly"})," is the recommended place to do so. When you write\na post on Polkassembly, present all the evidence for your circumstances and state clearly what kind\nof change you would suggest to the councilors to enact."]}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsx)(t.p,{children:"Remember, the councilors do not need to make the change, it is your responsibility to make a strong\ncase for why the change should be made."})}),"\n",(0,o.jsx)(t.h2,{id:"gov1-runtime-upgrade-monitoring",children:"Gov1 Runtime Upgrade Monitoring"}),"\n",(0,o.jsx)(t.p,{children:"Monitor the chain for:"}),"\n",(0,o.jsxs)(t.ol,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"democracy(Started)"})," events and log ",(0,o.jsx)(t.code,{children:"index"})," and ",(0,o.jsx)(t.code,{children:"blockNumber"}),". This event indicates that a\nreferendum has started (although it does not mean it is a runtime upgrade). Get the referendum\ninfo*; it should have a status of ",(0,o.jsx)(t.code,{children:"Ongoing"}),". Find the ending block number (",(0,o.jsx)(t.code,{children:"end"}),") and the\nenactment ",(0,o.jsx)(t.code,{children:"delay"})," (delay). If the referendum passes, it will execute on block number\n",(0,o.jsx)(t.code,{children:"end + delay"}),"."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"democracy(Passed)"}),", ",(0,o.jsx)(t.code,{children:"democracy(NotPassed)"}),", or, ",(0,o.jsx)(t.code,{children:"democracy(Cancelled)"})," events citing the index.\nIf ",(0,o.jsx)(t.code,{children:"Passed"}),", you need to look at the ",(0,o.jsx)(t.code,{children:"scheduler(Scheduled)"})," event in the same block for the\nenactment block."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"democracy(PreimageNoted)"})," events with the same hash as the ",(0,o.jsx)(t.code,{children:"ReferendumInfoOf(index)"})," item. This\nmay be up to the last block before execution, but it will not work if this is missing."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"democracy(Executed)"})," events for actual execution. In the case of a runtime upgrade, there will\nalso be a ",(0,o.jsx)(t.code,{children:"system(CodeUpdated)"})," event."]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["You can also monitor ",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/",children:"Polkassembly"})," for discussions on on-chain\nproposals and referenda."]}),"\n",(0,o.jsxs)(t.p,{children:["* E.g. via ",(0,o.jsx)(t.code,{children:"pallets/democracy/storage/ReferendumInfoOf?key1=index&at=blockNumber"})," on Sidecar."]}),"\n",(0,o.jsx)(t.h2,{id:"resources",children:"Resources"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot/wiki/Governance",children:"Initial Governance Description"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/democracy/src",children:"Democracy Pallet"})}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=VsZuDJMmVPY&feature=youtu.be&t=24734",children:"Governance Demo"})," - Dr.\nGavin Wood presents the initial governance structure for Polkadot. (Video)"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://www.crowdcast.io/e/governance-on-polkadot--",children:"Governance on Polkadot"})," - A webinar\nexplaining how governance works in Polkadot and Kusama."]}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(96540),r=n(74848);const s=function(e){var t,n=e.message,s=(0,o.useState)(!0),i=s[0],a=s[1];return(0,r.jsx)(r.Fragment,{children:i&&(0,r.jsxs)("div",{className:"message-box",children:[(0,r.jsx)("button",{className:"close-button",onClick:function(){a(!1)},children:"\u2716 "}),(0,r.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},89005:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/gov1-overview-515a8f55923136c0b6e6bd23bea3d836.png"},96601:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/gov1-timeline-69424fec137182a898f00c29a90fbdb1.png"},87635:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/adaptive-quorum-biasing-18c2e70b6b9d2c3abf563219b11974dc.png"},87507:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/approval-vote-d0622e1c0a9bc7c50ab9f23761488dbe.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>a});var o=n(96540);const r={},s=o.createContext(r);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9913464d.ec11f136.js b/assets/js/9913464d.ec11f136.js deleted file mode 100644 index 4e0e38e961a0..000000000000 --- a/assets/js/9913464d.ec11f136.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5883],{9296:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var o=n(74848),r=n(28453),s=n(67141);const i={id:"learn-governance",title:"Governance V1",sidebar_label:"Governance V1",description:"Polkadot's First Governance Model.",keywords:["governance","referenda","proposal","voting","endorse"],slug:"../learn-governance"},a=void 0,l={id:"learn/archive/learn-governance",title:"Governance V1",description:"Polkadot's First Governance Model.",source:"@site/../docs/learn/archive/learn-governance.md",sourceDirName:"learn/archive",slug:"/learn/learn-governance",permalink:"/docs/learn/learn-governance",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-governance.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727178265e3,frontMatter:{id:"learn-governance",title:"Governance V1",sidebar_label:"Governance V1",description:"Polkadot's First Governance Model.",keywords:["governance","referenda","proposal","voting","endorse"],slug:"../learn-governance"},sidebar:"docs",previous:{title:"Archive",permalink:"/docs/learn-archive"},next:{title:"Gov1 Treasury",permalink:"/docs/learn/learn-treasury"}},c={},d=[{value:"Governance Summary",id:"governance-summary",level:2},{value:"Proposals",id:"proposals",level:2},{value:"Endorsing Proposals",id:"endorsing-proposals",level:3},{value:"Cancelling Proposals",id:"cancelling-proposals",level:3},{value:"Blacklisting Proposals",id:"blacklisting-proposals",level:3},{value:"Referenda",id:"referenda",level:2},{value:"Referenda Timeline",id:"referenda-timeline",level:3},{value:"Public Referenda",id:"public-referenda",level:3},{value:"Council Referenda",id:"council-referenda",level:3},{value:"Alternating Voting Timetable",id:"alternating-voting-timetable",level:3},{value:"Adaptive Quorum Biasing",id:"adaptive-quorum-biasing",level:3},{value:"Example of Adaptive Quorum Biasing",id:"example-of-adaptive-quorum-biasing",level:4},{value:"Enactment",id:"enactment",level:3},{value:"Voting on a Referendum",id:"voting-on-a-referendum",level:2},{value:"Voluntary Locking",id:"voluntary-locking",level:3},{value:"Delegations",id:"delegations",level:3},{value:"Council",id:"council",level:2},{value:"Prime Members",id:"prime-members",level:3},{value:"Technical Committee",id:"technical-committee",level:2},{value:"Frequently Asked Questions",id:"frequently-asked-questions",level:2},{value:"How to be a council member?",id:"how-to-be-a-council-member",level:3},{value:"How can I appeal to the council to enact a change on my behalf?",id:"how-can-i-appeal-to-the-council-to-enact-a-change-on-my-behalf",level:3},{value:"Gov1 Runtime Upgrade Monitoring",id:"gov1-runtime-upgrade-monitoring",level:2},{value:"Resources",id:"resources",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../../learn/learn-polkadot-opengov.md)."}),"\n",(0,o.jsx)(t.p,{children:"Polkadot uses a sophisticated governance mechanism that allows it to evolve gracefully overtime at\nthe ultimate behest of its assembled stakeholders. The stated goal is to ensure that the majority of\nthe stake can always command the network."}),"\n",(0,o.jsxs)(t.p,{children:["Polkadot brings together various novel mechanisms, including an amorphous (abstract) form of\nstate-transition function stored on-chain defined in a platform-agnostic language (i.e.\n",(0,o.jsx)(t.a,{href:"/docs/learn-wasm",children:"WebAssembly"}),"). It also allows for several on-chain voting mechanisms, such as\nreferenda with the novel concept of ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:"Adaptive Quorum Biasing"})," and batch\napproval voting. All changes to the protocol must be agreed upon by stake-weighted referenda."]}),"\n",(0,o.jsxs)(t.p,{children:["To make any changes to the network, the idea is to compose active token holders and the council\ntogether to administrate a network upgrade decision. No matter whether the proposal is proposed by\nthe public (token holders) or the ",(0,o.jsx)(t.a,{href:"#council",children:"Council"}),", it finally will have to go through a vote on\na referendum to let all holders, weighted by stake, make the decision."]}),"\n",(0,o.jsx)(t.h2,{id:"governance-summary",children:"Governance Summary"}),"\n",(0,o.jsx)(t.p,{children:"The figure below shows an overview of Governance V1 with the key actors and different paths for\nsubmitting a proposal that can potentially be voted on as a referendum."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"gov1-overview",src:n(89005).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(t.p,{children:["The public (i.e. token holders) can submit a proposal that gets added to the proposal queue. Here,\nproposals are ",(0,o.jsx)(t.a,{href:"#endorsing-proposals",children:"endorsed"}),", and the one that gets the most support will climb to\nthe top of the queue. When it is time, the proposal at the top of the queue will become a\n",(0,o.jsx)(t.a,{href:"#public-referenda",children:"Public Referendum"}),". For instance, the proposal with 11 endorsements is shown at\nthe top of the queue in the figure, which is ready to become a referendum."]}),"\n",(0,o.jsxs)(t.p,{children:["The public can also submit a ",(0,o.jsx)(t.a,{href:"/docs/learn/learn-treasury#creating-a-treasury-proposal",children:"treasury proposal"}),",\nwhich must be evaluated by the ",(0,o.jsx)(t.a,{href:"#council",children:"Council"})," through a motion. If the Council motion passes,\nthe treasury proposal can be directly executed or go to the external queue, which will be voted on\nthrough a ",(0,o.jsx)(t.a,{href:"#council-referenda",children:"Council Referendum"}),". See the figure's green horizontal path from the\nPublic (green) to the Council (yellow). Treasury proposals and Council proposals can be directly\nexecuted (horizontal yellow arrows) or go to the external queue, where they will become a referendum"]}),"\n",(0,o.jsxs)(t.p,{children:["Note that the external queue always consists of\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/substrate/blob/f4a2e84ee5974b219f2a03cd195105060c41e3cd/frame/democracy/src/lib.rs#LL29C8-L31C4",children:"a single proposal"}),".\nA proposal in the external queue can be fast-tracked by the\n",(0,o.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"})," (light blue). The fast track can contain as many\nproposals as possible (also called emergency proposals) that can be voted on simultaneously with\nwith the referenda introduced either by the Council or the Public. See in the figure the yellow\ncircle (i.e. Council Proposal) exiting the external queue, and the yellow circle with a light-blue\nborder also leaving the queue and being fast-tracked by the Technical Committee (TC). Once empty,\nthe external queue can be filled with another Council proposal."]}),"\n",(0,o.jsxs)(t.p,{children:["The Council can also submit proposals that will end up in the external queue. Voting on Council and\nPublic proposals subject to an ",(0,o.jsx)(t.a,{href:"#alternating-voting-timetable",children:"alternating timetable"}),', shown in the\nfigure as the "on" and "off" toggles on the external and proposal queues. In this example, the\nPublic proposal will be voted on together with the fast-tracked Council Proposal. Voting on\nnon-fast-tracked Council Proposals will be blocked until the alternating timetable switches the\ntoggles, which stops Public proposals from becoming a referenda.']}),"\n",(0,o.jsxs)(t.p,{children:["Referenda will follow an ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:"adaptive quorum biasing"})," mechanism for deciding\nwhether they get enacted, and if they do, they will be executed after an\n",(0,o.jsx)(t.a,{href:"#enactment",children:"enactment period"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"Token holders can delegate their votes (with a conviction multiplier) to another account belonging\nto a trusted entity voting on their behalf."}),"\n",(0,o.jsx)(t.h2,{id:"proposals",children:"Proposals"}),"\n",(0,o.jsx)(t.p,{children:"Referenda can be started in different ways:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Publicly submitted proposals"}),"\n",(0,o.jsx)(t.li,{children:"Proposals submitted by the council, either through a majority or unanimously"}),"\n",(0,o.jsxs)(t.li,{children:["Proposals submitted as part of the ",(0,o.jsx)(t.a,{href:"#enactment",children:"enactment"})," of a prior referendum (i.e. making a\nreferendum to start a new referendum)"]}),"\n",(0,o.jsxs)(t.li,{children:["Emergency proposals submitted by the ",(0,o.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"})," and approved by\nthe ",(0,o.jsx)(t.a,{href:"#council",children:"Council"})]}),"\n"]}),"\n",(0,o.jsx)(t.admonition,{title:"Starting a proposal in Governance V1",type:"info",children:(0,o.jsxs)(t.p,{children:["For more information about how to start a proposal, see the\n",(0,o.jsx)(t.a,{href:"/docs/maintain/maintain-guides-democracy#proposing-an-action",children:"dedicated page"}),"."]})}),"\n",(0,o.jsx)(t.h3,{id:"endorsing-proposals",children:"Endorsing Proposals"}),"\n",(0,o.jsxs)(t.p,{children:["Anyone can submit a proposal by depositing the minimum amount of tokens for a certain period (number\nof blocks). If someone agrees with the proposal, they may deposit the same amount of tokens to\nsupport it - this action is called\n",(0,o.jsx)(t.a,{href:"/docs/maintain/maintain-guides-democracy#endorsing-a-proposal",children:(0,o.jsx)(t.em,{children:"endorsing"})}),". The\nproposal with the highest amount of bonded support will be selected to be a referendum in the next\nvoting cycle based on an ",(0,o.jsx)(t.a,{href:"#alternating-voting-timetable",children:"alternating voting timetable"}),"."]}),"\n",(0,o.jsx)(t.h3,{id:"cancelling-proposals",children:"Cancelling Proposals"}),"\n",(0,o.jsxs)(t.p,{children:["A proposal can be canceled if the ",(0,o.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"})," unanimously agrees to\ndo so or if Root Origin (e.g. sudo) triggers this functionality. A canceled proposal's deposit is\nburned."]}),"\n",(0,o.jsx)(t.p,{children:"Additionally, a two-thirds majority of the council can cancel a referendum. This may function as a\nlast-resort if there is an issue found late in a referendum's proposal, such as a bug in the code of\nthe runtime that the proposal would institute."}),"\n",(0,o.jsxs)(t.p,{children:["If the cancellation is controversial enough that the council cannot get a two-thirds majority, then\nit will be left to the stakeholders ",(0,o.jsx)(t.em,{children:"en masse"})," to determine the proposal\u2019s fate."]}),"\n",(0,o.jsx)(t.h3,{id:"blacklisting-proposals",children:"Blacklisting Proposals"}),"\n",(0,o.jsxs)(t.p,{children:["A proposal can be blacklisted by Root Origin (e.g. sudo). A blacklisted proposal and its related\nreferendum (if any) are immediately ",(0,o.jsx)(t.a,{href:"#canceling",children:"canceled"}),". Additionally, a blacklisted proposal's\nhash cannot re-appear in the proposal queue. Blacklisting is useful when removing erroneous\nproposals that could be submitted with the same hash."]}),"\n",(0,o.jsx)(t.p,{children:"Upon seeing their proposal removed, a submitter who is not properly introduced to the democracy\nsystem of Polkadot might be tempted to re-submit the same proposal. That said, this is far from a\nfool-proof method of preventing invalid proposals from being submitted - a single changed character\nin a proposal's text will also change the hash of the proposal, rendering the per-hash blacklist\ninvalid."}),"\n",(0,o.jsx)(t.h2,{id:"referenda",children:"Referenda"}),"\n",(0,o.jsxs)(t.p,{children:["Referenda are simple, inclusive, stake-based voting schemes. Each referendum has a specific proposal\nthat takes the form of a ",(0,o.jsx)(t.strong,{children:"privileged function"})," call in the runtime. That function includes the\nmost powerful ",(0,o.jsx)(t.strong,{children:"call"}),": ",(0,o.jsx)(t.code,{children:"set_code"}),', which can switch out the entire runtime code, achieving what\nwould otherwise require a "hard fork".']}),"\n",(0,o.jsx)(t.p,{children:'Referenda are discrete events, have a fixed period where voting happens, and then are tallied, and\nthe function call is executed if the vote is approved. Referenda are always binary: your only\noptions in voting are "aye", "nay", or abstaining entirely.'}),"\n",(0,o.jsx)(t.h3,{id:"referenda-timeline",children:"Referenda Timeline"}),"\n",(0,o.jsx)(t.p,{children:"The structure of the timeline for all referenda is the same regardless of who initiates the\nproposal, although the timeline length can vary (see below)."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"gov1-timeline",src:n(96601).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(t.p,{children:"The figure above provides a summary view of the referenda timeline for Governance V1."}),"\n",(0,o.jsxs)(t.p,{children:["In (1), the proposal is submitted, and the Launch Period starts. During this period of indefinite\nlength the voters can ",(0,o.jsx)(t.a,{href:"#endorsing-proposals",children:"endorse"})," proposals by bonding the same amount of tokens\nused by the depositor. Deposited tokens for endorsement will be returned once the proposal becomes a\nreferendum. During the launch period, the proposal will compete with other proposals, and the one\nthat gets to the top will be selected for a referendum when the next voting period starts."]}),"\n",(0,o.jsx)(t.p,{children:"The figure shows that the launch period is shown with a fixed length. Still, it varies depending on\nwho initiated the proposal and how many proposals there are in the pipeline. Council motions will\nlikely have a short launch period when compared to the public referenda which might take longer\nunless they are the only ones in the pipeline."}),"\n",(0,o.jsxs)(t.p,{children:["In (2), the proposal is selected for a referendum. Proposals initiated by the public will become a\n",(0,o.jsx)(t.a,{href:"#public-referenda",children:"public referendum"}),", while those initiated by the council will become\n",(0,o.jsx)(t.a,{href:"#council-referenda",children:"council referenda"}),". The voting period lasts 28 days (7 days on Kusama), after\nwhich, if the proposal is approved, it will go through an enactment period. Rejected proposals will\nneed to start from (1). Note that Governance V1 uses an\n",(0,o.jsx)(t.a,{href:"#alternating-voting-timetable",children:"alternating voting timeline"})," where voters can vote either for a\npublic proposal or a council motion every 28 days (7 days on Kusama)."]}),"\n",(0,o.jsxs)(t.p,{children:["In (3), the proposal is approved and moves through the ",(0,o.jsx)(t.a,{href:"#enactment",children:"enactment period"})," that can be of\ndifferent lengths depending on who initiated the proposal in the first place, with emergency\nproposals being the fastest ones and the only ones that can be voted simultaneously with other\nreferenda."]}),"\n",(0,o.jsx)(t.h3,{id:"public-referenda",children:"Public Referenda"}),"\n",(0,o.jsxs)(t.p,{children:["Public referenda will have a ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:(0,o.jsx)(t.strong,{children:"positive turnout bias"})}),", meaning that\nthey will require a heavy supermajority of ",(0,o.jsx)(t.em,{children:"aye"})," votes to pass at low turnouts but as turnout\nincreases towards 100%, it will require a simple majority of ",(0,o.jsx)(t.em,{children:"aye"})," votes to pass (i.e. 51% wins)."]}),"\n",(0,o.jsx)(t.p,{children:"Note that the bonded tokens will be released once the proposal is tabled (that is, brought to a\nvote), and a maximum of 100 public proposals can be in the proposal queue."}),"\n",(0,o.jsx)(t.admonition,{title:"turnout",type:"info",children:(0,o.jsxs)(t.p,{children:["The total number of voting tokens excluding conviction or ",(0,o.jsx)(t.a,{href:"#voluntary-locking",children:"voluntary locking"}),"."]})}),"\n",(0,o.jsx)(t.h3,{id:"council-referenda",children:"Council Referenda"}),"\n",(0,o.jsxs)(t.p,{children:["Unanimous Council - When all council members agree on a proposal, it can be moved to a referendum\nwith a ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:(0,o.jsx)(t.strong,{children:"negative turnout bias"})}),". Briefly, it will require a heavy\nsupermajority of ",(0,o.jsx)(t.em,{children:"nay"})," votes to reject at low turnouts, but as turnout increases towards 100%, it\nwill require a simple majority of ",(0,o.jsx)(t.em,{children:"nay"})," votes to fail (i.e. 51% wins)."]}),"\n",(0,o.jsxs)(t.p,{children:["Majority Council - When agreement from only a simple majority of council members occurs, the\nreferendum will need ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:(0,o.jsx)(t.strong,{children:"simple majority"})})," to pass."]}),"\n",(0,o.jsx)(t.admonition,{title:"Public- vs. Council-initiated Referenda",type:"info",children:(0,o.jsx)(t.p,{children:"Public referenda must be agreed upon using a positive bias to mitigate attacks by malicious or\nill-conceived proposals. Conversely, when a proposal is unanimously voted in favor by the council,\nit benefits from using the negative bias. We assume low turnout is less problematic if the council\nproposes a referendum. Also, the council members are elected by the community and have strong\ntechnical as well as functional knowledge about the system, and we assume solid justifications back\nchanges proposed by the council."})}),"\n",(0,o.jsx)(t.h3,{id:"alternating-voting-timetable",children:"Alternating Voting Timetable"}),"\n",(0,o.jsx)(t.p,{children:"All referenda are executed by Root Origin. It follows that multiple referenda cannot be voted upon\nin the same period, excluding emergency referenda. An emergency referendum occurring at the same\ntime as a regular referendum (either public- or council-proposed) is the only time multiple\nreferenda can be voted on."}),"\n",(0,o.jsxs)(t.p,{children:["Every 28 days (7 days on Kusama), a new referendum will come up for a vote, assuming there is at\nleast one proposal in one of the queues. There is a queue for Council-approved proposals and a queue\nfor publicly-submitted proposals. The referendum to be voted upon alternates between the top\nproposal in the two queues, where the proposals' rank is based on\n",(0,o.jsx)(t.a,{href:"#endorsing-proposals",children:"endorsement"})," (i.e. bonded tokens)."]}),"\n",(0,o.jsx)(t.h3,{id:"adaptive-quorum-biasing",children:"Adaptive Quorum Biasing"}),"\n",(0,o.jsxs)(t.p,{children:["Polkadot introduces the concept of ",(0,o.jsx)(t.strong,{children:"Adaptive Quorum Biasing"}),", which is used to alter the effective\nsuper-majority required to make it easier or more difficult for a proposal to pass depending on\nvoting power (turnout) and origin (Council or public)."]}),"\n",(0,o.jsx)(t.p,{children:"Adaptive Quorum Biasing creates three tallying mechanisms: majority carry, super-majority approve,\nand super-majority against. They all equate to a simple majority-carry system at 100% turnout. Their\nselection depends on which entity proposed the proposal and whether all Council members voted yes\n(in the case of Council Referenda)."}),"\n",(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Entity"})}),(0,o.jsx)(t.th,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Metric"})})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Public"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Positive Turnout Bias (Super-Majority Approve)"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Council (Complete agreement)"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Negative Turnout Bias (Super-Majority Against)"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Council (Majority agreement)"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Simple Majority"})]})]})]}),"\n",(0,o.jsx)(t.p,{children:"Let's use the image below as an example."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"adaptive-quorum-biasing",src:n(87635).A+"",width:"537",height:"439"})}),"\n",(0,o.jsxs)(t.p,{children:["If a publicly submitted referendum only has a 25% turnout, the tally of ",(0,o.jsx)(t.em,{children:"aye"})," votes has to reach 66%\nfor it to pass since we applied ",(0,o.jsx)(t.strong,{children:"Positive Turnout Bias"}),". In contrast, when it has a 75% turnout,\nthe tally of ",(0,o.jsx)(t.em,{children:"aye"})," votes has to reach 54%, which means that the super-majority required decreases as\nthe turnout increases. A positive turnout bias, whereby a heavy super-majority of aye votes is\nrequired to carry at low turnouts. However, as turnout increases towards 100%, it becomes a simple\nmajority carry as below."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7Bagainst&space;%5Cover&space;%5Csqrt%7Bturnout%7D%7D&space;%3C&space;%7Bapprove&space;%5Cover&space;%5Csqrt%7Belectorate%7D%7D",alt:""})}),"\n",(0,o.jsxs)(t.p,{children:["Where ",(0,o.jsx)(t.code,{children:"approve"})," is the number of ",(0,o.jsx)(t.em,{children:"aye"})," votes, ",(0,o.jsx)(t.code,{children:"against"})," is the number of ",(0,o.jsx)(t.em,{children:"nay"})," votes, ",(0,o.jsx)(t.code,{children:"turnout"})," is\nthe total number of voting tokens excluding ",(0,o.jsx)(t.a,{href:"#voluntary-locking",children:"voluntary locking"}),", and\n",(0,o.jsx)(t.code,{children:"electorate"})," is the total number of tokens issued in the network."]}),"\n",(0,o.jsxs)(t.p,{children:["When the council proposes a new proposal through unanimous consent, the referendum would be put to\nthe vote using ",(0,o.jsx)(t.strong,{children:"Negative Turnout Bias"}),". Referring to the above image, when a Council referendum\nonly has a 25% turnout, the tally of ",(0,o.jsx)(t.em,{children:"aye"})," votes has to reach 34% for it to pass, while if the\nturnout increases to 75%, the tally of ",(0,o.jsx)(t.em,{children:"aye"})," votes has to reach 46%. A negative turnout bias\nrequires a heavy super-majority of ",(0,o.jsx)(t.em,{children:"nay"})," votes to reject at low turnouts. However, as turnout\nincreases towards 100%, it becomes a simple majority carry as below."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7Bagainst&space;%5Cover&space;%5Csqrt%7Belectorate%7D%7D&space;%3C&space;%7Bapprove&space;%5Cover&space;%5Csqrt%7Bturnout%7D%7D",alt:""})}),"\n",(0,o.jsxs)(t.p,{children:["In short, when the turnout rate is low, a super-majority is required to reject the proposal, which\nmeans a lower threshold of ",(0,o.jsx)(t.em,{children:"aye"})," votes must be reached. As turnout increases toward 100%, it becomes\na simple majority, a simple comparison of votes. If there are more ",(0,o.jsx)(t.em,{children:"aye"})," votes than ",(0,o.jsx)(t.em,{children:"nay"}),", then the\nproposal is carried, no matter how much stake votes on the proposal."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7Bapprove%7D&space;%3E&space;%7Bagainst%7D",alt:""})}),"\n",(0,o.jsxs)(t.p,{children:["To know more about where these above formulas come from, please read the\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/democracy/src/vote_threshold.rs",children:"democracy pallet"}),"."]}),"\n",(0,o.jsx)(t.h4,{id:"example-of-adaptive-quorum-biasing",children:"Example of Adaptive Quorum Biasing"}),"\n",(0,o.jsx)(t.p,{children:"Let's assume we only have 1,500 DOT tokens in total and that this is a public proposal."}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"John: 500 DOT"}),"\n",(0,o.jsx)(t.li,{children:"Peter: 100 DOT"}),"\n",(0,o.jsx)(t.li,{children:"Lilly: 150 DOT"}),"\n",(0,o.jsx)(t.li,{children:"JJ: 150 DOT"}),"\n",(0,o.jsx)(t.li,{children:"Ken: 600 DOT"}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["John: Votes ",(0,o.jsx)(t.code,{children:"Yes"})," for a 4 week lock period => 500 x 1 = 500 Votes"]}),"\n",(0,o.jsxs)(t.p,{children:["Peter: Votes ",(0,o.jsx)(t.code,{children:"Yes"})," for a 4 week lock period => 100 x 1 = 100 Votes"]}),"\n",(0,o.jsxs)(t.p,{children:["JJ: Votes ",(0,o.jsx)(t.code,{children:"No"})," for a 16 week lock period => 150 x 3 = 450 Votes"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"approve = 600 Votes"}),"\n",(0,o.jsx)(t.li,{children:"against = 450 Votes"}),"\n",(0,o.jsx)(t.li,{children:"turnout = 750 Votes"}),"\n",(0,o.jsx)(t.li,{children:"electorate = 1500 Votes"}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%5Cfrac%7B450%7D%7B%5Csqrt%7B750%7D%7D&space;%3C&space;%5Cfrac%7B600%7D%7B%5Csqrt%7B1500%7D%7D",alt:""})}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{src:"https://latex.codecogs.com/svg.latex?%5Clarge&space;%7B16.432%7D&space;%3C&space;%7B15.492%7D",alt:""})}),"\n",(0,o.jsxs)(t.p,{children:["Since the above example is a public referendum, ",(0,o.jsx)(t.strong,{children:"Super-Majority Approve"})," would be used to\ncalculate the result. Super-Majority Approve requires more ",(0,o.jsx)(t.em,{children:"aye"})," votes to pass the referendum when\nturnout is low; therefore, based on the above result, the referendum will be rejected."]}),"\n",(0,o.jsx)(t.admonition,{title:"only the winning voter's tokens are locked.",type:"info",children:(0,o.jsxs)(t.p,{children:["If the voters on the losing side of the referendum believe that the outcome will have adverse\neffects, their tokens are transferrable, so they will not be locked into the decision. Winning\nproposals are autonomously enacted after the ",(0,o.jsx)(t.a,{href:"#enactment",children:"enactment period"}),"."]})}),"\n",(0,o.jsx)(t.h3,{id:"enactment",children:"Enactment"}),"\n",(0,o.jsxs)(t.p,{children:["Referenda are considered ",(0,o.jsx)(t.em,{children:"baked"})," if they are closed and tallied. Assuming a referendum is approved,\nit will be scheduled for ",(0,o.jsx)(t.strong,{children:"enactment"}),". Referenda are considered ",(0,o.jsx)(t.em,{children:"unbaked"})," if they are pending an\noutcome, i.e. being voted on."]}),"\n",(0,o.jsxs)(t.p,{children:["All referenda are associated with an enactment delay or ",(0,o.jsx)(t.strong,{children:"enactment period"}),". This is the period\nbetween a referendum ending and (assuming it was approved) the changes being enacted."]}),"\n",(0,o.jsx)(t.p,{children:'For public and Council referenda, the enactment period is a fixed time of 28 days (8 days on\nKusama). For proposals submitted as part of the enactment of a prior referendum, it can be set as\ndesired. Emergency proposals deal with major problems with the network and need to be\n"fast-tracked". These will have a shorter enactment period.'}),"\n",(0,o.jsx)(t.h2,{id:"voting-on-a-referendum",children:"Voting on a Referendum"}),"\n",(0,o.jsx)(t.p,{children:"To vote, a voter generally must lock their tokens up for at least the enactment period beyond the\nend of the referendum. This is to ensure that some minimal economic buy-in to the result is needed\nand to dissuade vote selling."}),"\n",(0,o.jsx)(t.admonition,{title:"Referenda explainer video",type:"note",children:(0,o.jsxs)(t.p,{children:["To learn more about voting on referenda, please check out our\n",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=BkbhhlsezGA&list=PLOyWqupZ-WGuAuS00rK-pebTMAOxW41W8&index=31&ab_channel=Polkadot",children:"technical explainer video"}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:["It is possible to vote without locking, but your vote is worth a small fraction of a normal vote,\ngiven your stake. At the same time, holding only a small amount of tokens does not mean that the\nholder cannot influence the referendum result, thanks to time-locking or ",(0,o.jsx)(t.strong,{children:"voluntary locking"})," (see\nbelow)."]}),"\n",(0,o.jsx)(t.h3,{id:"voluntary-locking",children:"Voluntary Locking"}),"\n",(0,o.jsx)(t.admonition,{title:"Voluntary Locking",type:"info",children:(0,o.jsxs)(t.p,{children:["For more information about voluntary locking or conviction voting see\n",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov#voluntary-locking",children:"Polkadot OpenGov"}),"."]})}),"\n",(0,o.jsx)(t.h3,{id:"delegations",children:"Delegations"}),"\n",(0,o.jsxs)(t.p,{children:["In Polkadot, you can\n",(0,o.jsx)(t.a,{href:"/docs/maintain/maintain-guides-democracy#delegate-a-vote",children:"delegate your voting power"})," to\nanother account you trust if you are not willing to stay up-to-date with all referenda."]}),"\n",(0,o.jsxs)(t.p,{children:["You can also use a ",(0,o.jsx)(t.a,{href:"/docs/learn-proxies#governance-proxy",children:"governance proxy"})," to vote on behalf of\nyour stash account. The proxy can be yours, or you can authorize a third-party governance proxy to\nvote with your stash. Learn more from the ",(0,o.jsx)(t.a,{href:"/docs/learn-proxies",children:"dedicated page on Proxy Accounts"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"council",children:"Council"}),"\n",(0,o.jsx)(t.p,{children:'To represent passive stakeholders, Polkadot introduces the idea of a "council". The council is an\non-chain entity comprising several actors, each represented as an on-chain account. The Polkadot\ncouncil consists of 13 members (19 on Kusama).'}),"\n",(0,o.jsxs)(t.p,{children:["Along with ",(0,o.jsx)(t.a,{href:"/docs/learn/learn-treasury",children:"controlling the treasury"}),", the council is called upon primarily for\nthree tasks of governance:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Proposing sensible referenda"}),"\n",(0,o.jsx)(t.li,{children:"Cancelling uncontroversially dangerous or malicious referenda"}),"\n",(0,o.jsxs)(t.li,{children:["Electing the ",(0,o.jsx)(t.a,{href:"#technical-committee",children:"Technical Committee"}),"."]}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"For a referendum to be proposed by the council, a strict majority of members must be in favor, with\nno member exercising a veto. Vetoes may be exercised only once by a member for any single proposal.\nIf the proposal is resubmitted after a cool-down period, they may not veto it a second time."}),"\n",(0,o.jsxs)(t.p,{children:["Council motion that pass with a 3/5 (60%) super-majority - but without reaching unanimous support -\nwill move to a public referendum under a neutral, majority-carries voting scheme. In the case that\nall members of the council that voted are in favor of a motion, the vote is considered unanimous and\nbecomes a referendum with ",(0,o.jsx)(t.a,{href:"#adaptive-quorum-biasing",children:"negative turnout bias"}),"."]}),"\n",(0,o.jsx)(t.admonition,{title:"Explainer video on the Council",type:"note",children:(0,o.jsxs)(t.p,{children:["For more information, check out our\n",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=837Vv3gdRzI",children:"video explainer on Council"})]})}),"\n",(0,o.jsx)(t.h3,{id:"prime-members",children:"Prime Members"}),"\n",(0,o.jsxs)(t.p,{children:["The council, being an instantiation of\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/collective",children:"Substrate's Collective pallet"}),",\nimplements what's called a ",(0,o.jsx)(t.em,{children:"prime member"})," whose vote acts as the default for other members that fail\nto vote before the timeout."]}),"\n",(0,o.jsxs)(t.p,{children:["The prime member is chosen based on a ",(0,o.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Borda_count",children:"Borda count"}),"."]}),"\n",(0,o.jsx)(t.p,{children:'The purpose of having a prime council member is to ensure a quorum, even when several members\nabstain from a vote. Council members might be tempted to vote a "soft rejection" or a "soft\napproval" by not voting and letting the others vote. The existence of a prime member forces\ncouncilors to be explicit in their votes or have their vote counted for whatever is voted on by the\nprime.'}),"\n",(0,o.jsx)(t.h2,{id:"technical-committee",children:"Technical Committee"}),"\n",(0,o.jsxs)(t.p,{children:["The Technical Committee(TC) was introduced in the\n",(0,o.jsx)(t.a,{href:"https://polkadot.network/kusama-rollout-and-governance/",children:"Kusama rollout and governance post"})," as one\nof the three chambers of Kusama governance (along with the Council and the Referendum chamber). The\nTC is composed of the teams that have successfully implemented or specified either a Polkadot\nruntime or Polkadot Host. Teams are added or removed from the TC via a simple majority vote of the\n",(0,o.jsx)(t.a,{href:"#council",children:"Council"}),"."]}),"\n",(0,o.jsx)(t.p,{children:'The TC aims to safeguard against malicious referenda, implement bug fixes, reverse faulty runtime\nupdates, or add new but battle-tested features. The TC can fast-track proposals using the Democracy\npallet and is the only origin that can trigger the fast-tracking functionality. We can think of the\nTC as a "unique origin" that cannot generate proposals but fast-track existing ones.'}),"\n",(0,o.jsx)(t.p,{children:"Fast-tracked referenda are the only referenda that can be active alongside another active\nreferendum. Thus, with fast-tracked referenda, it is possible to have two active referendums\nsimultaneously. Voting on one does not prevent a user from voting on the other."}),"\n",(0,o.jsx)(t.h2,{id:"frequently-asked-questions",children:"Frequently Asked Questions"}),"\n",(0,o.jsx)(t.h3,{id:"how-to-be-a-council-member",children:"How to be a council member?"}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"approval-vote",src:n(87507).A+"",width:"850",height:"340"})}),"\n",(0,o.jsx)(t.p,{children:"All stakeholders can signal their approval of any of the registered candidates."}),"\n",(0,o.jsxs)(t.p,{children:["Council elections are handled by the same ",(0,o.jsx)(t.a,{href:"/docs/learn-phragmen",children:"Phragm\xe9n election"})," process that\nselects validators from the available pool based on nominations. However, token holders' votes for\ncouncilors are isolated from any nominations they may have on validators. Council terms last for one\nweek on Polkadot and one day day on Kusama."]}),"\n",(0,o.jsxs)(t.p,{children:["At the end of each term, ",(0,o.jsx)(t.a,{href:"../learn-phragmen#algorithm",children:"Phragm\xe9n election algorithm"})," runs and the\nresult will choose the new councilors based on the vote configurations of all voters. The election\nalso chooses a set number of runners-up, which is 20 on Polkadot (12 on Kusama), that will remain in\nthe queue with their votes intact."]}),"\n",(0,o.jsx)(t.p,{children:'As opposed to a "first-past-the-post" electoral system, where voters can only vote for a single\ncandidate from a list, a Phragm\xe9n election is a more expressive way to include each voter\u2019s views.\nToken holders can treat it as a way to support as many candidates as they want. The election\nalgorithm will find a fair subset of the candidates that most closely matches the expressed\nindications of the electorate as a whole.'}),"\n",(0,o.jsx)(t.p,{children:"Let's take a look at the example below."}),"\n",(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{style:{textAlign:"center"},children:"Round 1"}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Token Holders"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Candidates"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"A"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"B"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"C"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"D"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"E"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Peter"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Alice"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Bob"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Kelvin"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Total"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"2"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"1"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"3"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"2"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"2"})]})]})]}),"\n",(0,o.jsx)(t.p,{children:"The above example shows that candidate C wins the election in round 1, while candidates A, B, D & E\nkeep remaining on the candidates' list for the next round."}),"\n",(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{style:{textAlign:"center"},children:"Round 2"}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}}),(0,o.jsx)(t.th,{style:{textAlign:"center"}})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Token Holders"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Candidates"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"A"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"B"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"D"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"E"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Peter"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Alice"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Bob"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"Kelvin"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"X"}),(0,o.jsx)(t.td,{style:{textAlign:"center"}}),(0,o.jsx)(t.td,{style:{textAlign:"center"}})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{style:{textAlign:"center"},children:(0,o.jsx)(t.strong,{children:"Total"})}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"4"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"4"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"1"}),(0,o.jsx)(t.td,{style:{textAlign:"center"},children:"1"})]})]})]}),"\n",(0,o.jsx)(t.p,{children:"The top-N (say 4 in this example) runners-up can remain, and their votes persist until the next\nelection. After round 2, even though candidates A & B get the same number of votes in this round,\ncandidate A gets elected because after adding the older unused approvals, it is higher than B."}),"\n",(0,o.jsx)(t.h3,{id:"how-can-i-appeal-to-the-council-to-enact-a-change-on-my-behalf",children:"How can I appeal to the council to enact a change on my behalf?"}),"\n",(0,o.jsxs)(t.p,{children:["In some circumstances, you may want to appeal to the on-chain council to enact a change on your\nbehalf. One example of this circumstance is the case of lost or locked funds when the funds were\nlost due to a human interface error (such as inputting an address for another network). Another\nexample is if you participated in the 2017 Polkadot ICO with a multi-sig address which now does not\nlet you sign a message easily. When these circumstances can be proven beyond a reasonable doubt to\nbe an error, the council ",(0,o.jsx)(t.em,{children:"may"})," consider a governance motion to correct it."]}),"\n",(0,o.jsxs)(t.p,{children:["The first step to appeal to the council is to contact the councilors. There is no singular place\nwhere you are guaranteed to grab every councilor\u2019s ear with your message. However, there are\n",(0,o.jsx)(t.a,{href:"/docs/community",children:"a handful of good places"})," to start where you can get the attention of\nsome of them. After creating an account and joining this room, you can post a well-thought-through\nmessage here that lays down your case and justifies why you think the council should consider\nenacting a change to the protocol on your behalf."]}),"\n",(0,o.jsxs)(t.p,{children:["At some point, you will likely need a place for a longer-form discussion. For this, making a post on\n",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/",children:"Polkassembly"})," is the recommended place to do so. When you write\na post on Polkassembly, present all the evidence for your circumstances and state clearly what kind\nof change you would suggest to the councilors to enact."]}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsx)(t.p,{children:"Remember, the councilors do not need to make the change, it is your responsibility to make a strong\ncase for why the change should be made."})}),"\n",(0,o.jsx)(t.h2,{id:"gov1-runtime-upgrade-monitoring",children:"Gov1 Runtime Upgrade Monitoring"}),"\n",(0,o.jsx)(t.p,{children:"Monitor the chain for:"}),"\n",(0,o.jsxs)(t.ol,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"democracy(Started)"})," events and log ",(0,o.jsx)(t.code,{children:"index"})," and ",(0,o.jsx)(t.code,{children:"blockNumber"}),". This event indicates that a\nreferendum has started (although it does not mean it is a runtime upgrade). Get the referendum\ninfo*; it should have a status of ",(0,o.jsx)(t.code,{children:"Ongoing"}),". Find the ending block number (",(0,o.jsx)(t.code,{children:"end"}),") and the\nenactment ",(0,o.jsx)(t.code,{children:"delay"})," (delay). If the referendum passes, it will execute on block number\n",(0,o.jsx)(t.code,{children:"end + delay"}),"."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"democracy(Passed)"}),", ",(0,o.jsx)(t.code,{children:"democracy(NotPassed)"}),", or, ",(0,o.jsx)(t.code,{children:"democracy(Cancelled)"})," events citing the index.\nIf ",(0,o.jsx)(t.code,{children:"Passed"}),", you need to look at the ",(0,o.jsx)(t.code,{children:"scheduler(Scheduled)"})," event in the same block for the\nenactment block."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"democracy(PreimageNoted)"})," events with the same hash as the ",(0,o.jsx)(t.code,{children:"ReferendumInfoOf(index)"})," item. This\nmay be up to the last block before execution, but it will not work if this is missing."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"democracy(Executed)"})," events for actual execution. In the case of a runtime upgrade, there will\nalso be a ",(0,o.jsx)(t.code,{children:"system(CodeUpdated)"})," event."]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["You can also monitor ",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/",children:"Polkassembly"})," for discussions on on-chain\nproposals and referenda."]}),"\n",(0,o.jsxs)(t.p,{children:["* E.g. via ",(0,o.jsx)(t.code,{children:"pallets/democracy/storage/ReferendumInfoOf?key1=index&at=blockNumber"})," on Sidecar."]}),"\n",(0,o.jsx)(t.h2,{id:"resources",children:"Resources"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot/wiki/Governance",children:"Initial Governance Description"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/democracy/src",children:"Democracy Pallet"})}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=VsZuDJMmVPY&feature=youtu.be&t=24734",children:"Governance Demo"})," - Dr.\nGavin Wood presents the initial governance structure for Polkadot. (Video)"]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"https://www.crowdcast.io/e/governance-on-polkadot--",children:"Governance on Polkadot"})," - A webinar\nexplaining how governance works in Polkadot and Kusama."]}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(96540),r=n(74848);const s=function(e){var t,n=e.message,s=(0,o.useState)(!0),i=s[0],a=s[1];return(0,r.jsx)(r.Fragment,{children:i&&(0,r.jsxs)("div",{className:"message-box",children:[(0,r.jsx)("button",{className:"close-button",onClick:function(){a(!1)},children:"\u2716 "}),(0,r.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},89005:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/gov1-overview-515a8f55923136c0b6e6bd23bea3d836.png"},96601:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/gov1-timeline-69424fec137182a898f00c29a90fbdb1.png"},87635:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/adaptive-quorum-biasing-18c2e70b6b9d2c3abf563219b11974dc.png"},87507:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/approval-vote-d0622e1c0a9bc7c50ab9f23761488dbe.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>a});var o=n(96540);const r={},s=o.createContext(r);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9f804621.af321897.js b/assets/js/9f804621.af321897.js new file mode 100644 index 000000000000..bcd9101fe2ec --- /dev/null +++ b/assets/js/9f804621.af321897.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[1431],{92415:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>c,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var o=n(74848),s=n(28453),a=(n(47379),n(11470),n(19365),n(3514)),r=n(67141);const i={id:"learn-guides-accounts",title:"Polkadot-JS Guides about Accounts",sidebar_label:"Account Guides",description:"Polkadot-JS Guides about Accounts",keyword:["guides","polkadot-js","accounts"],slug:"../learn-guides-accounts"},c=void 0,l={id:"learn/learn-guides-accounts",title:"Polkadot-JS Guides about Accounts",description:"Polkadot-JS Guides about Accounts",source:"@site/../docs/learn/learn-guides-accounts.md",sourceDirName:"learn",slug:"/learn-guides-accounts",permalink:"/docs/learn-guides-accounts",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-accounts",title:"Polkadot-JS Guides about Accounts",sidebar_label:"Account Guides",description:"Polkadot-JS Guides about Accounts",keyword:["guides","polkadot-js","accounts"],slug:"../learn-guides-accounts"},sidebar:"docs",previous:{title:"Polkadot-JS Guides",permalink:"/docs/learn-polkadot-js-guides"},next:{title:"Multisig Guides",permalink:"/docs/learn-guides-accounts-multisig"}},u={},d=[{value:"Account Address Format",id:"account-address-format",level:2},{value:"Polkadot-JS Browser Extension",id:"polkadot-js-browser-extension",level:2},{value:"Account Backup using the Polkadot-JS Browser Extension",id:"account-backup-using-the-polkadot-js-browser-extension",level:3},{value:"Reset Password using the Polkadot-JS Browser Extension",id:"reset-password-using-the-polkadot-js-browser-extension",level:3},{value:"Restore Account on the Polkadot-JS Browser Extension",id:"restore-account-on-the-polkadot-js-browser-extension",level:3},{value:"Polkadot-JS UI",id:"polkadot-js-ui",level:2},{value:"Account Backup using the Polkadot-JS UI",id:"account-backup-using-the-polkadot-js-ui",level:3},{value:"Reset password using the Polkadot-JS UI",id:"reset-password-using-the-polkadot-js-ui",level:3},{value:"Restore Account on the Polkadot-JS UI",id:"restore-account-on-the-polkadot-js-ui",level:3},{value:"Unlocking Locks",id:"unlocking-locks",level:3},{value:"Query Account Data in Polkadot-JS",id:"query-account-data-in-polkadot-js",level:2},{value:"Vanity Generator",id:"vanity-generator",level:2},{value:"Encryption Enhancement",id:"encryption-enhancement",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsx)(a.A,{}),"\n",(0,o.jsx)(t.h2,{id:"account-address-format",children:"Account Address Format"}),"\n",(0,o.jsxs)(t.p,{children:["An account created on the relay chain can also be used on multiple chains in the ecosystem. More\nspecifically, the account of a chain that uses the ",(0,o.jsx)(t.code,{children:"*25519"})," account address format (the latest list\ncan be accessed on the\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json",children:"ss58 registry repository"}),")\nis cross-compatible with all the chains that use the similar format. To switch between the accounts\non different chains, you can follow the guidelines in\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000103707-can-i-use-the-same-account-on-polkadot-kusama-and-parachains-",children:"this support article"}),".\n",(0,o.jsx)(t.a,{href:"https://polkadot.subscan.io/tools/format_transform",children:"Subscan has a tool"})," you can use to convert your\naddress between the different chain formats."]}),"\n",(0,o.jsxs)(t.admonition,{title:"Using the same account on multiple chains - Pros and Cons",type:"info",children:[(0,o.jsx)(t.p,{children:"The address format differs from chain to chain, but that difference is only visual. The same private\nkey can be used to sign transactions on behalf of the respective accounts on multiple chains. Using\na single account on multiple chains is convenient, as you do not have to deal with multiple mnemonic\nphrases or private keys. But, if your account gets compromised on one chain, the attacker can gain\nfull access to the accounts on all other chains. This also has implications for the account holder's\nprivacy, as knowing the identity of an account on one chain can expose the account holder's identity\non all the chains. In the Accounts tab, the Polkadot-JS UI displays a warning message next to each\nAccount you are using on multiple chains and recommends using different Accounts on different chains\n(see below)."}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"warning multiple chains",src:n(36105).A+"",width:"1103",height:"343"})})]}),"\n",(0,o.jsx)(t.p,{children:'On Polkadot-JS Extension, you can copy your address by clicking the account\'s icon while the desired\nchain format is active. E.g. selecting "Substrate" as the format will change your address, and\nclicking the colorful icon of your account will copy it in that format.'}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-browser-extension",children:"Polkadot-JS Browser Extension"}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=DNU0p5G0Gqc",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/DNU0p5G0Gqc/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=DNU0p5G0Gqc",children:"Polkadot-JS Browser Extension Tutorial"})})]})}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["For guidelines about how to create an account using the Polkadot Extension, see\n",(0,o.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000098878-how-to-create-a-dot-account",children:(0,o.jsx)(t.strong,{children:"this support article"})}),"."]})}),"\n",(0,o.jsx)(t.p,{children:"The Polkadot-JS Browser Extension (the Polkadot Extension) provides a reasonable balance of security\nand usability. It provides a separate local mechanism to generate your address and interact with\nPolkadot."}),"\n",(0,o.jsx)(t.p,{children:'This method involves installing the Polkadot Extension and using it as a \u201cvirtual vault," separate\nfrom your browser, to store your private keys. It also allows the signing of transactions and\nsimilar functionality.'}),"\n",(0,o.jsx)(t.p,{children:"It is still running on the same computer you use to connect to the internet and thus is less secure\nthan using Parity Signer or other air-gapped approaches."}),"\n",(0,o.jsx)(t.h3,{id:"account-backup-using-the-polkadot-js-browser-extension",children:"Account Backup using the Polkadot-JS Browser Extension"}),"\n",(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000177677-how-to-export-your-json-backup-file",children:(0,o.jsx)(t.strong,{children:"this support page"})}),"\nto know how to back up your account."]}),"\n",(0,o.jsx)(t.h3,{id:"reset-password-using-the-polkadot-js-browser-extension",children:"Reset Password using the Polkadot-JS Browser Extension"}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=DNU0p5G0Gqc&t=280s",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," to learn how to\nchange the password for an account that has been created on the Polkadot-JS browser extension (i.e.\nan injected account)."]})}),"\n",(0,o.jsx)(t.admonition,{type:"warning",children:(0,o.jsx)(t.p,{children:"Before following the instructions below, make sure you have your mnemonic phrase stored in a safe\nplace accessible to you."})}),"\n",(0,o.jsxs)(t.p,{children:["Let's say you created ",(0,o.jsx)(t.code,{children:"ACCOUNT 1"})," protected by password ",(0,o.jsx)(t.code,{children:"PSW 1"}),". To reset the password of your\n",(0,o.jsx)(t.code,{children:"ACCOUNT 1"})," using the browser extension, you must follow the following steps:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:["Go to ",(0,o.jsx)(t.code,{children:"ACCOUNT 1"}),' on the browser extension and click "Forget account". This action will delete the\naccess to your account. Note that your tokens are still in your account on the Polkadot network.']}),"\n",(0,o.jsxs)(t.li,{children:['On the browser extension click the "+" button in the top right corner and select the option\n"Import account from pre-existing seed". After entering the mnemonic phrase, you can choose a new\npassword, ',(0,o.jsx)(t.code,{children:"PSW 2"}),"."]}),"\n"]}),"\n",(0,o.jsx)(t.admonition,{title:"JSON files do not allow changing account passwords",type:"info",children:(0,o.jsxs)(t.p,{children:['If you add the account to the extension using the option "Restore account from backup JSON file",\nthis will allow you to restore access to your account using a JSON file protected by the password\n',(0,o.jsx)(t.code,{children:"PSW 1"}),", but does not let you set a new password. Thus, ",(0,o.jsx)(t.code,{children:"PSW 1"})," will become the account password by\ndefault."]})}),"\n",(0,o.jsx)(t.admonition,{title:"Accounts on Cold wallets do not need passwords",type:"info",children:(0,o.jsxs)(t.p,{children:["For hardware wallets such as ",(0,o.jsx)(t.a,{href:"https://www.ledger.com/",children:"Ledger"}),", you may have to set a PIN for\naccessing the accounts on the device, but you do not need to set a password for every individual\naccount. When you need to make transactions with your account, you are required to sign using your\nLedger device. Also, Ledger wallets let you generate multiple accounts for multiple blockchain\nnetworks without setting different passwords to access such accounts."]})}),"\n",(0,o.jsx)(t.h3,{id:"restore-account-on-the-polkadot-js-browser-extension",children:"Restore Account on the Polkadot-JS Browser Extension"}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/9ohp8k4Hz8c",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169952-how-to-restore-your-account-in-the-polkadot-extension",children:(0,o.jsx)(t.strong,{children:"this support page"})}),"\nto learn how to restore your account on the Polkadot-JS UI."]})}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-ui",children:"Polkadot-JS UI"}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["For guidelines about how to create an account using Polkadot-JS UI, see\n",(0,o.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000180529",children:(0,o.jsx)(t.strong,{children:"this support article"})}),"."]})}),"\n",(0,o.jsx)(t.admonition,{type:"caution",children:(0,o.jsxs)(t.p,{children:["If you use this method to create your account and clear your cookies in your browser, your account\nwill be lost forever if you do not ",(0,o.jsx)(t.a,{href:"#restore-account-on-the-polkadot-js-ui",children:"back it up"}),". Make sure\nyou store your seed phrase in a safe place or download the account's JSON file if using the\nPolkadot-JS browser extension. Learn more about account backup and restoration\n",(0,o.jsx)(t.a,{href:"#restore-account-on-the-polkadot-js-ui",children:"here"}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:["Local in-browser account storage is disabled by default on the Polkadot-JS UI. To create an account\nusing the Polkadot-JS UI, navigate to settings > account options and click on allow local in-browser\naccount storage in the drop-down menu. Using the Polkadot-JS user interface without a browser\nextension is ",(0,o.jsx)(t.strong,{children:"not recommended"}),". It is the least secure way of generating an account. It should\nonly be used if all other methods are not feasible."]}),"\n",(0,o.jsx)(t.h3,{id:"account-backup-using-the-polkadot-js-ui",children:"Account Backup using the Polkadot-JS UI"}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000177677-how-to-export-your-json-backup-file",children:(0,o.jsx)(t.strong,{children:"this support page"})}),"\nto know how to back up your account."]})}),"\n",(0,o.jsx)(t.h3,{id:"reset-password-using-the-polkadot-js-ui",children:"Reset password using the Polkadot-JS UI"}),"\n",(0,o.jsx)(t.p,{children:'To reset the password of an account created with Polkadot-JS Apps UI, you need to go to the\n"Accounts" tab, click the icon with three vertical dots on your account and select "Change this\naccount\'s password".'}),"\n",(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc?t=261",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," to learn how to change the\npassword for an account created on the Polkadot-JS UI (i.e. a non-injected account)."]}),"\n",(0,o.jsx)(t.admonition,{type:"note",children:(0,o.jsxs)(t.p,{children:["If you create an account first using Polkadot-JS Apps UI and then add it to the browser extension,\nyou need to follow the\n",(0,o.jsx)(t.a,{href:"#reset-password-using-the-browser-extension",children:"guidelines for the browser extension"})," to change the\npassword of such an account."]})}),"\n",(0,o.jsx)(t.h3,{id:"restore-account-on-the-polkadot-js-ui",children:"Restore Account on the Polkadot-JS UI"}),"\n",(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/cBsZqFpBANY",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000180110-how-to-restore-your-account-in-polkadot-js-ui",children:(0,o.jsx)(t.strong,{children:"this support page"})}),"\nto learn how to restore your account on the Polkadot-JS UI."]}),"\n",(0,o.jsx)(t.h3,{id:"unlocking-locks",children:"Unlocking Locks"}),"\n",(0,o.jsx)(t.admonition,{title:"Locks do not stack!",type:"info",children:(0,o.jsxs)(t.p,{children:["The biggest lock decides the total amount of locked funds. See\n",(0,o.jsx)(t.a,{href:"https://youtu.be/LHgY7ds_bZ0",children:(0,o.jsx)(t.strong,{children:"this walk-through video tutorial"})})," that will guide you in the\nprocess of unlocking funds in the example above."]})}),"\n",(0,o.jsx)(t.p,{children:"In the example, the locked balance is 0.55 KSM because the biggest lock is on democracy and is 0.55\nKSM. As soon as the democracy lock is removed the next biggest lock is on staking 0.5 KSM (bonded\n0.4 KSM + redeemable 0.1 KSM). This means that the locked balance will be 0.5 KSM, and 0.05 KSM will\nbe added to the transferrable balance. After redeeming the unbonded 0.1 KSM, the locked balance will\nbe 0.4 KSM, and an additional 0.1 KSM will be added to the transferrable balance. Now the biggest\nlock is still the bonded one. This means that even if we remove the vested lock, the locked balance\nwill still be 0.4 KSM and no tokens will be added to the transferrable balance. To free those bonded\ntokens we will need to unbond them and wait for the unbonding period to make them redeemable. If we\nremove the proxy the reserved funds will be automatically added to the transferrable balance."}),"\n",(0,o.jsx)(t.h2,{id:"query-account-data-in-polkadot-js",children:"Query Account Data in Polkadot-JS"}),"\n",(0,o.jsxs)(t.p,{children:["In the Polkadot-JS UI, you can also query account data under\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"Developer > Chain state"}),". Under ",(0,o.jsx)(t.code,{children:"selected state query"}),"\nchoose the system pallet followed by ",(0,o.jsx)(t.code,{children:"account(AccountId32): FrameSystemAccountInfo"}),", under ",(0,o.jsx)(t.code,{children:"Option"}),'\nchoose an account, and then click on the "+" button on the right.']}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"account_balance_types",src:n(59637).A+"",width:"1636",height:"343"})}),"\n",(0,o.jsx)(t.p,{children:"Account information include:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"nonce"}),", the number of transactions the account sent."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"consumers"}),", the number of other modules that currently depend on this account's existence. The\naccount cannot be reaped until this is zero."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"providers"}),", the number of other modules that allow this account to exist. The account may not be\nreaped until this and ",(0,o.jsx)(t.code,{children:"sufficients"})," are both zero."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"sufficients"}),", the number of modules that allow this account to exist for their own purposes. The\naccount may not be reaped until this and ",(0,o.jsx)(t.code,{children:"providers"})," are both zero."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"data"}),", the additional data that belongs to this account. Used to store the balance(s) in a lot of\nchains."]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["More in-depth information about the above data can be found in the\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/substrate/blob/2e7fde832b77b242269b136f1c3b6fffef86f9b6/frame/system/src/lib.rs#LL767C1-L781C24",children:"substrate code base"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"AccountData"})," structure defines the balance types in Substrate. The three types of balances\ninclude:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"free"}),", is the balance that is free but not necessarily transferrable."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"reserved"}),", is the balance that is not free, and it is put on hold for on-chain activity such as\ndeposits for multi-signature calls, setting up proxies and identities, and other actions that hold\nstate on the network."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"frozen"}),", is the amount that is free to use for on-chain activity but is locked in staking,\ngovernance, or vesting."]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"usable"})," or transferrable balance of the account is currently calculated using the formula\nbelow:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:"transferable = free - max(frozen - reserved, ED)\n"})}),"\n",(0,o.jsxs)(t.p,{children:["Where ED is the existential deposit. The ",(0,o.jsx)(t.strong,{children:"total"})," balance of the account is the sum of ",(0,o.jsx)(t.code,{children:"free"})," and\n",(0,o.jsx)(t.code,{children:"reserved"})," funds. The ",(0,o.jsx)(t.code,{children:"flags"})," describe extra information about the account."]}),"\n",(0,o.jsxs)(t.p,{children:["More in-depth information about the above data can be found in the\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/substrate/blob/2e7fde832b77b242269b136f1c3b6fffef86f9b6/frame/balances/src/types.rs#LL95-L114",children:"balances pallet in the Substrate code base"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"vanity-generator",children:"Vanity Generator"}),"\n",(0,o.jsxs)(t.p,{children:["The vanity generator is a tool on ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts/vanity",children:"Polkadot-JS UI"}),"\nthat lets you generate addresses that contain a specific substring. For the tutorial on how to\ncreate an account using Vanity Generator, visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000171416",children:"this support article"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"encryption-enhancement",children:"Encryption Enhancement"}),"\n",(0,o.jsxs)(t.p,{children:["Some newly generated ",(0,o.jsx)(t.code,{children:"JSON"})," account files cannot be imported (restored) into older wallet software.\nThis is due to an enhanced encryption method, noticeable in a slight delay when\nencrypting/decrypting your wallet. If you cannot load a ",(0,o.jsx)(t.code,{children:"JSON"})," file, please use the latest version\nof the wallet software. If you cannot load it, ensure that the wallet software uses the newest\nversion of the ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/api/",children:"Polkadot API"}),"."]})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(96540),s=n(74848);const a=function(e){var t,n=e.message,a=(0,o.useState)(!0),r=a[0],i=a[1];return(0,s.jsx)(s.Fragment,{children:r&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var o=n(90675),s=n(10467),a=n(96540),r=n(19588),i=n(2026),c=n(11135);function l(e,t,n){return u.apply(this,arguments)}function u(){return(u=(0,s.A)((0,o.A)().mark((function e(t,n,s){var a,c,l,u,d;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=void 0,c=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return a="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return a="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return a="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return a="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return a="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return a="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==a){e.next=22;break}return e.abrupt("return");case 22:return l=new r.E(a),e.next=25,i.G.create({provider:l});case 25:u=e.sent,(d=n.split(".")).forEach((function(e){e in u&&(u=u[e])})),e.t1=d[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return c=u.toString(),e.abrupt("break",39);case 33:return e.next=35,u();case 35:return c=(c=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+d[0]+") in "+n);case 39:return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,n,o){switch(t){case"humanReadable":(0,c.HumanReadable)(e,n,o);break;case"precise":(0,c.Precise)(e,n,o);break;case"blocksToDays":(0,c.BlocksToDays)(e,o);break;case"erasToDays":(0,c.ErasToDays)(e,o,n);break;case"percentage":(0,c.Percentage)(e,o);break;case"permillToPercent":(0,c.PermillToPercent)(e,o);break;case"arrayLength":(0,c.ArrayLength)(e,o);break;default:return void console.log("Ignoring unknown filter type")}}const h=function(e){var t=e.network,n=e.path,r=e.defaultValue,i=e.filter,c=void 0===i?void 0:i,u=(0,a.useState)(""),h=u[0],p=u[1];return t=t.toLowerCase(),(0,a.useEffect)((function(){void 0!==c?d(r.toString(),c,t,p):p(r.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var a=function(){var e=(0,s.A)((0,o.A)().mark((function e(){var s;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(t,n,p);case 2:if(void 0!==(s=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==c?d(s,c,t,p):p(s);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{a()}catch(i){console.log(i)}}}),[]),h}},11135:e=>{var t="polkadot",n="kusama",o="statemine",s="statemint",a="polkadotpeople",r="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,c,l){var u=void 0;if(c===t||c===s)u=3;else if(c===n||c===o||c===a)u=6;else{if(c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");u=8}e=parseFloat(e),l((e=Number.isInteger(e/i[c].precision)?e/i[c].precision+" "+i[c].symbol:(e/i[c].precision).toFixed(u)+" "+i[c].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/i[t].precision+" "+i[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,i,c){var l=void 0;if(c===t||c===s||c==a)l=1;else{if(c!==n&&c!==o&&c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");l=4}i((e/=l).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},3514:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});n(96540);var o=n(34164),s=n(26972),a=n(28774),r=n(53465),i=n(16654),c=n(21312),l=n(51107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=n(74848);function h(e){var t=e.href,n=e.children;return(0,d.jsx)(a.A,{href:t,className:(0,o.A)("card padding--lg",u.cardContainer),children:n})}function p(e){var t=e.href,n=e.icon,s=e.title,a=e.description;return(0,d.jsxs)(h,{href:t,children:[(0,d.jsxs)(l.A,{as:"h2",className:(0,o.A)("text--truncate",u.cardTitle),title:s,children:[n," ",s]}),a&&(0,d.jsx)("p",{className:(0,o.A)("text--truncate",u.cardDescription),title:a,children:a})]})}function f(e){var t,n,o=e.item,a=(0,s.Nr)(o),i=(n=(0,r.W)().selectMessage,function(e){return n(e,(0,c.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,d.jsx)(p,{href:a,icon:"\ud83d\uddc3\ufe0f",title:o.label,description:null!=(t=o.description)?t:i(o.items.length)}):null}function b(e){var t,n,o=e.item,a=(0,i.A)(o.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",r=(0,s.cC)(null!=(t=o.docId)?t:void 0);return(0,d.jsx)(p,{href:o.href,icon:a,title:o.label,description:null!=(n=o.description)?n:null==r?void 0:r.description})}function m(e){var t=e.item;switch(t.type){case"link":return(0,d.jsx)(b,{item:t});case"category":return(0,d.jsx)(f,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function g(e){var t=e.className,n=(0,s.$S)();return(0,d.jsx)(k,{items:n.items,className:t})}function k(e){var t=e.items,n=e.className;if(!t)return(0,d.jsx)(g,Object.assign({},e));var a=(0,s.d1)(t);return(0,d.jsx)("section",{className:(0,o.A)("row",n),children:a.map((function(e,t){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(m,{item:e})},t)}))})}},19365:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(96540);var o=n(34164);const s={tabItem:"tabItem_Ymn6"};var a=n(74848);function r(e){var t=e.children,n=e.hidden,r=e.className;return(0,a.jsx)("div",{role:"tabpanel",className:(0,o.A)(s.tabItem,r),hidden:n,children:t})}},11470:(e,t,n)=>{"use strict";n.d(t,{A:()=>j});var o=n(96540),s=n(34164),a=n(23104),r=n(56347),i=n(205),c=n(57485),l=n(31682),u=n(75376);function d(e){var t,n;return null!=(t=null==(n=o.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,o.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function h(e){var t=e.values,n=e.children;return(0,o.useMemo)((function(){var e=null!=t?t:function(e){return d(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,l.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function f(e){var t=e.queryString,n=void 0!==t&&t,s=e.groupId,a=(0,r.W6)(),i=function(e){var t=e.queryString,n=void 0!==t&&t,o=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!o)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=o?o:null}({queryString:n,groupId:s});return[(0,c.aZ)(i),(0,o.useCallback)((function(e){if(i){var t=new URLSearchParams(a.location.search);t.set(i,e),a.replace(Object.assign({},a.location,{search:t.toString()}))}}),[i,a])]}function b(e){var t,n,s,a,r=e.defaultValue,c=e.queryString,l=void 0!==c&&c,d=e.groupId,b=h(e),m=(0,o.useState)((function(){return function(e){var t,n=e.defaultValue,o=e.tabValues;if(0===o.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:o}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+o.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var s=null!=(t=o.find((function(e){return e.default})))?t:o[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:r,tabValues:b})})),g=m[0],k=m[1],x=f({queryString:l,groupId:d}),w=x[0],y=x[1],j=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),n=(0,u.Dv)(t),s=n[0],a=n[1],[s,(0,o.useCallback)((function(e){t&&a.set(e)}),[t,a])]),v=j[0],S=j[1],A=function(){var e=null!=w?w:v;return p({value:e,tabValues:b})?e:null}();return(0,i.A)((function(){A&&k(A)}),[A]),{selectedValue:g,selectValue:(0,o.useCallback)((function(e){if(!p({value:e,tabValues:b}))throw new Error("Can't select invalid tab value="+e);k(e),y(e),S(e)}),[y,S,b]),tabValues:b}}var m=n(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var k=n(74848);function x(e){var t=e.className,n=e.block,o=e.selectedValue,r=e.selectValue,i=e.tabValues,c=[],l=(0,a.a_)().blockElementScrollPositionUntilNextRender,u=function(e){var t=e.currentTarget,n=c.indexOf(t),s=i[n].value;s!==o&&(l(t),r(s))},d=function(e){var t,n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":var o,s=c.indexOf(e.currentTarget)+1;n=null!=(o=c[s])?o:c[0];break;case"ArrowLeft":var a,r=c.indexOf(e.currentTarget)-1;n=null!=(a=c[r])?a:c[c.length-1]}null==(t=n)||t.focus()};return(0,k.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":n},t),children:i.map((function(e){var t=e.value,n=e.label,a=e.attributes;return(0,k.jsx)("li",Object.assign({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,ref:function(e){return c.push(e)},onKeyDown:d,onClick:u},a,{className:(0,s.A)("tabs__item",g.tabItem,null==a?void 0:a.className,{"tabs__item--active":o===t}),children:null!=n?n:t}),t)}))})}function w(e){var t=e.lazy,n=e.children,a=e.selectedValue,r=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var i=r.find((function(e){return e.props.value===a}));return i?(0,o.cloneElement)(i,{className:(0,s.A)("margin-top--md",i.props.className)}):null}return(0,k.jsx)("div",{className:"margin-top--md",children:r.map((function(e,t){return(0,o.cloneElement)(e,{key:t,hidden:e.props.value!==a})}))})}function y(e){var t=b(e);return(0,k.jsxs)("div",{className:(0,s.A)("tabs-container",g.tabList),children:[(0,k.jsx)(x,Object.assign({},t,e)),(0,k.jsx)(w,Object.assign({},t,e))]})}function j(e){var t=(0,m.A)();return(0,k.jsx)(y,Object.assign({},e,{children:d(e.children)}),String(t))}},53465:(e,t,n)=>{"use strict";n.d(t,{W:()=>l});var o=n(96540),s=n(44586),a=["zero","one","two","few","many","other"];function r(e){return a.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:r(["one","other"]),select:function(e){return 1===e?"one":"other"}};function c(){var e=(0,s.A)().i18n.currentLocale;return(0,o.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:r(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(o){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+o.message+"\n"),i}var t,n}),[e])}function l(){var e=c();return{selectMessage:function(t,n){return function(e,t,n){var o=e.split("|");if(1===o.length)return o[0];o.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+o.length+": "+e);var s=n.select(t),a=n.pluralForms.indexOf(s);return o[Math.min(a,o.length-1)]}(n,t,e)}}}},59637:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/AccountData-struct-118d0bf533806084460cba05bef62b9c.png"},36105:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/warning-multichain-account-0719ff59691f3ff48562d92ef2295e84.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/9f804621.fd4adc78.js b/assets/js/9f804621.fd4adc78.js deleted file mode 100644 index b4b3885a01e6..000000000000 --- a/assets/js/9f804621.fd4adc78.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[1431],{92415:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>c,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var o=n(74848),s=n(28453),a=(n(47379),n(11470),n(19365),n(3514)),r=n(67141);const i={id:"learn-guides-accounts",title:"Polkadot-JS Guides about Accounts",sidebar_label:"Account Guides",description:"Polkadot-JS Guides about Accounts",keyword:["guides","polkadot-js","accounts"],slug:"../learn-guides-accounts"},c=void 0,l={id:"learn/learn-guides-accounts",title:"Polkadot-JS Guides about Accounts",description:"Polkadot-JS Guides about Accounts",source:"@site/../docs/learn/learn-guides-accounts.md",sourceDirName:"learn",slug:"/learn-guides-accounts",permalink:"/docs/learn-guides-accounts",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727178265e3,frontMatter:{id:"learn-guides-accounts",title:"Polkadot-JS Guides about Accounts",sidebar_label:"Account Guides",description:"Polkadot-JS Guides about Accounts",keyword:["guides","polkadot-js","accounts"],slug:"../learn-guides-accounts"},sidebar:"docs",previous:{title:"Polkadot-JS Guides",permalink:"/docs/learn-polkadot-js-guides"},next:{title:"Multisig Guides",permalink:"/docs/learn-guides-accounts-multisig"}},u={},d=[{value:"Account Address Format",id:"account-address-format",level:2},{value:"Polkadot-JS Browser Extension",id:"polkadot-js-browser-extension",level:2},{value:"Account Backup using the Polkadot-JS Browser Extension",id:"account-backup-using-the-polkadot-js-browser-extension",level:3},{value:"Reset Password using the Polkadot-JS Browser Extension",id:"reset-password-using-the-polkadot-js-browser-extension",level:3},{value:"Restore Account on the Polkadot-JS Browser Extension",id:"restore-account-on-the-polkadot-js-browser-extension",level:3},{value:"Polkadot-JS UI",id:"polkadot-js-ui",level:2},{value:"Account Backup using the Polkadot-JS UI",id:"account-backup-using-the-polkadot-js-ui",level:3},{value:"Reset password using the Polkadot-JS UI",id:"reset-password-using-the-polkadot-js-ui",level:3},{value:"Restore Account on the Polkadot-JS UI",id:"restore-account-on-the-polkadot-js-ui",level:3},{value:"Unlocking Locks",id:"unlocking-locks",level:3},{value:"Query Account Data in Polkadot-JS",id:"query-account-data-in-polkadot-js",level:2},{value:"Vanity Generator",id:"vanity-generator",level:2},{value:"Encryption Enhancement",id:"encryption-enhancement",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsx)(a.A,{}),"\n",(0,o.jsx)(t.h2,{id:"account-address-format",children:"Account Address Format"}),"\n",(0,o.jsxs)(t.p,{children:["An account created on the relay chain can also be used on multiple chains in the ecosystem. More\nspecifically, the account of a chain that uses the ",(0,o.jsx)(t.code,{children:"*25519"})," account address format (the latest list\ncan be accessed on the\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/ss58-registry/blob/main/ss58-registry.json",children:"ss58 registry repository"}),")\nis cross-compatible with all the chains that use the similar format. To switch between the accounts\non different chains, you can follow the guidelines in\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000103707-can-i-use-the-same-account-on-polkadot-kusama-and-parachains-",children:"this support article"}),".\n",(0,o.jsx)(t.a,{href:"https://polkadot.subscan.io/tools/format_transform",children:"Subscan has a tool"})," you can use to convert your\naddress between the different chain formats."]}),"\n",(0,o.jsxs)(t.admonition,{title:"Using the same account on multiple chains - Pros and Cons",type:"info",children:[(0,o.jsx)(t.p,{children:"The address format differs from chain to chain, but that difference is only visual. The same private\nkey can be used to sign transactions on behalf of the respective accounts on multiple chains. Using\na single account on multiple chains is convenient, as you do not have to deal with multiple mnemonic\nphrases or private keys. But, if your account gets compromised on one chain, the attacker can gain\nfull access to the accounts on all other chains. This also has implications for the account holder's\nprivacy, as knowing the identity of an account on one chain can expose the account holder's identity\non all the chains. In the Accounts tab, the Polkadot-JS UI displays a warning message next to each\nAccount you are using on multiple chains and recommends using different Accounts on different chains\n(see below)."}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"warning multiple chains",src:n(36105).A+"",width:"1103",height:"343"})})]}),"\n",(0,o.jsx)(t.p,{children:'On Polkadot-JS Extension, you can copy your address by clicking the account\'s icon while the desired\nchain format is active. E.g. selecting "Substrate" as the format will change your address, and\nclicking the colorful icon of your account will copy it in that format.'}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-browser-extension",children:"Polkadot-JS Browser Extension"}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=DNU0p5G0Gqc",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/DNU0p5G0Gqc/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=DNU0p5G0Gqc",children:"Polkadot-JS Browser Extension Tutorial"})})]})}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["For guidelines about how to create an account using the Polkadot Extension, see\n",(0,o.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000098878-how-to-create-a-dot-account",children:(0,o.jsx)(t.strong,{children:"this support article"})}),"."]})}),"\n",(0,o.jsx)(t.p,{children:"The Polkadot-JS Browser Extension (the Polkadot Extension) provides a reasonable balance of security\nand usability. It provides a separate local mechanism to generate your address and interact with\nPolkadot."}),"\n",(0,o.jsx)(t.p,{children:'This method involves installing the Polkadot Extension and using it as a \u201cvirtual vault," separate\nfrom your browser, to store your private keys. It also allows the signing of transactions and\nsimilar functionality.'}),"\n",(0,o.jsx)(t.p,{children:"It is still running on the same computer you use to connect to the internet and thus is less secure\nthan using Parity Signer or other air-gapped approaches."}),"\n",(0,o.jsx)(t.h3,{id:"account-backup-using-the-polkadot-js-browser-extension",children:"Account Backup using the Polkadot-JS Browser Extension"}),"\n",(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000177677-how-to-export-your-json-backup-file",children:(0,o.jsx)(t.strong,{children:"this support page"})}),"\nto know how to back up your account."]}),"\n",(0,o.jsx)(t.h3,{id:"reset-password-using-the-polkadot-js-browser-extension",children:"Reset Password using the Polkadot-JS Browser Extension"}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=DNU0p5G0Gqc&t=280s",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," to learn how to\nchange the password for an account that has been created on the Polkadot-JS browser extension (i.e.\nan injected account)."]})}),"\n",(0,o.jsx)(t.admonition,{type:"warning",children:(0,o.jsx)(t.p,{children:"Before following the instructions below, make sure you have your mnemonic phrase stored in a safe\nplace accessible to you."})}),"\n",(0,o.jsxs)(t.p,{children:["Let's say you created ",(0,o.jsx)(t.code,{children:"ACCOUNT 1"})," protected by password ",(0,o.jsx)(t.code,{children:"PSW 1"}),". To reset the password of your\n",(0,o.jsx)(t.code,{children:"ACCOUNT 1"})," using the browser extension, you must follow the following steps:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:["Go to ",(0,o.jsx)(t.code,{children:"ACCOUNT 1"}),' on the browser extension and click "Forget account". This action will delete the\naccess to your account. Note that your tokens are still in your account on the Polkadot network.']}),"\n",(0,o.jsxs)(t.li,{children:['On the browser extension click the "+" button in the top right corner and select the option\n"Import account from pre-existing seed". After entering the mnemonic phrase, you can choose a new\npassword, ',(0,o.jsx)(t.code,{children:"PSW 2"}),"."]}),"\n"]}),"\n",(0,o.jsx)(t.admonition,{title:"JSON files do not allow changing account passwords",type:"info",children:(0,o.jsxs)(t.p,{children:['If you add the account to the extension using the option "Restore account from backup JSON file",\nthis will allow you to restore access to your account using a JSON file protected by the password\n',(0,o.jsx)(t.code,{children:"PSW 1"}),", but does not let you set a new password. Thus, ",(0,o.jsx)(t.code,{children:"PSW 1"})," will become the account password by\ndefault."]})}),"\n",(0,o.jsx)(t.admonition,{title:"Accounts on Cold wallets do not need passwords",type:"info",children:(0,o.jsxs)(t.p,{children:["For hardware wallets such as ",(0,o.jsx)(t.a,{href:"https://www.ledger.com/",children:"Ledger"}),", you may have to set a PIN for\naccessing the accounts on the device, but you do not need to set a password for every individual\naccount. When you need to make transactions with your account, you are required to sign using your\nLedger device. Also, Ledger wallets let you generate multiple accounts for multiple blockchain\nnetworks without setting different passwords to access such accounts."]})}),"\n",(0,o.jsx)(t.h3,{id:"restore-account-on-the-polkadot-js-browser-extension",children:"Restore Account on the Polkadot-JS Browser Extension"}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/9ohp8k4Hz8c",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169952-how-to-restore-your-account-in-the-polkadot-extension",children:(0,o.jsx)(t.strong,{children:"this support page"})}),"\nto learn how to restore your account on the Polkadot-JS UI."]})}),"\n",(0,o.jsx)(t.h2,{id:"polkadot-js-ui",children:"Polkadot-JS UI"}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["For guidelines about how to create an account using Polkadot-JS UI, see\n",(0,o.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000180529",children:(0,o.jsx)(t.strong,{children:"this support article"})}),"."]})}),"\n",(0,o.jsx)(t.admonition,{type:"caution",children:(0,o.jsxs)(t.p,{children:["If you use this method to create your account and clear your cookies in your browser, your account\nwill be lost forever if you do not ",(0,o.jsx)(t.a,{href:"#restore-account-on-the-polkadot-js-ui",children:"back it up"}),". Make sure\nyou store your seed phrase in a safe place or download the account's JSON file if using the\nPolkadot-JS browser extension. Learn more about account backup and restoration\n",(0,o.jsx)(t.a,{href:"#restore-account-on-the-polkadot-js-ui",children:"here"}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:["Local in-browser account storage is disabled by default on the Polkadot-JS UI. To create an account\nusing the Polkadot-JS UI, navigate to settings > account options and click on allow local in-browser\naccount storage in the drop-down menu. Using the Polkadot-JS user interface without a browser\nextension is ",(0,o.jsx)(t.strong,{children:"not recommended"}),". It is the least secure way of generating an account. It should\nonly be used if all other methods are not feasible."]}),"\n",(0,o.jsx)(t.h3,{id:"account-backup-using-the-polkadot-js-ui",children:"Account Backup using the Polkadot-JS UI"}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000177677-how-to-export-your-json-backup-file",children:(0,o.jsx)(t.strong,{children:"this support page"})}),"\nto know how to back up your account."]})}),"\n",(0,o.jsx)(t.h3,{id:"reset-password-using-the-polkadot-js-ui",children:"Reset password using the Polkadot-JS UI"}),"\n",(0,o.jsx)(t.p,{children:'To reset the password of an account created with Polkadot-JS Apps UI, you need to go to the\n"Accounts" tab, click the icon with three vertical dots on your account and select "Change this\naccount\'s password".'}),"\n",(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/DNU0p5G0Gqc?t=261",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," to learn how to change the\npassword for an account created on the Polkadot-JS UI (i.e. a non-injected account)."]}),"\n",(0,o.jsx)(t.admonition,{type:"note",children:(0,o.jsxs)(t.p,{children:["If you create an account first using Polkadot-JS Apps UI and then add it to the browser extension,\nyou need to follow the\n",(0,o.jsx)(t.a,{href:"#reset-password-using-the-browser-extension",children:"guidelines for the browser extension"})," to change the\npassword of such an account."]})}),"\n",(0,o.jsx)(t.h3,{id:"restore-account-on-the-polkadot-js-ui",children:"Restore Account on the Polkadot-JS UI"}),"\n",(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://youtu.be/cBsZqFpBANY",children:(0,o.jsx)(t.strong,{children:"this video tutorial"})})," and\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000180110-how-to-restore-your-account-in-polkadot-js-ui",children:(0,o.jsx)(t.strong,{children:"this support page"})}),"\nto learn how to restore your account on the Polkadot-JS UI."]}),"\n",(0,o.jsx)(t.h3,{id:"unlocking-locks",children:"Unlocking Locks"}),"\n",(0,o.jsx)(t.admonition,{title:"Locks do not stack!",type:"info",children:(0,o.jsxs)(t.p,{children:["The biggest lock decides the total amount of locked funds. See\n",(0,o.jsx)(t.a,{href:"https://youtu.be/LHgY7ds_bZ0",children:(0,o.jsx)(t.strong,{children:"this walk-through video tutorial"})})," that will guide you in the\nprocess of unlocking funds in the example above."]})}),"\n",(0,o.jsx)(t.p,{children:"In the example, the locked balance is 0.55 KSM because the biggest lock is on democracy and is 0.55\nKSM. As soon as the democracy lock is removed the next biggest lock is on staking 0.5 KSM (bonded\n0.4 KSM + redeemable 0.1 KSM). This means that the locked balance will be 0.5 KSM, and 0.05 KSM will\nbe added to the transferrable balance. After redeeming the unbonded 0.1 KSM, the locked balance will\nbe 0.4 KSM, and an additional 0.1 KSM will be added to the transferrable balance. Now the biggest\nlock is still the bonded one. This means that even if we remove the vested lock, the locked balance\nwill still be 0.4 KSM and no tokens will be added to the transferrable balance. To free those bonded\ntokens we will need to unbond them and wait for the unbonding period to make them redeemable. If we\nremove the proxy the reserved funds will be automatically added to the transferrable balance."}),"\n",(0,o.jsx)(t.h2,{id:"query-account-data-in-polkadot-js",children:"Query Account Data in Polkadot-JS"}),"\n",(0,o.jsxs)(t.p,{children:["In the Polkadot-JS UI, you can also query account data under\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"Developer > Chain state"}),". Under ",(0,o.jsx)(t.code,{children:"selected state query"}),"\nchoose the system pallet followed by ",(0,o.jsx)(t.code,{children:"account(AccountId32): FrameSystemAccountInfo"}),", under ",(0,o.jsx)(t.code,{children:"Option"}),'\nchoose an account, and then click on the "+" button on the right.']}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"account_balance_types",src:n(59637).A+"",width:"1636",height:"343"})}),"\n",(0,o.jsx)(t.p,{children:"Account information include:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"nonce"}),", the number of transactions the account sent."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"consumers"}),", the number of other modules that currently depend on this account's existence. The\naccount cannot be reaped until this is zero."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"providers"}),", the number of other modules that allow this account to exist. The account may not be\nreaped until this and ",(0,o.jsx)(t.code,{children:"sufficients"})," are both zero."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"sufficients"}),", the number of modules that allow this account to exist for their own purposes. The\naccount may not be reaped until this and ",(0,o.jsx)(t.code,{children:"providers"})," are both zero."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"data"}),", the additional data that belongs to this account. Used to store the balance(s) in a lot of\nchains."]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["More in-depth information about the above data can be found in the\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/substrate/blob/2e7fde832b77b242269b136f1c3b6fffef86f9b6/frame/system/src/lib.rs#LL767C1-L781C24",children:"substrate code base"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"AccountData"})," structure defines the balance types in Substrate. The three types of balances\ninclude:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"free"}),", is the balance that is free but not necessarily transferrable."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"reserved"}),", is the balance that is not free, and it is put on hold for on-chain activity such as\ndeposits for multi-signature calls, setting up proxies and identities, and other actions that hold\nstate on the network."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.code,{children:"frozen"}),", is the amount that is free to use for on-chain activity but is locked in staking,\ngovernance, or vesting."]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"usable"})," or transferrable balance of the account is currently calculated using the formula\nbelow:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:"transferable = free - max(frozen - reserved, ED)\n"})}),"\n",(0,o.jsxs)(t.p,{children:["Where ED is the existential deposit. The ",(0,o.jsx)(t.strong,{children:"total"})," balance of the account is the sum of ",(0,o.jsx)(t.code,{children:"free"})," and\n",(0,o.jsx)(t.code,{children:"reserved"})," funds. The ",(0,o.jsx)(t.code,{children:"flags"})," describe extra information about the account."]}),"\n",(0,o.jsxs)(t.p,{children:["More in-depth information about the above data can be found in the\n",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/substrate/blob/2e7fde832b77b242269b136f1c3b6fffef86f9b6/frame/balances/src/types.rs#LL95-L114",children:"balances pallet in the Substrate code base"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"vanity-generator",children:"Vanity Generator"}),"\n",(0,o.jsxs)(t.p,{children:["The vanity generator is a tool on ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts/vanity",children:"Polkadot-JS UI"}),"\nthat lets you generate addresses that contain a specific substring. For the tutorial on how to\ncreate an account using Vanity Generator, visit\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000171416",children:"this support article"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"encryption-enhancement",children:"Encryption Enhancement"}),"\n",(0,o.jsxs)(t.p,{children:["Some newly generated ",(0,o.jsx)(t.code,{children:"JSON"})," account files cannot be imported (restored) into older wallet software.\nThis is due to an enhanced encryption method, noticeable in a slight delay when\nencrypting/decrypting your wallet. If you cannot load a ",(0,o.jsx)(t.code,{children:"JSON"})," file, please use the latest version\nof the wallet software. If you cannot load it, ensure that the wallet software uses the newest\nversion of the ",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/api/",children:"Polkadot API"}),"."]})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(96540),s=n(74848);const a=function(e){var t,n=e.message,a=(0,o.useState)(!0),r=a[0],i=a[1];return(0,s.jsx)(s.Fragment,{children:r&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var o=n(90675),s=n(10467),a=n(96540),r=n(19588),i=n(2026),c=n(11135);function l(e,t,n){return u.apply(this,arguments)}function u(){return(u=(0,s.A)((0,o.A)().mark((function e(t,n,s){var a,c,l,u,d;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=void 0,c=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return a="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return a="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return a="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return a="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return a="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return a="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==a){e.next=22;break}return e.abrupt("return");case 22:return l=new r.E(a),e.next=25,i.G.create({provider:l});case 25:u=e.sent,(d=n.split(".")).forEach((function(e){e in u&&(u=u[e])})),e.t1=d[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return c=u.toString(),e.abrupt("break",39);case 33:return e.next=35,u();case 35:return c=(c=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+d[0]+") in "+n);case 39:return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,n,o){switch(t){case"humanReadable":(0,c.HumanReadable)(e,n,o);break;case"precise":(0,c.Precise)(e,n,o);break;case"blocksToDays":(0,c.BlocksToDays)(e,o);break;case"erasToDays":(0,c.ErasToDays)(e,o,n);break;case"percentage":(0,c.Percentage)(e,o);break;case"permillToPercent":(0,c.PermillToPercent)(e,o);break;case"arrayLength":(0,c.ArrayLength)(e,o);break;default:return void console.log("Ignoring unknown filter type")}}const h=function(e){var t=e.network,n=e.path,r=e.defaultValue,i=e.filter,c=void 0===i?void 0:i,u=(0,a.useState)(""),h=u[0],p=u[1];return t=t.toLowerCase(),(0,a.useEffect)((function(){void 0!==c?d(r.toString(),c,t,p):p(r.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var a=function(){var e=(0,s.A)((0,o.A)().mark((function e(){var s;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(t,n,p);case 2:if(void 0!==(s=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==c?d(s,c,t,p):p(s);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{a()}catch(i){console.log(i)}}}),[]),h}},11135:e=>{var t="polkadot",n="kusama",o="statemine",s="statemint",a="polkadotpeople",r="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,c,l){var u=void 0;if(c===t||c===s)u=3;else if(c===n||c===o||c===a)u=6;else{if(c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");u=8}e=parseFloat(e),l((e=Number.isInteger(e/i[c].precision)?e/i[c].precision+" "+i[c].symbol:(e/i[c].precision).toFixed(u)+" "+i[c].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/i[t].precision+" "+i[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,i,c){var l=void 0;if(c===t||c===s||c==a)l=1;else{if(c!==n&&c!==o&&c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");l=4}i((e/=l).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},3514:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});n(96540);var o=n(34164),s=n(26972),a=n(28774),r=n(53465),i=n(16654),c=n(21312),l=n(51107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=n(74848);function h(e){var t=e.href,n=e.children;return(0,d.jsx)(a.A,{href:t,className:(0,o.A)("card padding--lg",u.cardContainer),children:n})}function p(e){var t=e.href,n=e.icon,s=e.title,a=e.description;return(0,d.jsxs)(h,{href:t,children:[(0,d.jsxs)(l.A,{as:"h2",className:(0,o.A)("text--truncate",u.cardTitle),title:s,children:[n," ",s]}),a&&(0,d.jsx)("p",{className:(0,o.A)("text--truncate",u.cardDescription),title:a,children:a})]})}function f(e){var t,n,o=e.item,a=(0,s.Nr)(o),i=(n=(0,r.W)().selectMessage,function(e){return n(e,(0,c.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,d.jsx)(p,{href:a,icon:"\ud83d\uddc3\ufe0f",title:o.label,description:null!=(t=o.description)?t:i(o.items.length)}):null}function b(e){var t,n,o=e.item,a=(0,i.A)(o.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",r=(0,s.cC)(null!=(t=o.docId)?t:void 0);return(0,d.jsx)(p,{href:o.href,icon:a,title:o.label,description:null!=(n=o.description)?n:null==r?void 0:r.description})}function m(e){var t=e.item;switch(t.type){case"link":return(0,d.jsx)(b,{item:t});case"category":return(0,d.jsx)(f,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function g(e){var t=e.className,n=(0,s.$S)();return(0,d.jsx)(k,{items:n.items,className:t})}function k(e){var t=e.items,n=e.className;if(!t)return(0,d.jsx)(g,Object.assign({},e));var a=(0,s.d1)(t);return(0,d.jsx)("section",{className:(0,o.A)("row",n),children:a.map((function(e,t){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(m,{item:e})},t)}))})}},19365:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(96540);var o=n(34164);const s={tabItem:"tabItem_Ymn6"};var a=n(74848);function r(e){var t=e.children,n=e.hidden,r=e.className;return(0,a.jsx)("div",{role:"tabpanel",className:(0,o.A)(s.tabItem,r),hidden:n,children:t})}},11470:(e,t,n)=>{"use strict";n.d(t,{A:()=>j});var o=n(96540),s=n(34164),a=n(23104),r=n(56347),i=n(205),c=n(57485),l=n(31682),u=n(75376);function d(e){var t,n;return null!=(t=null==(n=o.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,o.isValidElement)(e)&&((t=e.props)&&"object"==typeof t&&"value"in t))return e;var t;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}function h(e){var t=e.values,n=e.children;return(0,o.useMemo)((function(){var e=null!=t?t:function(e){return d(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}(n);return function(e){var t=(0,l.XI)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function p(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function f(e){var t=e.queryString,n=void 0!==t&&t,s=e.groupId,a=(0,r.W6)(),i=function(e){var t=e.queryString,n=void 0!==t&&t,o=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!o)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=o?o:null}({queryString:n,groupId:s});return[(0,c.aZ)(i),(0,o.useCallback)((function(e){if(i){var t=new URLSearchParams(a.location.search);t.set(i,e),a.replace(Object.assign({},a.location,{search:t.toString()}))}}),[i,a])]}function b(e){var t,n,s,a,r=e.defaultValue,c=e.queryString,l=void 0!==c&&c,d=e.groupId,b=h(e),m=(0,o.useState)((function(){return function(e){var t,n=e.defaultValue,o=e.tabValues;if(0===o.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:o}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+o.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var s=null!=(t=o.find((function(e){return e.default})))?t:o[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:r,tabValues:b})})),g=m[0],k=m[1],x=f({queryString:l,groupId:d}),w=x[0],y=x[1],j=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),n=(0,u.Dv)(t),s=n[0],a=n[1],[s,(0,o.useCallback)((function(e){t&&a.set(e)}),[t,a])]),v=j[0],S=j[1],A=function(){var e=null!=w?w:v;return p({value:e,tabValues:b})?e:null}();return(0,i.A)((function(){A&&k(A)}),[A]),{selectedValue:g,selectValue:(0,o.useCallback)((function(e){if(!p({value:e,tabValues:b}))throw new Error("Can't select invalid tab value="+e);k(e),y(e),S(e)}),[y,S,b]),tabValues:b}}var m=n(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var k=n(74848);function x(e){var t=e.className,n=e.block,o=e.selectedValue,r=e.selectValue,i=e.tabValues,c=[],l=(0,a.a_)().blockElementScrollPositionUntilNextRender,u=function(e){var t=e.currentTarget,n=c.indexOf(t),s=i[n].value;s!==o&&(l(t),r(s))},d=function(e){var t,n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":var o,s=c.indexOf(e.currentTarget)+1;n=null!=(o=c[s])?o:c[0];break;case"ArrowLeft":var a,r=c.indexOf(e.currentTarget)-1;n=null!=(a=c[r])?a:c[c.length-1]}null==(t=n)||t.focus()};return(0,k.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":n},t),children:i.map((function(e){var t=e.value,n=e.label,a=e.attributes;return(0,k.jsx)("li",Object.assign({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,ref:function(e){return c.push(e)},onKeyDown:d,onClick:u},a,{className:(0,s.A)("tabs__item",g.tabItem,null==a?void 0:a.className,{"tabs__item--active":o===t}),children:null!=n?n:t}),t)}))})}function w(e){var t=e.lazy,n=e.children,a=e.selectedValue,r=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var i=r.find((function(e){return e.props.value===a}));return i?(0,o.cloneElement)(i,{className:(0,s.A)("margin-top--md",i.props.className)}):null}return(0,k.jsx)("div",{className:"margin-top--md",children:r.map((function(e,t){return(0,o.cloneElement)(e,{key:t,hidden:e.props.value!==a})}))})}function y(e){var t=b(e);return(0,k.jsxs)("div",{className:(0,s.A)("tabs-container",g.tabList),children:[(0,k.jsx)(x,Object.assign({},t,e)),(0,k.jsx)(w,Object.assign({},t,e))]})}function j(e){var t=(0,m.A)();return(0,k.jsx)(y,Object.assign({},e,{children:d(e.children)}),String(t))}},53465:(e,t,n)=>{"use strict";n.d(t,{W:()=>l});var o=n(96540),s=n(44586),a=["zero","one","two","few","many","other"];function r(e){return a.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:r(["one","other"]),select:function(e){return 1===e?"one":"other"}};function c(){var e=(0,s.A)().i18n.currentLocale;return(0,o.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:r(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(o){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+o.message+"\n"),i}var t,n}),[e])}function l(){var e=c();return{selectMessage:function(t,n){return function(e,t,n){var o=e.split("|");if(1===o.length)return o[0];o.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+o.length+": "+e);var s=n.select(t),a=n.pluralForms.indexOf(s);return o[Math.min(a,o.length-1)]}(n,t,e)}}}},59637:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/AccountData-struct-118d0bf533806084460cba05bef62b9c.png"},36105:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/warning-multichain-account-0719ff59691f3ff48562d92ef2295e84.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/b0a48d97.32894800.js b/assets/js/b0a48d97.32894800.js deleted file mode 100644 index ec99d78863b3..000000000000 --- a/assets/js/b0a48d97.32894800.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1018],{31962:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var o=t(74848),s=t(28453),r=t(67141);const a={id:"learn-guides-ledger",title:"Polkadot-JS Guides for Ledger Devices",sidebar_label:"Ledger Guides",description:"Polkadot-JS Guides for Ledger Devices.",keywords:["ledger","polkadot-js"],slug:"../learn-guides-ledger"},i=void 0,l={id:"learn/learn-guides-ledger",title:"Polkadot-JS Guides for Ledger Devices",description:"Polkadot-JS Guides for Ledger Devices.",source:"@site/../docs/learn/learn-guides-ledger.md",sourceDirName:"learn",slug:"/learn-guides-ledger",permalink:"/docs/learn-guides-ledger",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-ledger.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-guides-ledger",title:"Polkadot-JS Guides for Ledger Devices",sidebar_label:"Ledger Guides",description:"Polkadot-JS Guides for Ledger Devices.",keywords:["ledger","polkadot-js"],slug:"../learn-guides-ledger"},sidebar:"docs",previous:{title:"Identity Guides",permalink:"/docs/learn-guides-identity"},next:{title:"Polkadot Vault Guides",permalink:"/docs/learn-guides-vault"}},d={},c=[{value:"Loading Your Account",id:"loading-your-account",level:2},{value:"Derivation paths",id:"derivation-paths",level:3},{value:"Confirming the Address on your Device",id:"confirming-the-address-on-your-device",level:3},{value:"Navigating your Account",id:"navigating-your-account",level:2},{value:"Sending a Transfer with Ledger Devices",id:"sending-a-transfer-with-ledger-devices",level:2},{value:"Receiving a Transfer",id:"receiving-a-transfer",level:2},{value:"Staking",id:"staking",level:2},{value:"Ledger Developer Release",id:"ledger-developer-release",level:2},{value:"Why you might need the Developer Release",id:"why-you-might-need-the-developer-release",level:3},{value:"Install the Developer Release",id:"install-the-developer-release",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"/docs/ledger",children:"Ledger devices"})," are hardware wallets that keep your private key secured\non a physical device not directly exposed to your computer or the internet."]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"/docs/ledger#polkadot-generic-app",children:"Polkadot Generic application"})," allows you to manage\nyour DOT/KSM on Polkadot/Kusama networks, tokens on their Asset Hubs and possibly all chains within\nthe Polkadot ecosystem. It is versatile and capable of handling parachains and relay chains without\nbeing affected by their runtime upgrades."]}),"\n",(0,o.jsx)(n.h2,{id:"loading-your-account",children:"Loading Your Account"}),"\n",(0,o.jsx)(n.admonition,{type:"info",children:(0,o.jsx)(n.p,{children:"Ledger Live should be off while using Ledger with Polkadot-JS UI, as it can interfere with normal\noperation."})}),"\n",(0,o.jsxs)(n.p,{children:["You can import your Ledger account to ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/extension/",children:"Polkadot Extension"})," or to\nthe ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS UI"}),". For instructions on how to import\nLedger accounts to the Polkadot Extension read through\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000175387-how-to-add-your-ledger-through-the-polkadot-extension",children:"this support article"}),",\nwhile if you want to import Ledger accounts to the Polkadot-JS UI, you can consult\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170812-how-to-add-ledger-account-through-the-polkadot-js-ui",children:"this other article"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"derivation-paths",children:"Derivation paths"}),"\n",(0,o.jsxs)(n.p,{children:["When adding a Ledger account using the extension or the UI, you will be asked to select an\n",(0,o.jsx)(n.code,{children:"account type"})," and an ",(0,o.jsx)(n.code,{children:"account index"}),". The first lets you select an account, while the second lets\nyou pick a derivation path from that account - think of it like a formula from which child accounts\nare generated. When you are creating a Polkadot ledger account for the first time on Ledger Live\nwith name ",(0,o.jsx)(n.code,{children:"Polkadot 1"}),", this can be added to Polkadot-JS using the 0/0 derivation path (i.e. account\ntype = 0 and account index = 0). If you add a second account called ",(0,o.jsx)(n.code,{children:"Polkadot 2"}),", this will\ncorrespond to the 1/0 derivation path, and so on. We thus have multiple parent accounts that can be\nviewed and used in both Ledger Live and Polkadot-JS. Additionally, we can use Polkadot-JS UI to\ncreate multiple children accounts from each parent account. For example, ",(0,o.jsx)(n.code,{children:"Polkadot 1"})," with 0/0\nderivation path can have child 0/1, 0/2, etc. that can be used within the UI. However, such children\naccounts cannot be used in Ledger Live, as it only scans through the parent accounts. So, remember\nthat the balances on the children accounts cannot be viewed, and you will not be able to transact\nwith those accounts on Ledger Live."]}),"\n",(0,o.jsx)(n.h3,{id:"confirming-the-address-on-your-device",children:"Confirming the Address on your Device"}),"\n",(0,o.jsxs)(n.p,{children:["If your Ledger account is directly imported into the Polkadot-JS UI, you can ask the UI to confirm\nthe address on your Ledger device. There are a few methods to check the balance of your Ledger\naccount. Check out\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169332-where-can-i-see-the-balance-of-my-account-",children:"this support article"}),"\nfor information."]}),"\n",(0,o.jsx)(n.h2,{id:"navigating-your-account",children:"Navigating your Account"}),"\n",(0,o.jsxs)(n.p,{children:["Once you have loaded your account on the \u201cAccounts\u201d tab, it should show a row with your Ledger\naccount. Your account\u2019s DOT balance is on the row\u2019s far right. Expanding the balance arrow will show\nyour balance details, such as locks or reserved amounts. For more information about the type of\nbalances, visit the ",(0,o.jsx)(n.a,{href:"/docs/learn-account-balances#balance-types-on-polkadot-js",children:"balances page"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"sending-a-transfer-with-ledger-devices",children:"Sending a Transfer with Ledger Devices"}),"\n",(0,o.jsx)(n.admonition,{title:"Verifying Extrinsics",type:"danger",children:(0,o.jsxs)(n.p,{children:["Visit the\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-using-Ledger",children:(0,o.jsx)(n.strong,{children:"dedicated support page"})}),"\nand see ",(0,o.jsx)(n.a,{href:"https://youtu.be/bxMs-9fBtFk?t=360",children:(0,o.jsx)(n.strong,{children:"this video tutorial"})})," tutorial to learn how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nwhile signing transactions."]})}),"\n",(0,o.jsx)(n.admonition,{title:"Signature error message",type:"info",children:(0,o.jsxs)(n.p,{children:["If you have already connected your device, but an error message appears before signing a\ntransaction, make sure you have opened the Polkadot Ledger Generic application on your Ledger Nano\ndevice. Visit\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181994",children:"this support page"})," for\nmore information about signing transactions using your ledger."]})}),"\n",(0,o.jsxs)(n.p,{children:["General instructions to send a transfer can be found on\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170304-how-to-send-transfer-funds-out-of-your-dot-account-on-the-polkadot-js-ui",children:"this support page"}),".\nTo sign transactions with your Ledger Nano check\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181994",children:"this support article"})," or\nsee ",(0,o.jsx)(n.a,{href:"https://youtu.be/gbvrHzr4EDY?t=579",children:"this video tutorial"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"receiving-a-transfer",children:"Receiving a Transfer"}),"\n",(0,o.jsxs)(n.p,{children:["To receive a transfer on the accounts stored on your Ledger device, you must provide the sender\n(i.e., the payer) with your address. To do so, follow the instructions on\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181866-how-to-receive-dot-to-my-account-on-polkadot-js-ui",children:"this support page"}),"."]}),"\n",(0,o.jsx)(n.admonition,{title:"Sharing your account address",type:"caution",children:(0,o.jsxs)(n.p,{children:["Before giving anyone your address, ensure it matches what's on the Ledger by\n",(0,o.jsx)(n.a,{href:"#confirming-the-address-on-your-device",children:"confirming the address on your device"}),". Some malware will\nintercept clicks and clipboard requests and can change your copied value in-flight, so being extra\nvigilant around copy-paste operations makes sense."]})}),"\n",(0,o.jsx)(n.p,{children:"The easiest way to get your address is to click on the account name. This will open a sidebar\nshowing your address and other information, such as on-chain identity. Another method is just\nclicking on your account's avatar icon - this immediately copies your address to the clipboard."}),"\n",(0,o.jsx)(n.admonition,{title:"Your Asset Hub address is the same as your relay chain address",type:"note",children:(0,o.jsx)(n.p,{children:"Make sure that you clarify to the sender that you wish to receive your tokens on the Asset Hub\nparachain, otherwise (if you're receiving DOT or KSM tokens) they could be sent on the Polkadot or\nKusama relay chain."})}),"\n",(0,o.jsx)(n.h2,{id:"staking",children:"Staking"}),"\n",(0,o.jsxs)(n.p,{children:["For staking using Ledger devices, follow the instructions on\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168057-how-do-i-stake-nominate-on-polkadot-",children:"this support article"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"ledger-developer-release",children:"Ledger Developer Release"}),"\n",(0,o.jsx)(n.admonition,{type:"warning",children:(0,o.jsxs)(n.p,{children:["This section is for developers only. It is recommended to install the application from Ledger Live\nunless you ",(0,o.jsx)(n.em,{children:"know precisely what you're doing"}),"."]})}),"\n",(0,o.jsx)(n.h3,{id:"why-you-might-need-the-developer-release",children:"Why you might need the Developer Release"}),"\n",(0,o.jsxs)(n.p,{children:["Ledger apps for the Polkadot ecosystem are developed by ",(0,o.jsx)(n.a,{href:"https://zondax.ch/",children:"Zondax"}),". When new\nfunctionalities are added to the Ledger apps, they are made available on a developer release for\ntesting purposes. After a successful audit and review, the apps would be available for download and\ninstallation using ",(0,o.jsx)(n.a,{href:"https://www.ledger.com/ledger-live",children:"Ledger Live"}),". As it takes some time for\nLedger to audit and review the release, the app upgrade option may not be available on Ledger Live\nwhen the new runtime is deployed on the network. If this happens, users cannot use Ledger devices to\nsign transactions. Suppose you cannot wait a few days until the app passes the Ledger audit, you can\ninstall the developer release from the shell using the latest version published on\n",(0,o.jsx)(n.a,{href:"https://github.com/Zondax/ledger-polkadot/releases",children:"the Zondax GitHub repository"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"install-the-developer-release",children:"Install the Developer Release"}),"\n",(0,o.jsxs)(n.admonition,{type:"info",children:[(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"https://youtu.be/4SyVQrlXZ_Q",children:(0,o.jsx)(n.strong,{children:"this video tutorial"})})," to learn how to install the developer\nrelease of your ledger app."]}),(0,o.jsx)(n.p,{children:"Currently, the developer release can be installed only on the Nano S and S Plus devices and can't be\ninstalled on the Nano X."})]}),"\n",(0,o.jsxs)(n.p,{children:["To install the developer version, make sure you have the latest ",(0,o.jsx)(n.code,{children:"pip"})," version and follow the steps\nbelow:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Install ",(0,o.jsx)(n.em,{children:"ledgerblue"})," running the command ",(0,o.jsx)(n.code,{children:"python3 -m pip install ledgerblue"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Download the developer release from the\n",(0,o.jsx)(n.a,{href:"https://github.com/Zondax/ledger-polkadot/releases",children:"Zondax GitHub repository"}),". The file will be\nnamed ",(0,o.jsx)(n.code,{children:"installer_nanos_plus.sh"})," or something similar, depending on your ledger device."]}),"\n",(0,o.jsxs)(n.li,{children:["Locate the downloaded shell script and make it executable in your shell by typing the command\n",(0,o.jsx)(n.code,{children:"chmod +x installer_nanos_plus.sh"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["You can now use the ",(0,o.jsx)(n.code,{children:"./installer_nanos_plus.sh --help"})," command to visualize the available options\n(see below)"]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Dev Ledger Help Menu",src:t(93611).A+"",width:"525",height:"54"})}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Attach your Ledger Nano (in this case, Nano S Plus) to your computer, enter the PIN code, and run\nthe command ",(0,o.jsx)(n.code,{children:"./installer_nanos_plus.sh load"}),'. Scroll with the right button until you see "Allow\nunsafe manager", left and right press to confirm. You will be asked to confirm the action of\nuninstalling the app and subsequently installing the newer version. After confirming both actions,\nthe shell script will install the version on your device. You must insert the PIN code to use the\ndevice after the installation.']}),"\n",(0,o.jsx)(n.li,{children:"If you wish to revert the version to the stable release, go to Ledger Live. The app will\nautomatically detect the developer release and give the option to install the previous stable\nrelease."}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(96540),s=t(74848);const r=function(e){var n,t=e.message,r=(0,o.useState)(!0),a=r[0],i=r[1];return(0,s.jsx)(s.Fragment,{children:a&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=t,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},93611:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/ledger-help-menu-3af6592c7bc1830644f7ca9d55005cf4.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>i});var o=t(96540);const s={},r=o.createContext(s);function a(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b0a48d97.6c3bc3c0.js b/assets/js/b0a48d97.6c3bc3c0.js new file mode 100644 index 000000000000..8ed865dfbd77 --- /dev/null +++ b/assets/js/b0a48d97.6c3bc3c0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1018],{31962:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var o=t(74848),s=t(28453),r=t(67141);const i={id:"learn-guides-ledger",title:"Polkadot-JS Guides for Ledger Devices",sidebar_label:"Ledger Guides",description:"Polkadot-JS Guides for Ledger Devices.",keywords:["ledger","polkadot-js"],slug:"../learn-guides-ledger"},a=void 0,l={id:"learn/learn-guides-ledger",title:"Polkadot-JS Guides for Ledger Devices",description:"Polkadot-JS Guides for Ledger Devices.",source:"@site/../docs/learn/learn-guides-ledger.md",sourceDirName:"learn",slug:"/learn-guides-ledger",permalink:"/docs/learn-guides-ledger",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-ledger.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-ledger",title:"Polkadot-JS Guides for Ledger Devices",sidebar_label:"Ledger Guides",description:"Polkadot-JS Guides for Ledger Devices.",keywords:["ledger","polkadot-js"],slug:"../learn-guides-ledger"},sidebar:"docs",previous:{title:"Identity Guides",permalink:"/docs/learn-guides-identity"},next:{title:"Polkadot Vault Guides",permalink:"/docs/learn-guides-vault"}},d={},c=[{value:"Loading Your Account",id:"loading-your-account",level:2},{value:"Derivation paths",id:"derivation-paths",level:3},{value:"Confirming the Address on your Device",id:"confirming-the-address-on-your-device",level:3},{value:"Navigating your Account",id:"navigating-your-account",level:2},{value:"Sending a Transfer with Ledger Devices",id:"sending-a-transfer-with-ledger-devices",level:2},{value:"Receiving a Transfer",id:"receiving-a-transfer",level:2},{value:"Staking",id:"staking",level:2},{value:"Ledger Developer Release",id:"ledger-developer-release",level:2},{value:"Why you might need the Developer Release",id:"why-you-might-need-the-developer-release",level:3},{value:"Install the Developer Release",id:"install-the-developer-release",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"/docs/ledger",children:"Ledger devices"})," are hardware wallets that keep your private key secured\non a physical device not directly exposed to your computer or the internet."]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"/docs/ledger#polkadot-generic-app",children:"Polkadot Generic application"})," allows you to manage\nyour DOT/KSM on Polkadot/Kusama networks, tokens on their Asset Hubs and possibly all chains within\nthe Polkadot ecosystem. It is versatile and capable of handling parachains and relay chains without\nbeing affected by their runtime upgrades."]}),"\n",(0,o.jsx)(n.h2,{id:"loading-your-account",children:"Loading Your Account"}),"\n",(0,o.jsx)(n.admonition,{type:"info",children:(0,o.jsx)(n.p,{children:"Ledger Live should be off while using Ledger with Polkadot-JS UI, as it can interfere with normal\noperation."})}),"\n",(0,o.jsxs)(n.p,{children:["You can import your Ledger account to ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/extension/",children:"Polkadot Extension"})," or to\nthe ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS UI"}),". For instructions on how to import\nLedger accounts to the Polkadot Extension read through\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000175387-how-to-add-your-ledger-through-the-polkadot-extension",children:"this support article"}),",\nwhile if you want to import Ledger accounts to the Polkadot-JS UI, you can consult\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170812-how-to-add-ledger-account-through-the-polkadot-js-ui",children:"this other article"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"derivation-paths",children:"Derivation paths"}),"\n",(0,o.jsxs)(n.p,{children:["When adding a Ledger account using the extension or the UI, you will be asked to select an\n",(0,o.jsx)(n.code,{children:"account type"})," and an ",(0,o.jsx)(n.code,{children:"account index"}),". The first lets you select an account, while the second lets\nyou pick a derivation path from that account - think of it like a formula from which child accounts\nare generated. When you are creating a Polkadot ledger account for the first time on Ledger Live\nwith name ",(0,o.jsx)(n.code,{children:"Polkadot 1"}),", this can be added to Polkadot-JS using the 0/0 derivation path (i.e. account\ntype = 0 and account index = 0). If you add a second account called ",(0,o.jsx)(n.code,{children:"Polkadot 2"}),", this will\ncorrespond to the 1/0 derivation path, and so on. We thus have multiple parent accounts that can be\nviewed and used in both Ledger Live and Polkadot-JS. Additionally, we can use Polkadot-JS UI to\ncreate multiple children accounts from each parent account. For example, ",(0,o.jsx)(n.code,{children:"Polkadot 1"})," with 0/0\nderivation path can have child 0/1, 0/2, etc. that can be used within the UI. However, such children\naccounts cannot be used in Ledger Live, as it only scans through the parent accounts. So, remember\nthat the balances on the children accounts cannot be viewed, and you will not be able to transact\nwith those accounts on Ledger Live."]}),"\n",(0,o.jsx)(n.h3,{id:"confirming-the-address-on-your-device",children:"Confirming the Address on your Device"}),"\n",(0,o.jsxs)(n.p,{children:["If your Ledger account is directly imported into the Polkadot-JS UI, you can ask the UI to confirm\nthe address on your Ledger device. There are a few methods to check the balance of your Ledger\naccount. Check out\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000169332-where-can-i-see-the-balance-of-my-account-",children:"this support article"}),"\nfor information."]}),"\n",(0,o.jsx)(n.h2,{id:"navigating-your-account",children:"Navigating your Account"}),"\n",(0,o.jsxs)(n.p,{children:["Once you have loaded your account on the \u201cAccounts\u201d tab, it should show a row with your Ledger\naccount. Your account\u2019s DOT balance is on the row\u2019s far right. Expanding the balance arrow will show\nyour balance details, such as locks or reserved amounts. For more information about the type of\nbalances, visit the ",(0,o.jsx)(n.a,{href:"/docs/learn-account-balances#balance-types-on-polkadot-js",children:"balances page"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"sending-a-transfer-with-ledger-devices",children:"Sending a Transfer with Ledger Devices"}),"\n",(0,o.jsx)(n.admonition,{title:"Verifying Extrinsics",type:"danger",children:(0,o.jsxs)(n.p,{children:["Visit the\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-using-Ledger",children:(0,o.jsx)(n.strong,{children:"dedicated support page"})}),"\nand see ",(0,o.jsx)(n.a,{href:"https://youtu.be/bxMs-9fBtFk?t=360",children:(0,o.jsx)(n.strong,{children:"this video tutorial"})})," tutorial to learn how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nwhile signing transactions."]})}),"\n",(0,o.jsx)(n.admonition,{title:"Signature error message",type:"info",children:(0,o.jsxs)(n.p,{children:["If you have already connected your device, but an error message appears before signing a\ntransaction, make sure you have opened the Polkadot Ledger Generic application on your Ledger Nano\ndevice. Visit\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181994",children:"this support page"})," for\nmore information about signing transactions using your ledger."]})}),"\n",(0,o.jsxs)(n.p,{children:["General instructions to send a transfer can be found on\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170304-how-to-send-transfer-funds-out-of-your-dot-account-on-the-polkadot-js-ui",children:"this support page"}),".\nTo sign transactions with your Ledger Nano check\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181994",children:"this support article"})," or\nsee ",(0,o.jsx)(n.a,{href:"https://youtu.be/gbvrHzr4EDY?t=579",children:"this video tutorial"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"receiving-a-transfer",children:"Receiving a Transfer"}),"\n",(0,o.jsxs)(n.p,{children:["To receive a transfer on the accounts stored on your Ledger device, you must provide the sender\n(i.e., the payer) with your address. To do so, follow the instructions on\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181866-how-to-receive-dot-to-my-account-on-polkadot-js-ui",children:"this support page"}),"."]}),"\n",(0,o.jsx)(n.admonition,{title:"Sharing your account address",type:"caution",children:(0,o.jsxs)(n.p,{children:["Before giving anyone your address, ensure it matches what's on the Ledger by\n",(0,o.jsx)(n.a,{href:"#confirming-the-address-on-your-device",children:"confirming the address on your device"}),". Some malware will\nintercept clicks and clipboard requests and can change your copied value in-flight, so being extra\nvigilant around copy-paste operations makes sense."]})}),"\n",(0,o.jsx)(n.p,{children:"The easiest way to get your address is to click on the account name. This will open a sidebar\nshowing your address and other information, such as on-chain identity. Another method is just\nclicking on your account's avatar icon - this immediately copies your address to the clipboard."}),"\n",(0,o.jsx)(n.admonition,{title:"Your Asset Hub address is the same as your relay chain address",type:"note",children:(0,o.jsx)(n.p,{children:"Make sure that you clarify to the sender that you wish to receive your tokens on the Asset Hub\nparachain, otherwise (if you're receiving DOT or KSM tokens) they could be sent on the Polkadot or\nKusama relay chain."})}),"\n",(0,o.jsx)(n.h2,{id:"staking",children:"Staking"}),"\n",(0,o.jsxs)(n.p,{children:["For staking using Ledger devices, follow the instructions on\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000168057-how-do-i-stake-nominate-on-polkadot-",children:"this support article"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"ledger-developer-release",children:"Ledger Developer Release"}),"\n",(0,o.jsx)(n.admonition,{type:"warning",children:(0,o.jsxs)(n.p,{children:["This section is for developers only. It is recommended to install the application from Ledger Live\nunless you ",(0,o.jsx)(n.em,{children:"know precisely what you're doing"}),"."]})}),"\n",(0,o.jsx)(n.h3,{id:"why-you-might-need-the-developer-release",children:"Why you might need the Developer Release"}),"\n",(0,o.jsxs)(n.p,{children:["Ledger apps for the Polkadot ecosystem are developed by ",(0,o.jsx)(n.a,{href:"https://zondax.ch/",children:"Zondax"}),". When new\nfunctionalities are added to the Ledger apps, they are made available on a developer release for\ntesting purposes. After a successful audit and review, the apps would be available for download and\ninstallation using ",(0,o.jsx)(n.a,{href:"https://www.ledger.com/ledger-live",children:"Ledger Live"}),". As it takes some time for\nLedger to audit and review the release, the app upgrade option may not be available on Ledger Live\nwhen the new runtime is deployed on the network. If this happens, users cannot use Ledger devices to\nsign transactions. Suppose you cannot wait a few days until the app passes the Ledger audit, you can\ninstall the developer release from the shell using the latest version published on\n",(0,o.jsx)(n.a,{href:"https://github.com/Zondax/ledger-polkadot/releases",children:"the Zondax GitHub repository"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"install-the-developer-release",children:"Install the Developer Release"}),"\n",(0,o.jsxs)(n.admonition,{type:"info",children:[(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"https://youtu.be/4SyVQrlXZ_Q",children:(0,o.jsx)(n.strong,{children:"this video tutorial"})})," to learn how to install the developer\nrelease of your ledger app."]}),(0,o.jsx)(n.p,{children:"Currently, the developer release can be installed only on the Nano S and S Plus devices and can't be\ninstalled on the Nano X."})]}),"\n",(0,o.jsxs)(n.p,{children:["To install the developer version, make sure you have the latest ",(0,o.jsx)(n.code,{children:"pip"})," version and follow the steps\nbelow:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Install ",(0,o.jsx)(n.em,{children:"ledgerblue"})," running the command ",(0,o.jsx)(n.code,{children:"python3 -m pip install ledgerblue"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Download the developer release from the\n",(0,o.jsx)(n.a,{href:"https://github.com/Zondax/ledger-polkadot/releases",children:"Zondax GitHub repository"}),". The file will be\nnamed ",(0,o.jsx)(n.code,{children:"installer_nanos_plus.sh"})," or something similar, depending on your ledger device."]}),"\n",(0,o.jsxs)(n.li,{children:["Locate the downloaded shell script and make it executable in your shell by typing the command\n",(0,o.jsx)(n.code,{children:"chmod +x installer_nanos_plus.sh"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["You can now use the ",(0,o.jsx)(n.code,{children:"./installer_nanos_plus.sh --help"})," command to visualize the available options\n(see below)"]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Dev Ledger Help Menu",src:t(93611).A+"",width:"525",height:"54"})}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Attach your Ledger Nano (in this case, Nano S Plus) to your computer, enter the PIN code, and run\nthe command ",(0,o.jsx)(n.code,{children:"./installer_nanos_plus.sh load"}),'. Scroll with the right button until you see "Allow\nunsafe manager", left and right press to confirm. You will be asked to confirm the action of\nuninstalling the app and subsequently installing the newer version. After confirming both actions,\nthe shell script will install the version on your device. You must insert the PIN code to use the\ndevice after the installation.']}),"\n",(0,o.jsx)(n.li,{children:"If you wish to revert the version to the stable release, go to Ledger Live. The app will\nautomatically detect the developer release and give the option to install the previous stable\nrelease."}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(96540),s=t(74848);const r=function(e){var n,t=e.message,r=(0,o.useState)(!0),i=r[0],a=r[1];return(0,s.jsx)(s.Fragment,{children:i&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){a(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=t,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},93611:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/ledger-help-menu-3af6592c7bc1830644f7ca9d55005cf4.png"},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var o=t(96540);const s={},r=o.createContext(s);function i(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b1b82dcd.63083cd0.js b/assets/js/b1b82dcd.63083cd0.js new file mode 100644 index 000000000000..c67c760e6ed0 --- /dev/null +++ b/assets/js/b1b82dcd.63083cd0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[557],{59384:(n,e,a)=>{a.r(e),a.d(e,{assets:()=>l,contentTitle:()=>s,default:()=>p,frontMatter:()=>r,metadata:()=>c,toc:()=>d});var o=a(74848),t=a(28453),i=a(67141);const r={id:"learn-crowdloans",title:"Parachain Crowdloans",sidebar_label:"Parachain Crowdloans",description:"Polkadot's Crowdloans and How to Participate.",keywords:["crowdloans","parachains","lending","auction"],slug:"../learn-crowdloans"},s=void 0,c={id:"learn/archive/learn-crowdloans",title:"Parachain Crowdloans",description:"Polkadot's Crowdloans and How to Participate.",source:"@site/../docs/learn/archive/learn-crowdloans.md",sourceDirName:"learn/archive",slug:"/learn/learn-crowdloans",permalink:"/docs/learn/learn-crowdloans",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-crowdloans.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-crowdloans",title:"Parachain Crowdloans",sidebar_label:"Parachain Crowdloans",description:"Polkadot's Crowdloans and How to Participate.",keywords:["crowdloans","parachains","lending","auction"],slug:"../learn-crowdloans"},sidebar:"docs",previous:{title:"Parachain Slot Auctions",permalink:"/docs/learn/learn-auction"},next:{title:"Polkadot Developer Portal",permalink:"/docs/build-guide"}},l={},d=[{value:"Crowdloan Campaigns vs Parachain Auctions",id:"crowdloan-campaigns-vs-parachain-auctions",level:2},{value:"Starting a Crowdloan Campaign",id:"starting-a-crowdloan-campaign",level:2},{value:"Supporting a Crowdloan Campaign",id:"supporting-a-crowdloan-campaign",level:2},{value:"Contributing to Crowdloans",id:"contributing-to-crowdloans",level:3},{value:"Withdraw Crowdloaned Tokens",id:"withdraw-crowdloaned-tokens",level:3}];function h(n){const e={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...n.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.A,{message:"The content on this page is archived. [Agile Coretime](../learn-agile-coretime) is activated on the network, and crowdloans have been deprecated. For decentralized, transparent, and regulatory-compliant fundraising within the ecosystem, check out the [Polimec parachain](https://www.polimec.org/)."}),"\n",(0,o.jsx)(e.p,{children:"Polkadot allows parachains to source tokens for their parachain bids in a decentralized crowdloan."}),"\n",(0,o.jsx)(e.admonition,{title:"Contributing to a crowdloan",type:"note",children:(0,o.jsxs)(e.p,{children:["If you are here for guidance on how to contribute to a crowdloan, watch the video below or read this\n",(0,o.jsx)(e.a,{href:"https://support.polkadot.network/support/solutions/articles/65000177341-how-to-participate-in-crowdloans-on-polkadot-or-kusama",children:"support article on crowdloans"}),"."]})}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://youtu.be/AA9mPANmzmU",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/AA9mPANmzmU/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://youtu.be/AA9mPANmzmU",children:"Crowdloans on Polkadot-JS"})})]})}),"\n",(0,o.jsx)(e.h2,{id:"crowdloan-campaigns-vs-parachain-auctions",children:"Crowdloan Campaigns vs Parachain Auctions"}),"\n",(0,o.jsxs)(e.p,{children:["It is important to recognize that starting a crowdloan campaign is ",(0,o.jsx)(e.strong,{children:"optional"})," for participating in\na parachain slot auction. The parachain slot auction can also be won directly through self-funding\nwithout community involvement. To reiterate, crowdloan campaigns are just one of the means to win\nauctions, which allow the community to participate in a trustless and permissionless way."]}),"\n",(0,o.jsx)(e.p,{children:"Let's look at a scenario where Project A is bidding for a parachain slot, but they don't have enough\ntokens to bid directly to win the parachain auction. Project A could benefit from starting a new\ncrowdloan campaign to help secure a parachain slot. Crowdloans are trustless and are supported\nnatively on the relay chain, allowing the community to bond their tokens on Project A's behalf for\nthe entire parachain lease duration. This will allow Project A to compete with projects that may\nhave access to greater capital, given the project has sufficient community support. In return, the\ncommunity contributors are rewarded by the projects that win the parachain slot, which would\ncompensate for the opportunity cost of bonding their tokens for the lease duration."}),"\n",(0,o.jsx)(e.p,{children:"On the other hand, let's say Project B, which is more established and has access to capital, is\nhoping to secure a parachain slot through self-funding. Project B is not relying on community\nfunding (at least via the crowdloan mechanism), so they must determine how much funding they can\nallocate towards winning a slot."}),"\n",(0,o.jsx)(e.p,{children:"Project B fully controls how much they are willing to contribute to gaining a parachain slot.\nProject B need not work on creating a reward model for community contributors like Project A. In\ncontrast, crowdloan campaigns benefit projects with access to limited capital but have strong\ncommunity support. They are also beneficial for projects that can successfully bid to win the\nauction with self-funding but are looking for a mechanism to bootstrap their community and get\nnoticed by the key actors in the ecosystem."}),"\n",(0,o.jsx)(e.p,{children:"It is publicly visible on-chain whether or not a project is bidding directly or through a crowdloan\ncampaign. More details regarding creating and executing a crowdloan campaign are provided below."}),"\n",(0,o.jsx)(e.h2,{id:"starting-a-crowdloan-campaign",children:"Starting a Crowdloan Campaign"}),"\n",(0,o.jsxs)(e.p,{children:["Anyone who has registered a parachain can create a new crowdloan campaign for a slot by depositing a\nspecified number of tokens. A campaign is configured as a range of slots (i.e. the duration of the\n",(0,o.jsx)(e.a,{href:"/docs/learn-parachains",children:"parachain"})," will bid for), a cap, and a duration. The duration can last over\nseveral auctions as long as the range of slots matches those of the auction (i.e. the first lease\nperiod of the crowdloan is the same or bigger than that of the auction). This means a team will not\nneed to restart the campaign just because they do not secure a slot on their first attempt."]}),"\n",(0,o.jsx)(e.admonition,{title:"Crowdloan Submission Deposit Required",type:"info",children:(0,o.jsx)(e.p,{children:"To create a new crowdloan campaign, your account must have 500 DOT (or 100 KSM on Kusama)\ntransferrable which will be reserved for the duration of the crowdloan."})}),"\n",(0,o.jsx)(e.p,{children:"When setting the parameters of a crowdloan campaign, consider the following:"}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsx)(e.p,{children:"A crowdloan campaign can start well before the auction slot is opened."}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsxs)(e.p,{children:["The campaign creation form requires setting a crowdloan cap \u2014 the maximum amount a campaign\ncan collect. A team can still win an ",(0,o.jsx)(e.a,{href:"/docs/learn/learn-auction",children:"auction"})," if the cap is not reached."]}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsx)(e.p,{children:'Set the desired end of the crowdloan in the "Ending block" field. This helps ensure that the\ncrowdloan is live during the entire auction. For example, if an auction starts in three days and\nlasts five days, you should set your crowdloan to end in 10 days or a similar timescale.'}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsxs)(e.p,{children:["One way of calculating the ending block number is adding: ",(0,o.jsx)(e.code,{children:"(10 * 60 * 24 * 7) * (x * 6) + y"})]}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsxs)(e.p,{children:[(0,o.jsx)(e.code,{children:"x"})," is the number of auction periods you want the crowdloan to continue for"]}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsxs)(e.p,{children:[(0,o.jsx)(e.code,{children:"y"})," is the current block number"]}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsx)(e.p,{children:(0,o.jsx)(e.code,{children:"(Blocks/Min * Min/Hour * Hour/Day * Day/Week) * (x[Period] * Week/Period) + y[BlockNumber]"})}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsxs)(e.p,{children:['"First period" field refers to the first period you want to bid for. If the current auction\nencompasses periods ',(0,o.jsx)(e.code,{children:"(3, 4, 5, 6)"}),", your first period can be at least ",(0,o.jsx)(e.code,{children:"3"}),". The last slot must\nalso be within that range."]}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsx)(e.p,{children:"You can only cancel an ongoing crowdloan if no contributions have been made. Your deposit will\nbe returned to you."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(e.p,{children:["Before the start of the crowdloan campaign, the owner will upload the parachain data. Once the\ncrowdloan is live, ",(0,o.jsx)(e.strong,{children:"the parachain configuration will be locked"})," and will be deployed as the\nparachain's runtime. Of course, once the parachain is running, it can always change via runtime\nupgrades (as determined through its local governance)."]}),"\n",(0,o.jsx)(e.h2,{id:"supporting-a-crowdloan-campaign",children:"Supporting a Crowdloan Campaign"}),"\n",(0,o.jsx)(e.h3,{id:"contributing-to-crowdloans",children:"Contributing to Crowdloans"}),"\n",(0,o.jsx)(e.admonition,{title:"Minimum Crowdloan Contribution",type:"info",children:(0,o.jsxs)(e.p,{children:["There is a\n",(0,o.jsx)(e.a,{href:"/docs/chain-state-values#minimum-crowdloan-contribution",children:"minimum balance for contributions for a crowdloan campaign"}),".\nThis is to make crowdloans as accessible as possible while maintaining a balance to justify using\nthe network's resources."]})}),"\n",(0,o.jsxs)(e.p,{children:["Each created campaign will have an index. Once a crowdloan campaign is open, anyone can participate\nby sending a transaction referencing the campaign's index. Tokens used to participate must be\ntransferable \u2014 that is, not locked for any reason, including staking, vesting, and governance\n\u2014 because they will be moved into a module-controlled account that was generated uniquely for\nthis campaign. See ",(0,o.jsx)(e.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system accounts"})," for more\ninformation."]}),"\n",(0,o.jsx)(e.admonition,{title:"Do not send Crowdloan contributions directly to the Parachain address",type:"caution",children:(0,o.jsxs)(e.p,{children:["All crowdloan contributions are handled by the Crowdloan module\u2019s logic, where a campaign is\nidentified by an index, not by address. ",(0,o.jsx)(e.strong,{children:"Never transfer tokens to an address in support of a\ncampaign"}),"."]})}),"\n",(0,o.jsx)(e.p,{children:"It is up to individual parachain teams to decide if and how they want to reward participants who\nforgo staking and choose to lock their tokens in support of the parachain\u2019s campaign. As one can\nimagine, rewards will take many forms and may vary widely among projects."}),"\n",(0,o.jsx)(e.p,{children:"If a crowdloan campaign is successful, that parachain will be on-boarded to the relay chain. The\ncollective tokens will be locked in that parachain's account for the entire duration that it is\nactive."}),"\n",(0,o.jsx)(e.h3,{id:"withdraw-crowdloaned-tokens",children:"Withdraw Crowdloaned Tokens"}),"\n",(0,o.jsx)(e.p,{children:"Participants will be able to reclaim their tokens in one of two ways:"}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsx)(e.li,{children:"If the campaign succeeds, the parachain will enter a retirement phase at the end of its lease.\nDuring this phase, participants can withdraw the tokens with which they participated."}),"\n",(0,o.jsx)(e.li,{children:"If the campaign is unsuccessful, this retirement phase will begin at its configured end, and\nparticipants can likewise withdraw their tokens."}),"\n"]}),"\n",(0,o.jsxs)(e.admonition,{type:"tip",children:[(0,o.jsxs)(e.mdxAdmonitionTitle,{children:[(0,o.jsx)(e.code,{children:"crowdloan.contribute"})," extrinsic is trustless"]}),(0,o.jsxs)(e.p,{children:["Contributing to a crowdloan through Polkadot JS Apps (which uses ",(0,o.jsx)(e.code,{children:"crowdloan.contribute"})," extrinsic)\nguarantees that you receive your tokens after the campaign ends. If you intend to contribute through\nother websites and custodial service providers like central exchanges, review their terms and\nconditions thoroughly and assess the associated risks."]})]}),"\n",(0,o.jsxs)(e.p,{children:["Note: When the lease periods won by the crowdloan have finished, or the crowdloan has ended without\nwinning a slot, anyone can trigger the refund of crowdloan contributions back to their original\nowners. This can be done through the permissionless ",(0,o.jsx)(e.code,{children:"crowdloan.refund"})," extrinsic available on\nPolkadot JS Apps > Developer > Extrinsics page, by specifying the parachain ID. This extrinsic may\nneed to be issued multiple times if the list of contributors is too long. All contributions must be\nreturned before the crowdloan is entirely deleted."]}),"\n",(0,o.jsx)(e.p,{children:(0,o.jsx)(e.img,{alt:"Crowdloan refund",src:a(1764).A+"",width:"1440",height:"552"})}),"\n",(0,o.jsxs)(e.p,{children:["Many projects will have dashboards that allow users to participate in their crowdloans. PolkadotJS\napps also offer a breakdown of ongoing crowdloans on the\n",(0,o.jsx)(e.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/parachains/crowdloan",children:"Apps page"}),"."]}),"\n",(0,o.jsx)(e.p,{children:"Here is an example of the crowdloans in play during the very first Kusama auction."}),"\n",(0,o.jsx)(e.p,{children:(0,o.jsx)(e.img,{alt:"crowdloan dashboard",src:a(41841).A+"",width:"2328",height:"1540"})}),"\n",(0,o.jsxs)(e.p,{children:["Furthermore, check out this video on\n",(0,o.jsx)(e.a,{href:"https://www.youtube.com/watch?v=YrTxDufrcQM",children:"How to Participate in Crowdloans"})," for steps on how to\naccess available crowdloans on PolkadotJS apps."]})]})}function p(n={}){const{wrapper:e}={...(0,t.R)(),...n.components};return e?(0,o.jsx)(e,{...n,children:(0,o.jsx)(h,{...n})}):h(n)}},67141:(n,e,a)=>{a.d(e,{A:()=>i});var o=a(96540),t=a(74848);const i=function(n){var e,a=n.message,i=(0,o.useState)(!0),r=i[0],s=i[1];return(0,t.jsx)(t.Fragment,{children:r&&(0,t.jsxs)("div",{className:"message-box",children:[(0,t.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,t.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=a,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},1764:(n,e,a)=>{a.d(e,{A:()=>o});const o=a.p+"assets/images/crowdloan-refund-a452b6b303e27c25b3e87c42577a9265.png"},41841:(n,e,a)=>{a.d(e,{A:()=>o});const o=a.p+"assets/images/kusama-crowdloans-0237f5d573dee5e221b51678b2ed25f1.png"},28453:(n,e,a)=>{a.d(e,{R:()=>r,x:()=>s});var o=a(96540);const t={},i=o.createContext(t);function r(n){const e=o.useContext(i);return o.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function s(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(t):n.components||t:r(n.components),o.createElement(i.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/b1b82dcd.ff191b88.js b/assets/js/b1b82dcd.ff191b88.js deleted file mode 100644 index 84b7642c7c8f..000000000000 --- a/assets/js/b1b82dcd.ff191b88.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[557],{59384:(n,e,a)=>{a.r(e),a.d(e,{assets:()=>l,contentTitle:()=>s,default:()=>p,frontMatter:()=>r,metadata:()=>c,toc:()=>d});var o=a(74848),t=a(28453),i=a(67141);const r={id:"learn-crowdloans",title:"Parachain Crowdloans",sidebar_label:"Parachain Crowdloans",description:"Polkadot's Crowdloans and How to Participate.",keywords:["crowdloans","parachains","lending","auction"],slug:"../learn-crowdloans"},s=void 0,c={id:"learn/archive/learn-crowdloans",title:"Parachain Crowdloans",description:"Polkadot's Crowdloans and How to Participate.",source:"@site/../docs/learn/archive/learn-crowdloans.md",sourceDirName:"learn/archive",slug:"/learn/learn-crowdloans",permalink:"/docs/learn/learn-crowdloans",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/archive/learn-crowdloans.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729152709e3,frontMatter:{id:"learn-crowdloans",title:"Parachain Crowdloans",sidebar_label:"Parachain Crowdloans",description:"Polkadot's Crowdloans and How to Participate.",keywords:["crowdloans","parachains","lending","auction"],slug:"../learn-crowdloans"},sidebar:"docs",previous:{title:"Parachain Slot Auctions",permalink:"/docs/learn/learn-auction"},next:{title:"Polkadot Developer Portal",permalink:"/docs/build-guide"}},l={},d=[{value:"Crowdloan Campaigns vs Parachain Auctions",id:"crowdloan-campaigns-vs-parachain-auctions",level:2},{value:"Starting a Crowdloan Campaign",id:"starting-a-crowdloan-campaign",level:2},{value:"Supporting a Crowdloan Campaign",id:"supporting-a-crowdloan-campaign",level:2},{value:"Contributing to Crowdloans",id:"contributing-to-crowdloans",level:3},{value:"Withdraw Crowdloaned Tokens",id:"withdraw-crowdloaned-tokens",level:3}];function h(n){const e={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...n.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.A,{message:"The content on this page is archived. [Agile Coretime](../learn-agile-coretime.md) is activated on the network, and crowdloans have been deprecated. For decentralized, transparent, and regulatory-compliant fundraising within the ecosystem, check out the [Polimec parachain](https://www.polimec.org/)."}),"\n",(0,o.jsx)(e.p,{children:"Polkadot allows parachains to source tokens for their parachain bids in a decentralized crowdloan."}),"\n",(0,o.jsx)(e.admonition,{title:"Contributing to a crowdloan",type:"note",children:(0,o.jsxs)(e.p,{children:["If you are here for guidance on how to contribute to a crowdloan, watch the video below or read this\n",(0,o.jsx)(e.a,{href:"https://support.polkadot.network/support/solutions/articles/65000177341-how-to-participate-in-crowdloans-on-polkadot-or-kusama",children:"support article on crowdloans"}),"."]})}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://youtu.be/AA9mPANmzmU",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/AA9mPANmzmU/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://youtu.be/AA9mPANmzmU",children:"Crowdloans on Polkadot-JS"})})]})}),"\n",(0,o.jsx)(e.h2,{id:"crowdloan-campaigns-vs-parachain-auctions",children:"Crowdloan Campaigns vs Parachain Auctions"}),"\n",(0,o.jsxs)(e.p,{children:["It is important to recognize that starting a crowdloan campaign is ",(0,o.jsx)(e.strong,{children:"optional"})," for participating in\na parachain slot auction. The parachain slot auction can also be won directly through self-funding\nwithout community involvement. To reiterate, crowdloan campaigns are just one of the means to win\nauctions, which allow the community to participate in a trustless and permissionless way."]}),"\n",(0,o.jsx)(e.p,{children:"Let's look at a scenario where Project A is bidding for a parachain slot, but they don't have enough\ntokens to bid directly to win the parachain auction. Project A could benefit from starting a new\ncrowdloan campaign to help secure a parachain slot. Crowdloans are trustless and are supported\nnatively on the relay chain, allowing the community to bond their tokens on Project A's behalf for\nthe entire parachain lease duration. This will allow Project A to compete with projects that may\nhave access to greater capital, given the project has sufficient community support. In return, the\ncommunity contributors are rewarded by the projects that win the parachain slot, which would\ncompensate for the opportunity cost of bonding their tokens for the lease duration."}),"\n",(0,o.jsx)(e.p,{children:"On the other hand, let's say Project B, which is more established and has access to capital, is\nhoping to secure a parachain slot through self-funding. Project B is not relying on community\nfunding (at least via the crowdloan mechanism), so they must determine how much funding they can\nallocate towards winning a slot."}),"\n",(0,o.jsx)(e.p,{children:"Project B fully controls how much they are willing to contribute to gaining a parachain slot.\nProject B need not work on creating a reward model for community contributors like Project A. In\ncontrast, crowdloan campaigns benefit projects with access to limited capital but have strong\ncommunity support. They are also beneficial for projects that can successfully bid to win the\nauction with self-funding but are looking for a mechanism to bootstrap their community and get\nnoticed by the key actors in the ecosystem."}),"\n",(0,o.jsx)(e.p,{children:"It is publicly visible on-chain whether or not a project is bidding directly or through a crowdloan\ncampaign. More details regarding creating and executing a crowdloan campaign are provided below."}),"\n",(0,o.jsx)(e.h2,{id:"starting-a-crowdloan-campaign",children:"Starting a Crowdloan Campaign"}),"\n",(0,o.jsxs)(e.p,{children:["Anyone who has registered a parachain can create a new crowdloan campaign for a slot by depositing a\nspecified number of tokens. A campaign is configured as a range of slots (i.e. the duration of the\n",(0,o.jsx)(e.a,{href:"/docs/learn-parachains",children:"parachain"})," will bid for), a cap, and a duration. The duration can last over\nseveral auctions as long as the range of slots matches those of the auction (i.e. the first lease\nperiod of the crowdloan is the same or bigger than that of the auction). This means a team will not\nneed to restart the campaign just because they do not secure a slot on their first attempt."]}),"\n",(0,o.jsx)(e.admonition,{title:"Crowdloan Submission Deposit Required",type:"info",children:(0,o.jsx)(e.p,{children:"To create a new crowdloan campaign, your account must have 500 DOT (or 100 KSM on Kusama)\ntransferrable which will be reserved for the duration of the crowdloan."})}),"\n",(0,o.jsx)(e.p,{children:"When setting the parameters of a crowdloan campaign, consider the following:"}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsx)(e.p,{children:"A crowdloan campaign can start well before the auction slot is opened."}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsxs)(e.p,{children:["The campaign creation form requires setting a crowdloan cap \u2014 the maximum amount a campaign\ncan collect. A team can still win an ",(0,o.jsx)(e.a,{href:"/docs/learn/learn-auction",children:"auction"})," if the cap is not reached."]}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsx)(e.p,{children:'Set the desired end of the crowdloan in the "Ending block" field. This helps ensure that the\ncrowdloan is live during the entire auction. For example, if an auction starts in three days and\nlasts five days, you should set your crowdloan to end in 10 days or a similar timescale.'}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsxs)(e.p,{children:["One way of calculating the ending block number is adding: ",(0,o.jsx)(e.code,{children:"(10 * 60 * 24 * 7) * (x * 6) + y"})]}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsxs)(e.p,{children:[(0,o.jsx)(e.code,{children:"x"})," is the number of auction periods you want the crowdloan to continue for"]}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsxs)(e.p,{children:[(0,o.jsx)(e.code,{children:"y"})," is the current block number"]}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsx)(e.p,{children:(0,o.jsx)(e.code,{children:"(Blocks/Min * Min/Hour * Hour/Day * Day/Week) * (x[Period] * Week/Period) + y[BlockNumber]"})}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsxs)(e.p,{children:['"First period" field refers to the first period you want to bid for. If the current auction\nencompasses periods ',(0,o.jsx)(e.code,{children:"(3, 4, 5, 6)"}),", your first period can be at least ",(0,o.jsx)(e.code,{children:"3"}),". The last slot must\nalso be within that range."]}),"\n"]}),"\n",(0,o.jsxs)(e.li,{children:["\n",(0,o.jsx)(e.p,{children:"You can only cancel an ongoing crowdloan if no contributions have been made. Your deposit will\nbe returned to you."}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(e.p,{children:["Before the start of the crowdloan campaign, the owner will upload the parachain data. Once the\ncrowdloan is live, ",(0,o.jsx)(e.strong,{children:"the parachain configuration will be locked"})," and will be deployed as the\nparachain's runtime. Of course, once the parachain is running, it can always change via runtime\nupgrades (as determined through its local governance)."]}),"\n",(0,o.jsx)(e.h2,{id:"supporting-a-crowdloan-campaign",children:"Supporting a Crowdloan Campaign"}),"\n",(0,o.jsx)(e.h3,{id:"contributing-to-crowdloans",children:"Contributing to Crowdloans"}),"\n",(0,o.jsx)(e.admonition,{title:"Minimum Crowdloan Contribution",type:"info",children:(0,o.jsxs)(e.p,{children:["There is a\n",(0,o.jsx)(e.a,{href:"/docs/chain-state-values#minimum-crowdloan-contribution",children:"minimum balance for contributions for a crowdloan campaign"}),".\nThis is to make crowdloans as accessible as possible while maintaining a balance to justify using\nthe network's resources."]})}),"\n",(0,o.jsxs)(e.p,{children:["Each created campaign will have an index. Once a crowdloan campaign is open, anyone can participate\nby sending a transaction referencing the campaign's index. Tokens used to participate must be\ntransferable \u2014 that is, not locked for any reason, including staking, vesting, and governance\n\u2014 because they will be moved into a module-controlled account that was generated uniquely for\nthis campaign. See ",(0,o.jsx)(e.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system accounts"})," for more\ninformation."]}),"\n",(0,o.jsx)(e.admonition,{title:"Do not send Crowdloan contributions directly to the Parachain address",type:"caution",children:(0,o.jsxs)(e.p,{children:["All crowdloan contributions are handled by the Crowdloan module\u2019s logic, where a campaign is\nidentified by an index, not by address. ",(0,o.jsx)(e.strong,{children:"Never transfer tokens to an address in support of a\ncampaign"}),"."]})}),"\n",(0,o.jsx)(e.p,{children:"It is up to individual parachain teams to decide if and how they want to reward participants who\nforgo staking and choose to lock their tokens in support of the parachain\u2019s campaign. As one can\nimagine, rewards will take many forms and may vary widely among projects."}),"\n",(0,o.jsx)(e.p,{children:"If a crowdloan campaign is successful, that parachain will be on-boarded to the relay chain. The\ncollective tokens will be locked in that parachain's account for the entire duration that it is\nactive."}),"\n",(0,o.jsx)(e.h3,{id:"withdraw-crowdloaned-tokens",children:"Withdraw Crowdloaned Tokens"}),"\n",(0,o.jsx)(e.p,{children:"Participants will be able to reclaim their tokens in one of two ways:"}),"\n",(0,o.jsxs)(e.ul,{children:["\n",(0,o.jsx)(e.li,{children:"If the campaign succeeds, the parachain will enter a retirement phase at the end of its lease.\nDuring this phase, participants can withdraw the tokens with which they participated."}),"\n",(0,o.jsx)(e.li,{children:"If the campaign is unsuccessful, this retirement phase will begin at its configured end, and\nparticipants can likewise withdraw their tokens."}),"\n"]}),"\n",(0,o.jsxs)(e.admonition,{type:"tip",children:[(0,o.jsxs)(e.mdxAdmonitionTitle,{children:[(0,o.jsx)(e.code,{children:"crowdloan.contribute"})," extrinsic is trustless"]}),(0,o.jsxs)(e.p,{children:["Contributing to a crowdloan through Polkadot JS Apps (which uses ",(0,o.jsx)(e.code,{children:"crowdloan.contribute"})," extrinsic)\nguarantees that you receive your tokens after the campaign ends. If you intend to contribute through\nother websites and custodial service providers like central exchanges, review their terms and\nconditions thoroughly and assess the associated risks."]})]}),"\n",(0,o.jsxs)(e.p,{children:["Note: When the lease periods won by the crowdloan have finished, or the crowdloan has ended without\nwinning a slot, anyone can trigger the refund of crowdloan contributions back to their original\nowners. This can be done through the permissionless ",(0,o.jsx)(e.code,{children:"crowdloan.refund"})," extrinsic available on\nPolkadot JS Apps > Developer > Extrinsics page, by specifying the parachain ID. This extrinsic may\nneed to be issued multiple times if the list of contributors is too long. All contributions must be\nreturned before the crowdloan is entirely deleted."]}),"\n",(0,o.jsx)(e.p,{children:(0,o.jsx)(e.img,{alt:"Crowdloan refund",src:a(1764).A+"",width:"1440",height:"552"})}),"\n",(0,o.jsxs)(e.p,{children:["Many projects will have dashboards that allow users to participate in their crowdloans. PolkadotJS\napps also offer a breakdown of ongoing crowdloans on the\n",(0,o.jsx)(e.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/parachains/crowdloan",children:"Apps page"}),"."]}),"\n",(0,o.jsx)(e.p,{children:"Here is an example of the crowdloans in play during the very first Kusama auction."}),"\n",(0,o.jsx)(e.p,{children:(0,o.jsx)(e.img,{alt:"crowdloan dashboard",src:a(41841).A+"",width:"2328",height:"1540"})}),"\n",(0,o.jsxs)(e.p,{children:["Furthermore, check out this video on\n",(0,o.jsx)(e.a,{href:"https://www.youtube.com/watch?v=YrTxDufrcQM",children:"How to Participate in Crowdloans"})," for steps on how to\naccess available crowdloans on PolkadotJS apps."]})]})}function p(n={}){const{wrapper:e}={...(0,t.R)(),...n.components};return e?(0,o.jsx)(e,{...n,children:(0,o.jsx)(h,{...n})}):h(n)}},67141:(n,e,a)=>{a.d(e,{A:()=>i});var o=a(96540),t=a(74848);const i=function(n){var e,a=n.message,i=(0,o.useState)(!0),r=i[0],s=i[1];return(0,t.jsx)(t.Fragment,{children:r&&(0,t.jsxs)("div",{className:"message-box",children:[(0,t.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,t.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(e=a,e.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},1764:(n,e,a)=>{a.d(e,{A:()=>o});const o=a.p+"assets/images/crowdloan-refund-a452b6b303e27c25b3e87c42577a9265.png"},41841:(n,e,a)=>{a.d(e,{A:()=>o});const o=a.p+"assets/images/kusama-crowdloans-0237f5d573dee5e221b51678b2ed25f1.png"},28453:(n,e,a)=>{a.d(e,{R:()=>r,x:()=>s});var o=a(96540);const t={},i=o.createContext(t);function r(n){const e=o.useContext(i);return o.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function s(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(t):n.components||t:r(n.components),o.createElement(i.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/bd701914.61955492.js b/assets/js/bd701914.61955492.js new file mode 100644 index 000000000000..22e38af58f1c --- /dev/null +++ b/assets/js/bd701914.61955492.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1077],{63298:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>o,metadata:()=>h,toc:()=>c});var n=t(74848),i=t(28453),r=t(67141);const o={id:"learn-parachains-faq",title:"Parachains FAQ",sidebar_label:"Parachains FAQ",description:"Parachains FAQ.",keywords:["parachains","application-specific","sharding","faq"],slug:"../learn-parachains-faq"},s=void 0,h={id:"learn/learn-parachains-faq",title:"Parachains FAQ",description:"Parachains FAQ.",source:"@site/../docs/learn/learn-parachains-faq.md",sourceDirName:"learn",slug:"/learn-parachains-faq",permalink:"/docs/learn-parachains-faq",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-parachains-faq.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-parachains-faq",title:"Parachains FAQ",sidebar_label:"Parachains FAQ",description:"Parachains FAQ.",keywords:["parachains","application-specific","sharding","faq"],slug:"../learn-parachains-faq"},sidebar:"docs",previous:{title:"System Parachains",permalink:"/docs/learn-system-chains"},next:{title:"Asynchronous Backing",permalink:"/docs/learn-async-backing"}},l={},c=[{value:"General",id:"general",level:2},{value:"What is "parachain consensus"?",id:"what-is-parachain-consensus",level:3},{value:"How about parachains that are not Substrate-based?",id:"how-about-parachains-that-are-not-substrate-based",level:3},{value:"Is 100 a hard limit on the number of Parachains that can be supported?",id:"is-100-a-hard-limit-on-the-number-of-parachains-that-can-be-supported",level:3},{value:"What happens to parachains when the number of validators drops below a certain threshold?",id:"what-happens-to-parachains-when-the-number-of-validators-drops-below-a-certain-threshold",level:3},{value:"Parachain Development Kits (PDKs)",id:"parachain-development-kits-pdks",level:3},{value:"Security",id:"security",level:2},{value:"Is security correlated to the number of validators? What about the number of parachains?",id:"is-security-correlated-to-the-number-of-validators-what-about-the-number-of-parachains",level:3},{value:"In what scenarios do parachains need their own security?",id:"in-what-scenarios-do-parachains-need-their-own-security",level:3}];function d(e){const a={a:"a",h2:"h2",h3:"h3",p:"p",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A,{message:"Parachain Slot Auctions and Crowdloans will be deprecated right after [Agile Coretime](./learn-agile-coretime) is activated on the network. For existing parachains, the remainder of the lease will automatically be converted to coretime. See more information [here](./learn-agile-coretime#implementation)."}),"\n",(0,n.jsx)(a.h2,{id:"general",children:"General"}),"\n",(0,n.jsx)(a.h3,{id:"what-is-parachain-consensus",children:'What is "parachain consensus"?'}),"\n",(0,n.jsx)(a.p,{children:'"Parachain consensus" is special in that it will follow the relay chain. Parachains cannot use other\nconsensus algorithms that provide their own finality. Only sovereign chains (that must bridge to the\nrelay chain via a parachain) can control their own consensus. Parachains have control over how\nblocks are authored and by whom. The relay chain guarantees valid state transitions. Executing a\nblock finality outside the context of the relay chain is outside the scope of trust that the relay\nchain provides.'}),"\n",(0,n.jsx)(a.h3,{id:"how-about-parachains-that-are-not-substrate-based",children:"How about parachains that are not Substrate-based?"}),"\n",(0,n.jsxs)(a.p,{children:["Substrate provides ",(0,n.jsx)(a.a,{href:"https://docs.substrate.io/main-docs/fundamentals/runtime-intro/",children:"FRAME Pallets"}),"\nas part of its framework to seamlessly build a rustic-based blockchain. Part of FRAME are pallets\nthat can be used for consensus. Polkadot, being a Substrate-based chain, relies on BABE as the block\nproduction scheme and GRANDPA as the finality gadget as part of its consensus mechanism.\nCollectively, this is a ",(0,n.jsx)(a.a,{href:"/docs/learn-consensus#hybrid-consensus",children:"Hybrid Consensus Model"}),", where block\nproduction and block finality are separate. Parachains only need to produce blocks as they can rely\non the relay chain to validate the state transitions. Thus, parachains can have their own block\nproduction where the ",(0,n.jsx)(a.a,{href:"/docs/learn-collator",children:"collators"})," act as the block producers, even if the\nparachain is not Substrate-based."]}),"\n",(0,n.jsx)(a.h3,{id:"is-100-a-hard-limit-on-the-number-of-parachains-that-can-be-supported",children:"Is 100 a hard limit on the number of Parachains that can be supported?"}),"\n",(0,n.jsxs)(a.p,{children:["No. The network went through a significant number of optimizations, and there are\n",(0,n.jsx)(a.a,{href:"https://polkadot.network/blog/polkadot-roadmap-roundup/",children:"several updates planned"})," in the near\nfuture. The exact number of parachains that the relay chain can support without any degradation in\nperformance is yet to be discovered. Also, with the\n",(0,n.jsx)(a.a,{href:"https://www.rob.tech/polkadot-blockspace-over-blockchains/",children:"blockspace over blockchains"})," paradigm\nwhich brings on-demand parachains into the picture, there is no hard limit number on the number of\nblockchains that can be supported by the relay chain."]}),"\n",(0,n.jsx)(a.h3,{id:"what-happens-to-parachains-when-the-number-of-validators-drops-below-a-certain-threshold",children:"What happens to parachains when the number of validators drops below a certain threshold?"}),"\n",(0,n.jsxs)(a.p,{children:["The minimal safe ratio of validators per parachain is 5:1. With a sufficiently large set of\nvalidators, the randomness of their distribution along with\n",(0,n.jsx)(a.a,{href:"/docs/learn-parachains-protocol#anv-protocol",children:"availability and validity"})," will make sure security is\non-par. However, should there be a big outage of a popular cloud provider or another network\nconnectivity catastrophe, it is reasonable to expect that the number of validators per chain will\ndrop."]}),"\n",(0,n.jsx)(a.p,{children:"Depending on how many validators went offline, the outcome differs."}),"\n",(0,n.jsx)(a.p,{children:"If a few validators went offline, the parachains whose validator groups are too small to validate a\nblock will skip those blocks. Their block production speed will slow down to an increment of six\nseconds until the situation is resolved and the optimal number of validators is in that parachain's\nvalidator group again."}),"\n",(0,n.jsx)(a.p,{children:"If anywhere from 30% to 50% of the validators go offline, availability will suffer because we need\ntwo-thirds of the validator set to back the parachain candidates. In other words, all parachains\nwill stop until the situation is resolved. Finality will also stop, but low-value transactions on\nthe relay chain should be safe enough to execute, despite common forks. Once the required number of\nvalidators are in the validator set again, parachains will resume block production."}),"\n",(0,n.jsxs)(a.p,{children:["Given that collators are full nodes of the relay chain and the parachain they are running, they will\nbe able to recognize a disruption as soon as it occurs and should stop producing block candidates.\nLikewise, it should be easy for them to recognize when it's safe to restart block production -\nperhaps based on finality delay, validator set size or some other factor that is yet to be decided\nwithin ",(0,n.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus",children:"Cumulus"}),"."]}),"\n",(0,n.jsx)(a.h3,{id:"parachain-development-kits-pdks",children:"Parachain Development Kits (PDKs)"}),"\n",(0,n.jsxs)(a.p,{children:["Parachain Development Kits are a set of tools that enable developers to create their own\napplications as parachains. For more information, see the PDK\ncontent](../build/build-parachains.md#parachain-development-kit-pdk) and\n",(0,n.jsx)(a.a,{href:"/docs/build-pdk",children:"Parachain Development page"}),"."]}),"\n",(0,n.jsx)(a.h2,{id:"security",children:"Security"}),"\n",(0,n.jsx)(a.h3,{id:"is-security-correlated-to-the-number-of-validators-what-about-the-number-of-parachains",children:"Is security correlated to the number of validators? What about the number of parachains?"}),"\n",(0,n.jsx)(a.p,{children:"Security is independent of the number of parachains that are connected to the Polkadot relay chain.\nThe correlation of security and the number of validators exists as the higher number of validators\nwill give the network stronger decentralization properties and make it harder to try to take down.\nHowever, the biggest indicator of the security of the network is the economic signal of the number\nof DOT that are bonded and staked. The greater the number of DOT staked by honest validators and\nnominators, the higher the minimum amount of DOT an attacker would need to acquire a validator slot."}),"\n",(0,n.jsx)(a.h3,{id:"in-what-scenarios-do-parachains-need-their-own-security",children:"In what scenarios do parachains need their own security?"}),"\n",(0,n.jsx)(a.p,{children:"Most parachains will not need to worry about their own security, since all state transitions will be\nsecured by the Polkadot relay chain validator set. However, in some cases (which are considered more\nexperimental), parachains may require their own security. In general, these cases will revolve\naround lack of data available to relay chain validators."}),"\n",(0,n.jsxs)(a.p,{children:["One example is if the state transition function is some succinct or zero-knowledge proof, the\nparachain would be responsible for keeping its data available as the relay chain won't have it.\nAdditionally, for chains with their own consensus, like the one that enables fast payments on\n",(0,n.jsx)(a.a,{href:"https://www.youtube.com/watch?v=sf5GMDlG7Uk",children:"Blink Network"}),", there would probably need to be a\nByzantine agreement between stakers before a parachain block is valid. The agreement would be\nnecessary because the data associated with the fast consensus would be unknown to relay chain\nvalidators."]})]})}function u(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},67141:(e,a,t)=>{t.d(a,{A:()=>r});var n=t(96540),i=t(74848);const r=function(e){var a,t=e.message,r=(0,n.useState)(!0),o=r[0],s=r[1];return(0,i.jsx)(i.Fragment,{children:o&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(a=t,a.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,a,t)=>{t.d(a,{R:()=>o,x:()=>s});var n=t(96540);const i={},r=n.createContext(i);function o(e){const a=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function s(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(r.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bd701914.a6313d17.js b/assets/js/bd701914.a6313d17.js deleted file mode 100644 index bf6562f14076..000000000000 --- a/assets/js/bd701914.a6313d17.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1077],{63298:(e,a,t)=>{t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>o,metadata:()=>h,toc:()=>c});var n=t(74848),i=t(28453),r=t(67141);const o={id:"learn-parachains-faq",title:"Parachains FAQ",sidebar_label:"Parachains FAQ",description:"Parachains FAQ.",keywords:["parachains","application-specific","sharding","faq"],slug:"../learn-parachains-faq"},s=void 0,h={id:"learn/learn-parachains-faq",title:"Parachains FAQ",description:"Parachains FAQ.",source:"@site/../docs/learn/learn-parachains-faq.md",sourceDirName:"learn",slug:"/learn-parachains-faq",permalink:"/docs/learn-parachains-faq",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-parachains-faq.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"learn-parachains-faq",title:"Parachains FAQ",sidebar_label:"Parachains FAQ",description:"Parachains FAQ.",keywords:["parachains","application-specific","sharding","faq"],slug:"../learn-parachains-faq"},sidebar:"docs",previous:{title:"System Parachains",permalink:"/docs/learn-system-chains"},next:{title:"Asynchronous Backing",permalink:"/docs/learn-async-backing"}},l={},c=[{value:"General",id:"general",level:2},{value:"What is "parachain consensus"?",id:"what-is-parachain-consensus",level:3},{value:"How about parachains that are not Substrate-based?",id:"how-about-parachains-that-are-not-substrate-based",level:3},{value:"Is 100 a hard limit on the number of Parachains that can be supported?",id:"is-100-a-hard-limit-on-the-number-of-parachains-that-can-be-supported",level:3},{value:"What happens to parachains when the number of validators drops below a certain threshold?",id:"what-happens-to-parachains-when-the-number-of-validators-drops-below-a-certain-threshold",level:3},{value:"Parachain Development Kits (PDKs)",id:"parachain-development-kits-pdks",level:3},{value:"Security",id:"security",level:2},{value:"Is security correlated to the number of validators? What about the number of parachains?",id:"is-security-correlated-to-the-number-of-validators-what-about-the-number-of-parachains",level:3},{value:"In what scenarios do parachains need their own security?",id:"in-what-scenarios-do-parachains-need-their-own-security",level:3}];function d(e){const a={a:"a",h2:"h2",h3:"h3",p:"p",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A,{message:"Parachain Slot Auctions and Crowdloans will be deprecated right after [Agile Coretime](./learn-agile-coretime.md) is activated on the network. For existing parachains, the remainder of the lease will automatically be converted to coretime. See more information [here](./learn-agile-coretime.md#implementation)."}),"\n",(0,n.jsx)(a.h2,{id:"general",children:"General"}),"\n",(0,n.jsx)(a.h3,{id:"what-is-parachain-consensus",children:'What is "parachain consensus"?'}),"\n",(0,n.jsx)(a.p,{children:'"Parachain consensus" is special in that it will follow the relay chain. Parachains cannot use other\nconsensus algorithms that provide their own finality. Only sovereign chains (that must bridge to the\nrelay chain via a parachain) can control their own consensus. Parachains have control over how\nblocks are authored and by whom. The relay chain guarantees valid state transitions. Executing a\nblock finality outside the context of the relay chain is outside the scope of trust that the relay\nchain provides.'}),"\n",(0,n.jsx)(a.h3,{id:"how-about-parachains-that-are-not-substrate-based",children:"How about parachains that are not Substrate-based?"}),"\n",(0,n.jsxs)(a.p,{children:["Substrate provides ",(0,n.jsx)(a.a,{href:"https://docs.substrate.io/main-docs/fundamentals/runtime-intro/",children:"FRAME Pallets"}),"\nas part of its framework to seamlessly build a rustic-based blockchain. Part of FRAME are pallets\nthat can be used for consensus. Polkadot, being a Substrate-based chain, relies on BABE as the block\nproduction scheme and GRANDPA as the finality gadget as part of its consensus mechanism.\nCollectively, this is a ",(0,n.jsx)(a.a,{href:"/docs/learn-consensus#hybrid-consensus",children:"Hybrid Consensus Model"}),", where block\nproduction and block finality are separate. Parachains only need to produce blocks as they can rely\non the relay chain to validate the state transitions. Thus, parachains can have their own block\nproduction where the ",(0,n.jsx)(a.a,{href:"/docs/learn-collator",children:"collators"})," act as the block producers, even if the\nparachain is not Substrate-based."]}),"\n",(0,n.jsx)(a.h3,{id:"is-100-a-hard-limit-on-the-number-of-parachains-that-can-be-supported",children:"Is 100 a hard limit on the number of Parachains that can be supported?"}),"\n",(0,n.jsxs)(a.p,{children:["No. The network went through a significant number of optimizations, and there are\n",(0,n.jsx)(a.a,{href:"https://polkadot.network/blog/polkadot-roadmap-roundup/",children:"several updates planned"})," in the near\nfuture. The exact number of parachains that the relay chain can support without any degradation in\nperformance is yet to be discovered. Also, with the\n",(0,n.jsx)(a.a,{href:"https://www.rob.tech/polkadot-blockspace-over-blockchains/",children:"blockspace over blockchains"})," paradigm\nwhich brings on-demand parachains into the picture, there is no hard limit number on the number of\nblockchains that can be supported by the relay chain."]}),"\n",(0,n.jsx)(a.h3,{id:"what-happens-to-parachains-when-the-number-of-validators-drops-below-a-certain-threshold",children:"What happens to parachains when the number of validators drops below a certain threshold?"}),"\n",(0,n.jsxs)(a.p,{children:["The minimal safe ratio of validators per parachain is 5:1. With a sufficiently large set of\nvalidators, the randomness of their distribution along with\n",(0,n.jsx)(a.a,{href:"/docs/learn-parachains-protocol#anv-protocol",children:"availability and validity"})," will make sure security is\non-par. However, should there be a big outage of a popular cloud provider or another network\nconnectivity catastrophe, it is reasonable to expect that the number of validators per chain will\ndrop."]}),"\n",(0,n.jsx)(a.p,{children:"Depending on how many validators went offline, the outcome differs."}),"\n",(0,n.jsx)(a.p,{children:"If a few validators went offline, the parachains whose validator groups are too small to validate a\nblock will skip those blocks. Their block production speed will slow down to an increment of six\nseconds until the situation is resolved and the optimal number of validators is in that parachain's\nvalidator group again."}),"\n",(0,n.jsx)(a.p,{children:"If anywhere from 30% to 50% of the validators go offline, availability will suffer because we need\ntwo-thirds of the validator set to back the parachain candidates. In other words, all parachains\nwill stop until the situation is resolved. Finality will also stop, but low-value transactions on\nthe relay chain should be safe enough to execute, despite common forks. Once the required number of\nvalidators are in the validator set again, parachains will resume block production."}),"\n",(0,n.jsxs)(a.p,{children:["Given that collators are full nodes of the relay chain and the parachain they are running, they will\nbe able to recognize a disruption as soon as it occurs and should stop producing block candidates.\nLikewise, it should be easy for them to recognize when it's safe to restart block production -\nperhaps based on finality delay, validator set size or some other factor that is yet to be decided\nwithin ",(0,n.jsx)(a.a,{href:"https://github.com/paritytech/polkadot-sdk/tree/master/cumulus",children:"Cumulus"}),"."]}),"\n",(0,n.jsx)(a.h3,{id:"parachain-development-kits-pdks",children:"Parachain Development Kits (PDKs)"}),"\n",(0,n.jsxs)(a.p,{children:["Parachain Development Kits are a set of tools that enable developers to create their own\napplications as parachains. For more information, see the PDK\ncontent](../build/build-parachains.md#parachain-development-kit-pdk) and\n",(0,n.jsx)(a.a,{href:"/docs/build-pdk",children:"Parachain Development page"}),"."]}),"\n",(0,n.jsx)(a.h2,{id:"security",children:"Security"}),"\n",(0,n.jsx)(a.h3,{id:"is-security-correlated-to-the-number-of-validators-what-about-the-number-of-parachains",children:"Is security correlated to the number of validators? What about the number of parachains?"}),"\n",(0,n.jsx)(a.p,{children:"Security is independent of the number of parachains that are connected to the Polkadot relay chain.\nThe correlation of security and the number of validators exists as the higher number of validators\nwill give the network stronger decentralization properties and make it harder to try to take down.\nHowever, the biggest indicator of the security of the network is the economic signal of the number\nof DOT that are bonded and staked. The greater the number of DOT staked by honest validators and\nnominators, the higher the minimum amount of DOT an attacker would need to acquire a validator slot."}),"\n",(0,n.jsx)(a.h3,{id:"in-what-scenarios-do-parachains-need-their-own-security",children:"In what scenarios do parachains need their own security?"}),"\n",(0,n.jsx)(a.p,{children:"Most parachains will not need to worry about their own security, since all state transitions will be\nsecured by the Polkadot relay chain validator set. However, in some cases (which are considered more\nexperimental), parachains may require their own security. In general, these cases will revolve\naround lack of data available to relay chain validators."}),"\n",(0,n.jsxs)(a.p,{children:["One example is if the state transition function is some succinct or zero-knowledge proof, the\nparachain would be responsible for keeping its data available as the relay chain won't have it.\nAdditionally, for chains with their own consensus, like the one that enables fast payments on\n",(0,n.jsx)(a.a,{href:"https://www.youtube.com/watch?v=sf5GMDlG7Uk",children:"Blink Network"}),", there would probably need to be a\nByzantine agreement between stakers before a parachain block is valid. The agreement would be\nnecessary because the data associated with the fast consensus would be unknown to relay chain\nvalidators."]})]})}function u(e={}){const{wrapper:a}={...(0,i.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},67141:(e,a,t)=>{t.d(a,{A:()=>r});var n=t(96540),i=t(74848);const r=function(e){var a,t=e.message,r=(0,n.useState)(!0),o=r[0],s=r[1];return(0,i.jsx)(i.Fragment,{children:o&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){s(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(a=t,a.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,a,t)=>{t.d(a,{R:()=>o,x:()=>s});var n=t(96540);const i={},r=n.createContext(i);function o(e){const a=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function s(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(r.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bf3ab9de.19765894.js b/assets/js/bf3ab9de.19765894.js new file mode 100644 index 000000000000..a2ab70e8ac88 --- /dev/null +++ b/assets/js/bf3ab9de.19765894.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2389],{75753:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>u,toc:()=>d});var n=t(74848),a=t(28453),s=(t(11470),t(19365),t(3514)),l=t(67141);const i={id:"learn-guides-bridges",title:"Polkadot-JS Guides about Bridge Hub",sidebar_label:"Bridge Hub Guides",description:"Polkadot-JS Guides about the Bridge Hub.",keywords:["Bridge","XCM","Bridge Hub","polkadot-js"],slug:"../learn-guides-bridges"},o=void 0,u={id:"learn/learn-guides-bridges",title:"Polkadot-JS Guides about Bridge Hub",description:"Polkadot-JS Guides about the Bridge Hub.",source:"@site/../docs/learn/learn-guides-bridges.md",sourceDirName:"learn",slug:"/learn-guides-bridges",permalink:"/docs/learn-guides-bridges",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-bridges.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-bridges",title:"Polkadot-JS Guides about Bridge Hub",sidebar_label:"Bridge Hub Guides",description:"Polkadot-JS Guides about the Bridge Hub.",keywords:["Bridge","XCM","Bridge Hub","polkadot-js"],slug:"../learn-guides-bridges"},sidebar:"docs",previous:{title:"Asset Conversion Tutorials",permalink:"/docs/learn-guides-asset-conversion"},next:{title:"DOT <> KSM Bridge",permalink:"/docs/learn-guides-dot-ksm-bridge"}},c={},d=[];function f(e){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsx)(s.A,{})]})}function p(e={}){const{wrapper:r}={...(0,a.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(f,{...e})}):f()}},67141:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(96540),a=t(74848);const s=function(e){var r,t=e.message,s=(0,n.useState)(!0),l=s[0],i=s[1];return(0,a.jsx)(a.Fragment,{children:l&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(r=t,r.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,r,t)=>{t.d(r,{A:()=>v});t(96540);var n=t(34164),a=t(26972),s=t(28774),l=t(53465),i=t(16654),o=t(21312),u=t(51107);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=t(74848);function f(e){var r=e.href,t=e.children;return(0,d.jsx)(s.A,{href:r,className:(0,n.A)("card padding--lg",c.cardContainer),children:t})}function p(e){var r=e.href,t=e.icon,a=e.title,s=e.description;return(0,d.jsxs)(f,{href:r,children:[(0,d.jsxs)(u.A,{as:"h2",className:(0,n.A)("text--truncate",c.cardTitle),title:a,children:[t," ",a]}),s&&(0,d.jsx)("p",{className:(0,n.A)("text--truncate",c.cardDescription),title:s,children:s})]})}function m(e){var r,t,n=e.item,s=(0,a.Nr)(n),i=(t=(0,l.W)().selectMessage,function(e){return t(e,(0,o.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,d.jsx)(p,{href:s,icon:"\ud83d\uddc3\ufe0f",title:n.label,description:null!=(r=n.description)?r:i(n.items.length)}):null}function h(e){var r,t,n=e.item,s=(0,i.A)(n.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",l=(0,a.cC)(null!=(r=n.docId)?r:void 0);return(0,d.jsx)(p,{href:n.href,icon:s,title:n.label,description:null!=(t=n.description)?t:null==l?void 0:l.description})}function b(e){var r=e.item;switch(r.type){case"link":return(0,d.jsx)(h,{item:r});case"category":return(0,d.jsx)(m,{item:r});default:throw new Error("unknown item type "+JSON.stringify(r))}}function g(e){var r=e.className,t=(0,a.$S)();return(0,d.jsx)(v,{items:t.items,className:r})}function v(e){var r=e.items,t=e.className;if(!r)return(0,d.jsx)(g,Object.assign({},e));var s=(0,a.d1)(r);return(0,d.jsx)("section",{className:(0,n.A)("row",t),children:s.map((function(e,r){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(b,{item:e})},r)}))})}},19365:(e,r,t)=>{t.d(r,{A:()=>l});t(96540);var n=t(34164);const a={tabItem:"tabItem_Ymn6"};var s=t(74848);function l(e){var r=e.children,t=e.hidden,l=e.className;return(0,s.jsx)("div",{role:"tabpanel",className:(0,n.A)(a.tabItem,l),hidden:t,children:r})}},11470:(e,r,t)=>{t.d(r,{A:()=>k});var n=t(96540),a=t(34164),s=t(23104),l=t(56347),i=t(205),o=t(57485),u=t(31682),c=t(75376);function d(e){var r,t;return null!=(r=null==(t=n.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,n.isValidElement)(e)&&((r=e.props)&&"object"==typeof r&&"value"in r))return e;var r;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?r:[]}function f(e){var r=e.values,t=e.children;return(0,n.useMemo)((function(){var e=null!=r?r:function(e){return d(e).map((function(e){var r=e.props;return{value:r.value,label:r.label,attributes:r.attributes,default:r.default}}))}(t);return function(e){var r=(0,u.XI)(e,(function(e,r){return e.value===r.value}));if(r.length>0)throw new Error('Docusaurus error: Duplicate values "'+r.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[r,t])}function p(e){var r=e.value;return e.tabValues.some((function(e){return e.value===r}))}function m(e){var r=e.queryString,t=void 0!==r&&r,a=e.groupId,s=(0,l.W6)(),i=function(e){var r=e.queryString,t=void 0!==r&&r,n=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:t,groupId:a});return[(0,o.aZ)(i),(0,n.useCallback)((function(e){if(i){var r=new URLSearchParams(s.location.search);r.set(i,e),s.replace(Object.assign({},s.location,{search:r.toString()}))}}),[i,s])]}function h(e){var r,t,a,s,l=e.defaultValue,o=e.queryString,u=void 0!==o&&o,d=e.groupId,h=f(e),b=(0,n.useState)((function(){return function(e){var r,t=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var a=null!=(r=n.find((function(e){return e.default})))?r:n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:l,tabValues:h})})),g=b[0],v=b[1],x=m({queryString:u,groupId:d}),y=x[0],j=x[1],k=(r=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),t=(0,c.Dv)(r),a=t[0],s=t[1],[a,(0,n.useCallback)((function(e){r&&s.set(e)}),[r,s])]),w=k[0],A=k[1],I=function(){var e=null!=y?y:w;return p({value:e,tabValues:h})?e:null}();return(0,i.A)((function(){I&&v(I)}),[I]),{selectedValue:g,selectValue:(0,n.useCallback)((function(e){if(!p({value:e,tabValues:h}))throw new Error("Can't select invalid tab value="+e);v(e),j(e),A(e)}),[j,A,h]),tabValues:h}}var b=t(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(74848);function x(e){var r=e.className,t=e.block,n=e.selectedValue,l=e.selectValue,i=e.tabValues,o=[],u=(0,s.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var r=e.currentTarget,t=o.indexOf(r),a=i[t].value;a!==n&&(u(r),l(a))},d=function(e){var r,t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var n,a=o.indexOf(e.currentTarget)+1;t=null!=(n=o[a])?n:o[0];break;case"ArrowLeft":var s,l=o.indexOf(e.currentTarget)-1;t=null!=(s=o[l])?s:o[o.length-1]}null==(r=t)||r.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},r),children:i.map((function(e){var r=e.value,t=e.label,s=e.attributes;return(0,v.jsx)("li",Object.assign({role:"tab",tabIndex:n===r?0:-1,"aria-selected":n===r,ref:function(e){return o.push(e)},onKeyDown:d,onClick:c},s,{className:(0,a.A)("tabs__item",g.tabItem,null==s?void 0:s.className,{"tabs__item--active":n===r}),children:null!=t?t:r}),r)}))})}function y(e){var r=e.lazy,t=e.children,s=e.selectedValue,l=(Array.isArray(t)?t:[t]).filter(Boolean);if(r){var i=l.find((function(e){return e.props.value===s}));return i?(0,n.cloneElement)(i,{className:(0,a.A)("margin-top--md",i.props.className)}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:l.map((function(e,r){return(0,n.cloneElement)(e,{key:r,hidden:e.props.value!==s})}))})}function j(e){var r=h(e);return(0,v.jsxs)("div",{className:(0,a.A)("tabs-container",g.tabList),children:[(0,v.jsx)(x,Object.assign({},r,e)),(0,v.jsx)(y,Object.assign({},r,e))]})}function k(e){var r=(0,b.A)();return(0,v.jsx)(j,Object.assign({},e,{children:d(e.children)}),String(r))}},53465:(e,r,t)=>{t.d(r,{W:()=>u});var n=t(96540),a=t(44586),s=["zero","one","two","few","many","other"];function l(e){return s.filter((function(r){return e.includes(r)}))}var i={locale:"en",pluralForms:l(["one","other"]),select:function(e){return 1===e?"one":"other"}};function o(){var e=(0,a.A)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return r=e,t=new Intl.PluralRules(r),{locale:r,pluralForms:l(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),i}var r,t}),[e])}function u(){var e=o();return{selectMessage:function(r,t){return function(e,r,t){var n=e.split("|");if(1===n.length)return n[0];n.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var a=t.select(r),s=t.pluralForms.indexOf(a);return n[Math.min(s,n.length-1)]}(t,r,e)}}}},28453:(e,r,t)=>{t.d(r,{R:()=>l,x:()=>i});var n=t(96540);const a={},s=n.createContext(a);function l(e){const r=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:l(e.components),n.createElement(s.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bf3ab9de.758936de.js b/assets/js/bf3ab9de.758936de.js deleted file mode 100644 index 1dd3713f15ca..000000000000 --- a/assets/js/bf3ab9de.758936de.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2389],{75753:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>u,toc:()=>d});var n=t(74848),a=t(28453),s=(t(11470),t(19365),t(3514)),l=t(67141);const o={id:"learn-guides-bridges",title:"Polkadot-JS Guides about Bridge Hub",sidebar_label:"Bridge Hub Guides",description:"Polkadot-JS Guides about the Bridge Hub.",keywords:["Bridge","XCM","Bridge Hub","polkadot-js"],slug:"../learn-guides-bridges"},i=void 0,u={id:"learn/learn-guides-bridges",title:"Polkadot-JS Guides about Bridge Hub",description:"Polkadot-JS Guides about the Bridge Hub.",source:"@site/../docs/learn/learn-guides-bridges.md",sourceDirName:"learn",slug:"/learn-guides-bridges",permalink:"/docs/learn-guides-bridges",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-bridges.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1714545713e3,frontMatter:{id:"learn-guides-bridges",title:"Polkadot-JS Guides about Bridge Hub",sidebar_label:"Bridge Hub Guides",description:"Polkadot-JS Guides about the Bridge Hub.",keywords:["Bridge","XCM","Bridge Hub","polkadot-js"],slug:"../learn-guides-bridges"},sidebar:"docs",previous:{title:"Asset Conversion Tutorials",permalink:"/docs/learn-guides-asset-conversion"},next:{title:"DOT <> KSM Bridge",permalink:"/docs/learn-guides-dot-ksm-bridge"}},c={},d=[];function f(e){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsx)(s.A,{})]})}function p(e={}){const{wrapper:r}={...(0,a.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(f,{...e})}):f()}},67141:(e,r,t)=>{t.d(r,{A:()=>s});var n=t(96540),a=t(74848);const s=function(e){var r,t=e.message,s=(0,n.useState)(!0),l=s[0],o=s[1];return(0,a.jsx)(a.Fragment,{children:l&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){o(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(r=t,r.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,r,t)=>{t.d(r,{A:()=>v});t(96540);var n=t(34164),a=t(26972),s=t(28774),l=t(53465),o=t(16654),i=t(21312),u=t(51107);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=t(74848);function f(e){var r=e.href,t=e.children;return(0,d.jsx)(s.A,{href:r,className:(0,n.A)("card padding--lg",c.cardContainer),children:t})}function p(e){var r=e.href,t=e.icon,a=e.title,s=e.description;return(0,d.jsxs)(f,{href:r,children:[(0,d.jsxs)(u.A,{as:"h2",className:(0,n.A)("text--truncate",c.cardTitle),title:a,children:[t," ",a]}),s&&(0,d.jsx)("p",{className:(0,n.A)("text--truncate",c.cardDescription),title:s,children:s})]})}function m(e){var r,t,n=e.item,s=(0,a.Nr)(n),o=(t=(0,l.W)().selectMessage,function(e){return t(e,(0,i.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,d.jsx)(p,{href:s,icon:"\ud83d\uddc3\ufe0f",title:n.label,description:null!=(r=n.description)?r:o(n.items.length)}):null}function h(e){var r,t,n=e.item,s=(0,o.A)(n.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",l=(0,a.cC)(null!=(r=n.docId)?r:void 0);return(0,d.jsx)(p,{href:n.href,icon:s,title:n.label,description:null!=(t=n.description)?t:null==l?void 0:l.description})}function b(e){var r=e.item;switch(r.type){case"link":return(0,d.jsx)(h,{item:r});case"category":return(0,d.jsx)(m,{item:r});default:throw new Error("unknown item type "+JSON.stringify(r))}}function g(e){var r=e.className,t=(0,a.$S)();return(0,d.jsx)(v,{items:t.items,className:r})}function v(e){var r=e.items,t=e.className;if(!r)return(0,d.jsx)(g,Object.assign({},e));var s=(0,a.d1)(r);return(0,d.jsx)("section",{className:(0,n.A)("row",t),children:s.map((function(e,r){return(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(b,{item:e})},r)}))})}},19365:(e,r,t)=>{t.d(r,{A:()=>l});t(96540);var n=t(34164);const a={tabItem:"tabItem_Ymn6"};var s=t(74848);function l(e){var r=e.children,t=e.hidden,l=e.className;return(0,s.jsx)("div",{role:"tabpanel",className:(0,n.A)(a.tabItem,l),hidden:t,children:r})}},11470:(e,r,t)=>{t.d(r,{A:()=>k});var n=t(96540),a=t(34164),s=t(23104),l=t(56347),o=t(205),i=t(57485),u=t(31682),c=t(75376);function d(e){var r,t;return null!=(r=null==(t=n.Children.toArray(e).filter((function(e){return"\n"!==e})).map((function(e){if(!e||(0,n.isValidElement)(e)&&((r=e.props)&&"object"==typeof r&&"value"in r))return e;var r;throw new Error("Docusaurus error: Bad child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:t.filter(Boolean))?r:[]}function f(e){var r=e.values,t=e.children;return(0,n.useMemo)((function(){var e=null!=r?r:function(e){return d(e).map((function(e){var r=e.props;return{value:r.value,label:r.label,attributes:r.attributes,default:r.default}}))}(t);return function(e){var r=(0,u.XI)(e,(function(e,r){return e.value===r.value}));if(r.length>0)throw new Error('Docusaurus error: Duplicate values "'+r.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[r,t])}function p(e){var r=e.value;return e.tabValues.some((function(e){return e.value===r}))}function m(e){var r=e.queryString,t=void 0!==r&&r,a=e.groupId,s=(0,l.W6)(),o=function(e){var r=e.queryString,t=void 0!==r&&r,n=e.groupId;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:t,groupId:a});return[(0,i.aZ)(o),(0,n.useCallback)((function(e){if(o){var r=new URLSearchParams(s.location.search);r.set(o,e),s.replace(Object.assign({},s.location,{search:r.toString()}))}}),[o,s])]}function h(e){var r,t,a,s,l=e.defaultValue,i=e.queryString,u=void 0!==i&&i,d=e.groupId,h=f(e),b=(0,n.useState)((function(){return function(e){var r,t=e.defaultValue,n=e.tabValues;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:n}))throw new Error('Docusaurus error: The has a defaultValue "'+t+'" but none of its children has the corresponding value. Available values are: '+n.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return t}var a=null!=(r=n.find((function(e){return e.default})))?r:n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:l,tabValues:h})})),g=b[0],v=b[1],x=m({queryString:u,groupId:d}),y=x[0],j=x[1],k=(r=function(e){return e?"docusaurus.tab."+e:null}({groupId:d}.groupId),t=(0,c.Dv)(r),a=t[0],s=t[1],[a,(0,n.useCallback)((function(e){r&&s.set(e)}),[r,s])]),w=k[0],A=k[1],I=function(){var e=null!=y?y:w;return p({value:e,tabValues:h})?e:null}();return(0,o.A)((function(){I&&v(I)}),[I]),{selectedValue:g,selectValue:(0,n.useCallback)((function(e){if(!p({value:e,tabValues:h}))throw new Error("Can't select invalid tab value="+e);v(e),j(e),A(e)}),[j,A,h]),tabValues:h}}var b=t(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(74848);function x(e){var r=e.className,t=e.block,n=e.selectedValue,l=e.selectValue,o=e.tabValues,i=[],u=(0,s.a_)().blockElementScrollPositionUntilNextRender,c=function(e){var r=e.currentTarget,t=i.indexOf(r),a=o[t].value;a!==n&&(u(r),l(a))},d=function(e){var r,t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":var n,a=i.indexOf(e.currentTarget)+1;t=null!=(n=i[a])?n:i[0];break;case"ArrowLeft":var s,l=i.indexOf(e.currentTarget)-1;t=null!=(s=i[l])?s:i[i.length-1]}null==(r=t)||r.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},r),children:o.map((function(e){var r=e.value,t=e.label,s=e.attributes;return(0,v.jsx)("li",Object.assign({role:"tab",tabIndex:n===r?0:-1,"aria-selected":n===r,ref:function(e){return i.push(e)},onKeyDown:d,onClick:c},s,{className:(0,a.A)("tabs__item",g.tabItem,null==s?void 0:s.className,{"tabs__item--active":n===r}),children:null!=t?t:r}),r)}))})}function y(e){var r=e.lazy,t=e.children,s=e.selectedValue,l=(Array.isArray(t)?t:[t]).filter(Boolean);if(r){var o=l.find((function(e){return e.props.value===s}));return o?(0,n.cloneElement)(o,{className:(0,a.A)("margin-top--md",o.props.className)}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:l.map((function(e,r){return(0,n.cloneElement)(e,{key:r,hidden:e.props.value!==s})}))})}function j(e){var r=h(e);return(0,v.jsxs)("div",{className:(0,a.A)("tabs-container",g.tabList),children:[(0,v.jsx)(x,Object.assign({},r,e)),(0,v.jsx)(y,Object.assign({},r,e))]})}function k(e){var r=(0,b.A)();return(0,v.jsx)(j,Object.assign({},e,{children:d(e.children)}),String(r))}},53465:(e,r,t)=>{t.d(r,{W:()=>u});var n=t(96540),a=t(44586),s=["zero","one","two","few","many","other"];function l(e){return s.filter((function(r){return e.includes(r)}))}var o={locale:"en",pluralForms:l(["one","other"]),select:function(e){return 1===e?"one":"other"}};function i(){var e=(0,a.A)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return r=e,t=new Intl.PluralRules(r),{locale:r,pluralForms:l(t.resolvedOptions().pluralCategories),select:function(e){return t.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),o}var r,t}),[e])}function u(){var e=i();return{selectMessage:function(r,t){return function(e,r,t){var n=e.split("|");if(1===n.length)return n[0];n.length>t.pluralForms.length&&console.error("For locale="+t.locale+", a maximum of "+t.pluralForms.length+" plural forms are expected ("+t.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var a=t.select(r),s=t.pluralForms.indexOf(a);return n[Math.min(s,n.length-1)]}(t,r,e)}}}},28453:(e,r,t)=>{t.d(r,{R:()=>l,x:()=>o});var n=t(96540);const a={},s=n.createContext(a);function l(e){const r=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:l(e.components),n.createElement(s.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c07c2447.7ab126e0.js b/assets/js/c07c2447.7ab126e0.js new file mode 100644 index 000000000000..7d58ade5ed2a --- /dev/null +++ b/assets/js/c07c2447.7ab126e0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7561],{572:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var o=t(74848),i=t(28453),s=t(67141);const a={id:"learn-guides-polkadot-opengov",title:"Polkadot-JS Guides about OpenGov",sidebar_label:"OpenGov Guides",description:"Polkadot-JS Guides about Polkadot OpenGov.",keywords:["opengov","polkadot opengov","referenda","cancel","polkadot-js"],slug:"../learn-guides-polkadot-opengov"},r=void 0,l={id:"learn/learn-guides-polkadot-opengov",title:"Polkadot-JS Guides about OpenGov",description:"Polkadot-JS Guides about Polkadot OpenGov.",source:"@site/../docs/learn/learn-guides-polkadot-opengov.md",sourceDirName:"learn",slug:"/learn-guides-polkadot-opengov",permalink:"/docs/learn-guides-polkadot-opengov",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-polkadot-opengov.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-polkadot-opengov",title:"Polkadot-JS Guides about OpenGov",sidebar_label:"OpenGov Guides",description:"Polkadot-JS Guides about Polkadot OpenGov.",keywords:["opengov","polkadot opengov","referenda","cancel","polkadot-js"],slug:"../learn-guides-polkadot-opengov"},sidebar:"docs",previous:{title:"Nomination Pool Guides",permalink:"/docs/learn-guides-staking-pools"},next:{title:"Treasury Guides",permalink:"/docs/learn-guides-treasury"}},d={},c=[{value:"Create a Referenda Proposal",id:"create-a-referenda-proposal",level:2},{value:"Submitting a Preimage",id:"submitting-a-preimage",level:3},{value:"Submitting a Proposal",id:"submitting-a-proposal",level:3},{value:"Submitting a Referendum on the Whitelisted Caller Track",id:"submitting-a-referendum-on-the-whitelisted-caller-track",level:3},{value:"Voting on Referenda",id:"voting-on-referenda",level:2},{value:"Removing Votes",id:"removing-votes",level:3},{value:"Removing Expired Voting Locks",id:"removing-expired-voting-locks",level:3},{value:"Delegations",id:"delegations",level:2},{value:"Delegate Votes",id:"delegate-votes",level:3},{value:"Undelegate Votes",id:"undelegate-votes",level:3},{value:"Remove Expired Locks from Delegations",id:"remove-expired-locks-from-delegations",level:3},{value:"Modify your Delegations",id:"modify-your-delegations",level:3},{value:"Claiming OpenGov Deposits",id:"claiming-opengov-deposits",level:2},{value:"Claiming the Preimage and Decision Deposits",id:"claiming-the-preimage-and-decision-deposits",level:3},{value:"Claiming the Referendum Submission Deposit",id:"claiming-the-referendum-submission-deposit",level:3},{value:"Cancel or Kill a Referendum",id:"cancel-or-kill-a-referendum",level:2},{value:"Interpreting On-Chain Voting Data",id:"interpreting-on-chain-voting-data",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"this page"})," to learn about Polkadot OpenGov."]}),"\n",(0,o.jsx)(n.p,{children:"This guide will instruct token holders how to propose and vote on public referenda using the\nReferenda module (OpenGov). Below are a few links to stay informed and directly engage with the\ncommunity."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction"})," - a place to discuss\ngovernance and the future of Polkadot."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://matrix.to/#/#Kusama-Direction:parity.io",children:"Kusama Direction"})," - a place to discuss\ngovernance and the future of Kusama."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://polkadot.polkassembly.io",children:"Polkadot"})," and ",(0,o.jsx)(n.a,{href:"https://kusama.polkassembly.io",children:"Kusama"}),"\nPolkassembly - for current referenda, latest proposals, motions, treasury proposals, tips,\nbounties, and more."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://matrix.to/#/#dailydigest:web3.foundation",children:"Polkadot Daily Digest"})," - News about what is\nhappening in the Polkadot ecosystem, published every weekday except holidays."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"create-a-referenda-proposal",children:"Create a Referenda Proposal"}),"\n",(0,o.jsxs)(n.p,{children:['Before submitting a referendum, identify the right track and origin for it. For instance, if the\nreferendum is for requesting funds from treasury, select the treasury track with appropriate spend\nlimits. If the referendum is for a suggestion to make changes to the protocol, select the "Wish for\nChange" track. For more info, check the\n',(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#origins-and-tracks",children:"tracks and origins"})," of Polkadot OpenGov."]}),"\n",(0,o.jsx)(n.h3,{id:"submitting-a-preimage",children:"Submitting a Preimage"}),"\n",(0,o.jsx)(n.p,{children:"The act of creating a proposal is split from submitting the preimage for the proposal since the\nstorage cost of submitting a large preimage could be expensive. Allowing the preimage submission to\ncome as a separate transaction means that another account could submit the preimage for you and pay\nthe fee. The example below demonstrates the creation of a preimage to propose and approve a spend of\ntreasury funds."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"submit preimage",src:t(79087).A+"",width:"2148",height:"1191"})}),"\n",(0,o.jsx)(n.p,{children:"Follow the steps below to submit a preimage as shown in the screenshot above."}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsx)(n.li,{children:"Navigate to Governance -> Referenda."}),"\n",(0,o.jsx)(n.li,{children:'Click on the "Add preimage" button.'}),"\n",(0,o.jsxs)(n.li,{children:["From the ",(0,o.jsx)(n.em,{children:"propose"})," drop-down field, select ",(0,o.jsx)(n.code,{children:"treasury"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["From the unlabeled drop-down field to the right of the ",(0,o.jsx)(n.em,{children:"propose"})," drop-down field, select\n",(0,o.jsx)(n.code,{children:"spendLocal(amount, beneficiary)"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["In the ",(0,o.jsx)(n.code,{children:"amount: Compact (BalanceOf)"})," text field, enter the spend amount in\n",(0,o.jsx)(n.a,{href:"/docs/learn-DOT#the-planck-unit",children:"plancks"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.code,{children:"beneficiary: MultiAddress (AccountIdLookupOf)"})," drop-down field will have ",(0,o.jsx)(n.code,{children:"Id"})," selected by\ndefault. Select the beneficiary from the ",(0,o.jsx)(n.code,{children:"Id: AccountId"})," drop-down field."]}),"\n"]}),"\n",(0,o.jsx)(n.admonition,{type:"info",children:(0,o.jsxs)(n.p,{children:["Copy the ",(0,o.jsx)(n.code,{children:"preimage hash"}),' value before clicking the "Submit preimage" button.']})}),"\n",(0,o.jsxs)(n.ol,{start:"7",children:["\n",(0,o.jsx)(n.li,{children:'Click the "Submit preimage" button.'}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"After the preimage is submitted successfully on-chain, Polkadot-JS UI lists it under the tab of\nGovernance -> Preimages."}),"\n",(0,o.jsx)(n.h3,{id:"submitting-a-proposal",children:"Submitting a Proposal"}),"\n",(0,o.jsx)(n.p,{children:'Submitting a proposal requires you to bond some tokens. On Polkadot-JS UI, you can navigate to the\nGovernance -> Referenda to make a new proposal. In order to submit a proposal, you will need to\nsubmit what\'s called the preimage hash. The preimage hash is simply the hash of the proposal to be\nenacted. The easiest way to get the preimage hash is by clicking on the "Submit preimage" button as\nshown in the previous section.'}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"submit proposal",src:t(60849).A+"",width:"1936",height:"1118"})}),"\n",(0,o.jsx)(n.p,{children:"The proposal will be registered from the account selected and the balance lock will be applied to\nit. An appropriate origin must be chosen, as each origin has different privileges, and acceptance\ncriteria. After entering the hash of the preimage for the proposal, the preimage length field is\nautomatically populated. The enactment delay can be specified either as a block number, or as a\nspecific number of blocks after the referendum is approved. The deposit for this proposal will be\nlocked for the referendum duration."}),"\n",(0,o.jsx)(n.h3,{id:"submitting-a-referendum-on-the-whitelisted-caller-track",children:"Submitting a Referendum on the Whitelisted Caller Track"}),"\n",(0,o.jsxs)(n.p,{children:["Let's consider increasing the number of validators participating in parachain consensus. You could\n",(0,o.jsx)(n.a,{href:"#submitting-a-preimage",children:"submit a preimage"})," with the call that sets the number of validators to\n1,000 and submit a referendum to the Root track directly. However, this requires a large decision\ndeposit and has very conservative passing parameters such that it will probably need the entire\n28-day voting period to pass."]}),"\n",(0,o.jsx)(n.p,{children:"Operations that are deemed safe or time critical by the Polkadot Technical Fellowship can use the\nWhitelisted Caller track. This track requires less turnout in the first half of the decision period\nso that it can pass more quickly. This track is typically used for more neutral, technical proposals\nlike runtime upgrades or changing the system's parachain validation configuration."}),"\n",(0,o.jsxs)(n.p,{children:["Using the Whitelisted Caller track requires some special calls. Submitting a referendum in the same\nform as other tracks will not work. Namely, rather than voting on a particular ",(0,o.jsx)(n.code,{children:"proposal"}),", the\nWhitelisted Caller track requires a vote to ",(0,o.jsx)(n.code,{children:"dispatch"})," the ",(0,o.jsx)(n.code,{children:"proposal"})," via the Whitelist pallet.\nBefore opening a referendum on this track, you should also attempt to get a positive signal from the\nFellowship that they will whitelist the proposal. If they do not, then even if the public referendum\npasses, it will not execute."]}),"\n",(0,o.jsx)(n.p,{children:"Below are the steps to follow when submitting a proposal to the Whitelist track."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"#submitting-a-preimage",children:"Submit a preimage"})," with the call to ",(0,o.jsx)(n.em,{children:"dispatch"})," the proposal (",(0,o.jsx)(n.code,{children:"call"}),") you\nwant to submit -- ",(0,o.jsx)(n.code,{children:"whitelist.dispatchWhitelistedCallWithPreimage(call)"})," -- and obtain the preimage\nhash. This is the preimage for the ",(0,o.jsx)(n.em,{children:"public referendum"})," on the Whitelisted Caller track."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"preimage-whitelist",src:t(56985).A+"",width:"2146",height:"1113"})}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Obtain the hash of ",(0,o.jsx)(n.code,{children:"call"}),". The Polkadot Fellowship needs to start a Fellowship referendum to\nwhitelist the call with ",(0,o.jsx)(n.code,{children:"whitelist.whitelistCall(callHash)"}),". The Fellowship referendum gets voted\non by the Polkadot Fellowship members only."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"call-hash",src:t(36585).A+"",width:"2257",height:"858"})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"The public now votes on the referendum. Someone must place a decision deposit to go into the\ndeciding phase."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Once passed, it gets enacted successfully as long as the call has been whitelisted by the\nFellowship."}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"Note that the public referendum and Fellowship referendum can happen simultaneously. However, if the\nFellowship does not whitelist the call, you must submit it directly to the Root origin."}),"\n",(0,o.jsx)(n.h2,{id:"voting-on-referenda",children:"Voting on Referenda"}),"\n",(0,o.jsx)(n.p,{children:"As Polkadot OpenGov takes both the approval and support into account, there are four options to\nchoose from when voting on a referendum:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Aye"}),"\n",(0,o.jsx)(n.li,{children:"Nay"}),"\n",(0,o.jsx)(n.li,{children:"Split"}),"\n",(0,o.jsx)(n.li,{children:"Abstain"}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"Also, you have to specify the conviction multiplier for this vote. The longer you are willing to\nlock your tokens, the stronger your vote will be weighted. Unwillingness to lock your tokens means\nthat your vote only counts for 10% of the tokens that you hold."}),"\n",(0,o.jsxs)(n.p,{children:["For detailed instructions on how to vote on Polkadot OpenGov referenda, check\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184120-polkadot-opengov-how-to-vote",children:"this support guide."})]}),"\n",(0,o.jsx)(n.admonition,{title:"Polkadot OpenGov uses Conviction Voting Pallet (Not Democracy Pallet)",type:"caution",children:(0,o.jsxs)(n.p,{children:["Use ",(0,o.jsx)(n.code,{children:"convictionVoting.vote"})," for voting on Referenda in Polkadot OpenGov instead of ",(0,o.jsx)(n.code,{children:"democracy.vote"}),"\n(which only works for the old version of governance)."]})}),"\n",(0,o.jsx)(n.h3,{id:"removing-votes",children:"Removing Votes"}),"\n",(0,o.jsxs)(n.p,{children:["To remove votes, you need to use the ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics tab"})," and\ncall the ",(0,o.jsx)(n.code,{children:"removeVote"})," function through the ",(0,o.jsx)(n.code,{children:"convictionVoting"})," pallet."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"rm-vote",src:t(36894).A+"",width:"2388",height:"594"})}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"class"})," is the ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins",children:"OpenGov track"})," of the referendum you voted\non and the ",(0,o.jsx)(n.code,{children:"index"})," is the referendum number."]}),"\n",(0,o.jsx)(n.h3,{id:"removing-expired-voting-locks",children:"Removing Expired Voting Locks"}),"\n",(0,o.jsxs)(n.p,{children:["To remove an expired lock, you need to use the\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics tab"})," and call the ",(0,o.jsx)(n.code,{children:"unlock"})," function through\nthe ",(0,o.jsx)(n.code,{children:"convictionVoting"})," pallet. Note that if you voted on referenda in multiple tracks, the tokens\nwill be unlocked after removing votes and unlocking on all the tracks. Similarly, if you you\n",(0,o.jsx)(n.a,{href:"#delegations",children:"delegated"})," on multiple tracks, the funds will be unlocked after\n",(0,o.jsx)(n.a,{href:"#undelegate-votes",children:"undelegating"})," and unlocking on all the tracks."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"rm-voting-lock",src:t(82187).A+"",width:"2382",height:"684"})}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"class"})," is the ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins",children:"OpenGov track"})," where you have the lock."]}),"\n",(0,o.jsxs)(n.p,{children:["For additional instructions, check\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184129-polkadot-js-ui-how-to-remove-expired-referenda-locks",children:"this support guide."})]}),"\n",(0,o.jsx)(n.h2,{id:"delegations",children:"Delegations"}),"\n",(0,o.jsx)(n.admonition,{title:"Video Tutorial about Delegations using the Polkadot-JS UI",type:"info",children:(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"https://youtu.be/PNGs11EvCB0",children:"this video tutorial"})," to learn about how to delegate, modify\ndelegations and remove delegations using the Polkadot-JS UI."]})}),"\n",(0,o.jsxs)(n.p,{children:["For an overview of how delegation works in Polkadot OpenGov, check out the\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#multirole-delegation",children:"Multirole Delegation"})," section on the\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Learn Polkadot OpenGov"})," page."]}),"\n",(0,o.jsxs)(n.p,{children:["Instructions to do delegations with Polkadot-JS are also available on the\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184776-polkadot-js-ui-how-to-delegate-your-voting-power-on-polkadot-opengov",children:"Support Pages"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"delegate-votes",children:"Delegate Votes"}),"\n",(0,o.jsxs)(n.p,{children:['You can start delegating your votes by clicking the "Delegate" button on\n',(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"}),"."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"js-delegation-start",src:t(28577).A+"",width:"1055",height:"497"})}),"\n",(0,o.jsxs)(n.p,{children:["If it is the first time you delegate or vote, there will be a banner message. You can delegate on a\nsingle track or all the tracks. You have an option to specify the number of votes (i.e., the number\nof tokens) and the ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#voluntary-locking",children:"conviction multiplier"}),'. After\nclicking "Next", you will need to specify the account to delegate your votes to, and after clicking\n"Delegate" and "Sign and Submit" your delegations will appear for each track (see below).']}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"js-delegation-allTracks",src:t(87236).A+"",width:"2116",height:"1438"})}),"\n",(0,o.jsx)(n.p,{children:"Note that if you want to delegate just a few tracks, you have two options:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:'Repeat the process using the "Delegate" button multiple times'}),"\n",(0,o.jsxs)(n.li,{children:["Issue a batch call with multiple ",(0,o.jsx)(n.code,{children:"convictionVoting.delegate"})," extrinsics under\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics"})]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"js-delegation-delegate",src:t(44176).A+"",width:"2694",height:"1104"})}),"\n",(0,o.jsx)(n.p,{children:'By clicking on "Add item" you can add new extrinsics for multiple tracks.'}),"\n",(0,o.jsx)(n.h3,{id:"undelegate-votes",children:"Undelegate Votes"}),"\n",(0,o.jsxs)(n.p,{children:['The "Delegate" button on ',(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"})," is only\nfor delegating votes. You cannot undelegate or modify your delegations. If you wish to undelegate,\nyou will need to go to ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics"})," and\nsubmit a ",(0,o.jsx)(n.code,{children:"convictionVoting.undelegate"})," extrinsic, specifying the track you wish to undelegate."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"js-delegation-undelegate",src:t(99829).A+"",width:"2708",height:"632"})}),"\n",(0,o.jsx)(n.p,{children:'Undelegated tracks will show up as "0 votes" on the Delegate tab.'}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"js-delegation-undelegate",src:t(38981).A+"",width:"2128",height:"1432"})}),"\n",(0,o.jsx)(n.p,{children:"After you undelegated, the conviction lock will start the countdown, and your funds will be\navailable for unlocking after the countdown ends."}),"\n",(0,o.jsx)(n.h3,{id:"remove-expired-locks-from-delegations",children:"Remove Expired Locks from Delegations"}),"\n",(0,o.jsxs)(n.p,{children:["To remove expired locks from delegations, you can\n",(0,o.jsx)(n.a,{href:"#removing-expired-voting-locks",children:"follow the same procedure as how to remove expired voting locks"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"modify-your-delegations",children:"Modify your Delegations"}),"\n",(0,o.jsxs)(n.p,{children:['The "Delegate" button on ',(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"})," is only\nfor delegating votes. You cannot undelegate or modify your delegations. If you wish to update the\ndelegated account, the conviction, and the number of votes you will need to go to\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics"}),", ",(0,o.jsx)(n.a,{href:"#undelegate-votes",children:"undelegate"}),"\nthe track and ",(0,o.jsx)(n.a,{href:"#delegate-votes",children:"delegate"})," again with updated information."]}),"\n",(0,o.jsx)(n.h2,{id:"claiming-opengov-deposits",children:"Claiming OpenGov Deposits"}),"\n",(0,o.jsx)(n.admonition,{title:"Video Tutorial about OpenGov deposits using the Polkadot-JS UI",type:"info",children:(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"https://youtu.be/kkEq5cqW2Pk",children:"this video tutorial"})," to learn about how to claim OpenGov deposits\nusing the Polkadot-JS UI."]})}),"\n",(0,o.jsx)(n.h3,{id:"claiming-the-preimage-and-decision-deposits",children:"Claiming the Preimage and Decision Deposits"}),"\n",(0,o.jsxs)(n.p,{children:["After a referendum finishes its life cycle (and gets approved or rejected or timed out), the\npreimage and decision deposits can be claimed. For claiming the preimage deposit, navigate to\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Polkadot-JS UI > Governance > Preimages"})," and click on\nunnote button shown on the preimage you submitted."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Claim Preimage Deposit",src:t(43214).A+"",width:"2828",height:"362"})}),"\n",(0,o.jsxs)(n.p,{children:["Similarly, to claim the decision deposit, navigate to\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Polkadot-JS UI > Governance > Referenda"})," and scroll down\nto the end of the page to click on the referenda with the decision deposit and claim it."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Claim Referendum Deposits",src:t(22450).A+"",width:"2830",height:"444"})}),"\n",(0,o.jsx)(n.h3,{id:"claiming-the-referendum-submission-deposit",children:"Claiming the Referendum Submission Deposit"}),"\n",(0,o.jsxs)(n.p,{children:["The submission deposit for a referendum can be claimed\n",(0,o.jsxs)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/cfb29254f74412cea35e8048d8aea94bc789fcb1/substrate/frame/referenda/src/types.rs#L261",children:["only if the referendum was ",(0,o.jsx)(n.code,{children:"Approved"})," or ",(0,o.jsx)(n.code,{children:"Canceled"})]}),".\nThe submission deposit can be claimed by issuing the ",(0,o.jsx)(n.code,{children:"refundSubmissionDeposit"})," extrinsic."]}),"\n",(0,o.jsxs)(n.p,{children:["Users can not refund their submission deposit while the referendum is ",(0,o.jsx)(n.code,{children:"Ongoing"})," or ",(0,o.jsx)(n.code,{children:"Rejected"}),".\nSimilarly, users cannot refund their submission deposit if the proposal has ",(0,o.jsx)(n.code,{children:"TimedOut"})," (failing to\nsubmit the decision deposit\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#opengov-referendum-timeout",children:"within specific period"})," will lead to a\nreferendum timeout). This behavior exists so that users can refrain from spamming the chain with\nproposals that have no interest from the community. If a proposal is in the ",(0,o.jsx)(n.code,{children:"TimedOut"})," state, any\nuser can call ",(0,o.jsx)(n.code,{children:"slash_proposal_deposit"}),", which will move the funds from the user to a\nruntime-configured account, like the treasury."]}),"\n",(0,o.jsxs)(n.p,{children:["To refund your slashed deposit, you can start a new referendum and specifically request a refund\nfrom the treasury. You need to make sure you have enough balance for a new submission and decision\ndeposit, and you will need to select the right track to ask for a refund. For example, the\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#small-tipper",children:"Small Tipper Track"})," would be fine for any kind of\ndeposit refund up to 250 DOT (8.25 KSM on Kusama)."]}),"\n",(0,o.jsx)(n.h2,{id:"cancel-or-kill-a-referendum",children:"Cancel or Kill a Referendum"}),"\n",(0,o.jsxs)(n.admonition,{type:"info",children:[(0,o.jsxs)(n.p,{children:["Anybody can cancel an ongoing referendum (i.e., a referendum within the Lead-in or\nvoting/confirmation period). For more information about the referenda timeline in Polkadot OpenGov,\nsee the ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#referenda-timeline",children:"dedicated page"}),"."]}),(0,o.jsxs)(n.p,{children:["To successfully cancel a referendum through the track ",(0,o.jsx)(n.code,{children:"20 / Referendum Canceller"}),", you will need to\nattain\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#referendum-canceller",children:"specific approval and support levels"}),"."]})]}),"\n",(0,o.jsxs)(n.p,{children:["To cancel a referendum, you need first to submit a preimage with the ",(0,o.jsx)(n.code,{children:"referenda.cancel"})," extrinsic.\nGo to the ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Polkadot-JS UI > Governance > Referenda"}),' and\nclick on the "Add Preimage" button. You must specify the ',(0,o.jsx)(n.code,{children:"referenda.cancel"})," extrinsic with the index\nequal to the ongoing Referendum you wish to cancel. In the screenshot below, the Referendum to be\ncancelled is 249."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"cancel-referenda-preimage-creation",src:t(53972).A+"",width:"2144",height:"944"})}),"\n",(0,o.jsxs)(n.p,{children:["This call will cancel the referendum and return the deposit. You can also kill a referendum using\nthe ",(0,o.jsx)(n.code,{children:"referenda.kill"})," extrinsic. This will cancel the referendum and slash the deposit."]}),"\n",(0,o.jsx)(n.admonition,{title:"Preimage Submission Deposit",type:"info",children:(0,o.jsx)(n.p,{children:"A deposit is required for the preimage to be stored on chain. The preimage deposit is proportional\nto the amount of information stored within the preimage. The deposit amount required for a preimage\nwith a treasury spend transaction is around 41 DOT (1.4 KSM on Kusama). Ensure you have enough\naccount balance to pay for this submission deposit as well as the transaction fees."})}),"\n",(0,o.jsxs)(n.p,{children:["Once a preimage is submitted, it can be checked under\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Governance > Preimages"}),"."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"cancel-referenda-preimage-check",src:t(50887).A+"",width:"2758",height:"190"})}),"\n",(0,o.jsxs)(n.p,{children:["You must copy the preimage to use it when you submit your proposal. To submit the proposal to cancel\nreferendum 249, for example, you need to go under\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"}),' and click the "Submit Proposal"\nbutton.']}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"cancel-referenda-proposal",src:t(29860).A+"",width:"2130",height:"1226"})}),"\n",(0,o.jsxs)(n.p,{children:["You must specify the account to submit the proposal (this can differ from the account used to create\nthe preimage). Then you will need to specify the track ",(0,o.jsx)(n.code,{children:"20 / Referendum Canceller"})," and add the\npreimage hash containing the specific action that will be enacted if the referendum passes. Note\nthat a ",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#opengov-submission-deposit",children:"submission deposit"})," will be\nreserved for submitting the proposal."]}),"\n",(0,o.jsxs)(n.p,{children:["Once the proposal has been submitted, it will stay in the Lead-in period until there is enough space\nwithin the track, and a\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#polkadot-opengov-terminology-and-parameters",children:"track-dependent preparation period and decision deposit"}),"\nhave been met. Failing to submit the decision deposit will ultimately lead to a\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#opengov-referendum-timeout",children:"referendum timeout"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"interpreting-on-chain-voting-data",children:"Interpreting On-Chain Voting Data"}),"\n",(0,o.jsx)(n.p,{children:"Below is the numeric conversion of the type of vote and conviction displayed in a block explorer."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"Nay 0.1x => 0\nNay 1x => 1\nNay 2x => 2\nNay 3x => 3\nNay 4x => 4\nNay 5x => 5\nNay 6x => 6\n\nAye 0.1x => 128\nAye 1x => 129\nAye 2x => 130\nAye 3x => 131\nAye 4x => 132\nAye 5x => 133\nAye 6x => 134\n"})}),"\n",(0,o.jsxs)(n.p,{children:["Take, for example, the information provided for\n",(0,o.jsx)(n.a,{href:"https://kusama.subscan.io/extrinsic/22460598-2",children:"this vote"}),". The vote ",(0,o.jsx)(n.code,{children:"131"})," means the account voted\nAye with 3x conviction."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"vote_numeric_conversion",src:t(71685).A+"",width:"870",height:"255"})}),"\n",(0,o.jsx)(n.p,{children:'At first glance, it may not be easy to interpret what you voted on. We need to take a step back and\nconsider the "voting data" at the binary level.'}),"\n",(0,o.jsx)(n.p,{children:"The vote is stored as a byte using a bitfield data structure and displayed on the block explorer as\na decimal integer. The bitfield stores both the conviction and aye/nay boolean, where the boolean is\nrepresented using the MSB of the byte. This would mean that the seven remaining bits are grouped to\nstore the conviction."})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(96540),i=t(74848);const s=function(e){var n,t=e.message,s=(0,o.useState)(!0),a=s[0],r=s[1];return(0,i.jsx)(i.Fragment,{children:a&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=t,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},50887:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/cancel-referenda-preimage-check-45ef7f984450113a2b1a87e9e2751d69.png"},53972:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/cancel-referenda-preimage-creation-3923463db47aec298f74a426dba23166.png"},29860:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/cancel-referenda-proposal-b9c5e90784ec8216360053d8bda84980.png"},43214:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/claim-preimage-deposit-069843b91eba35d4829b237b59ab2d12.png"},22450:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/claim-referendum-decision-deposit-6352bbad189dac6fe7a651b5a3c8f5a5.png"},36585:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/encoded-call-hash-4e0347923993beea4d12d5a787649f8f.png"},56985:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-submit-preimage-whitelist-67d383745b6e7b3ef31a37567e044e80.png"},60849:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-submit-proposal-0c82b35f3f7b1d9e66130a621b76c44b.png"},87236:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-allTracks-788efa580f296aa78b65b77691570181.png"},44176:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-delegate-3bcce735bcc35b831079cd44ad0eef15.png"},28577:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-start-c8186f8875fd402b993abfd5ab09f515.png"},99829:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-undelegate-a5018d2ecd2d5523f711199cd6fa1e63.png"},38981:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-undelegated-9b5efde53d2016c4e4b1f0f6b651ecf5.png"},36894:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/rm-vote-8572ff30a00c8d6fe903fae7a39147f4.png"},82187:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/rm-voting-lock-214119c2fcfe92488190b321cdfe823a.png"},79087:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/OpenGov-Treasury-Preimage-SpendLocal-693c955b1e3e27bb6c98a6aad4d1b697.png"},71685:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/vote_numeric_conversion-6aef93a6fd1ea92beabfcbe058ac876b.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>r});var o=t(96540);const i={},s=o.createContext(i);function a(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c07c2447.b88d694e.js b/assets/js/c07c2447.b88d694e.js deleted file mode 100644 index d9b8ebc0b9fc..000000000000 --- a/assets/js/c07c2447.b88d694e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7561],{572:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var o=t(74848),i=t(28453),s=t(67141);const a={id:"learn-guides-polkadot-opengov",title:"Polkadot-JS Guides about OpenGov",sidebar_label:"OpenGov Guides",description:"Polkadot-JS Guides about Polkadot OpenGov.",keywords:["opengov","polkadot opengov","referenda","cancel","polkadot-js"],slug:"../learn-guides-polkadot-opengov"},r=void 0,l={id:"learn/learn-guides-polkadot-opengov",title:"Polkadot-JS Guides about OpenGov",description:"Polkadot-JS Guides about Polkadot OpenGov.",source:"@site/../docs/learn/learn-guides-polkadot-opengov.md",sourceDirName:"learn",slug:"/learn-guides-polkadot-opengov",permalink:"/docs/learn-guides-polkadot-opengov",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-polkadot-opengov.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-guides-polkadot-opengov",title:"Polkadot-JS Guides about OpenGov",sidebar_label:"OpenGov Guides",description:"Polkadot-JS Guides about Polkadot OpenGov.",keywords:["opengov","polkadot opengov","referenda","cancel","polkadot-js"],slug:"../learn-guides-polkadot-opengov"},sidebar:"docs",previous:{title:"Nomination Pool Guides",permalink:"/docs/learn-guides-staking-pools"},next:{title:"Treasury Guides",permalink:"/docs/learn-guides-treasury"}},d={},c=[{value:"Create a Referenda Proposal",id:"create-a-referenda-proposal",level:2},{value:"Submitting a Preimage",id:"submitting-a-preimage",level:3},{value:"Submitting a Proposal",id:"submitting-a-proposal",level:3},{value:"Submitting a Referendum on the Whitelisted Caller Track",id:"submitting-a-referendum-on-the-whitelisted-caller-track",level:3},{value:"Voting on Referenda",id:"voting-on-referenda",level:2},{value:"Removing Votes",id:"removing-votes",level:3},{value:"Removing Expired Voting Locks",id:"removing-expired-voting-locks",level:3},{value:"Delegations",id:"delegations",level:2},{value:"Delegate Votes",id:"delegate-votes",level:3},{value:"Undelegate Votes",id:"undelegate-votes",level:3},{value:"Remove Expired Locks from Delegations",id:"remove-expired-locks-from-delegations",level:3},{value:"Modify your Delegations",id:"modify-your-delegations",level:3},{value:"Claiming OpenGov Deposits",id:"claiming-opengov-deposits",level:2},{value:"Claiming the Preimage and Decision Deposits",id:"claiming-the-preimage-and-decision-deposits",level:3},{value:"Claiming the Referendum Submission Deposit",id:"claiming-the-referendum-submission-deposit",level:3},{value:"Cancel or Kill a Referendum",id:"cancel-or-kill-a-referendum",level:2},{value:"Interpreting On-Chain Voting Data",id:"interpreting-on-chain-voting-data",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"this page"})," to learn about Polkadot OpenGov."]}),"\n",(0,o.jsx)(n.p,{children:"This guide will instruct token holders how to propose and vote on public referenda using the\nReferenda module (OpenGov). Below are a few links to stay informed and directly engage with the\ncommunity."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction"})," - a place to discuss\ngovernance and the future of Polkadot."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://matrix.to/#/#Kusama-Direction:parity.io",children:"Kusama Direction"})," - a place to discuss\ngovernance and the future of Kusama."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://polkadot.polkassembly.io",children:"Polkadot"})," and ",(0,o.jsx)(n.a,{href:"https://kusama.polkassembly.io",children:"Kusama"}),"\nPolkassembly - for current referenda, latest proposals, motions, treasury proposals, tips,\nbounties, and more."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"https://matrix.to/#/#dailydigest:web3.foundation",children:"Polkadot Daily Digest"})," - News about what is\nhappening in the Polkadot ecosystem, published every weekday except holidays."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"create-a-referenda-proposal",children:"Create a Referenda Proposal"}),"\n",(0,o.jsxs)(n.p,{children:['Before submitting a referendum, identify the right track and origin for it. For instance, if the\nreferendum is for requesting funds from treasury, select the treasury track with appropriate spend\nlimits. If the referendum is for a suggestion to make changes to the protocol, select the "Wish for\nChange" track. For more info, check the\n',(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#origins-and-tracks",children:"tracks and origins"})," of Polkadot OpenGov."]}),"\n",(0,o.jsx)(n.h3,{id:"submitting-a-preimage",children:"Submitting a Preimage"}),"\n",(0,o.jsx)(n.p,{children:"The act of creating a proposal is split from submitting the preimage for the proposal since the\nstorage cost of submitting a large preimage could be expensive. Allowing the preimage submission to\ncome as a separate transaction means that another account could submit the preimage for you and pay\nthe fee. The example below demonstrates the creation of a preimage to propose and approve a spend of\ntreasury funds."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"submit preimage",src:t(79087).A+"",width:"2148",height:"1191"})}),"\n",(0,o.jsx)(n.p,{children:"Follow the steps below to submit a preimage as shown in the screenshot above."}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsx)(n.li,{children:"Navigate to Governance -> Referenda."}),"\n",(0,o.jsx)(n.li,{children:'Click on the "Add preimage" button.'}),"\n",(0,o.jsxs)(n.li,{children:["From the ",(0,o.jsx)(n.em,{children:"propose"})," drop-down field, select ",(0,o.jsx)(n.code,{children:"treasury"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["From the unlabeled drop-down field to the right of the ",(0,o.jsx)(n.em,{children:"propose"})," drop-down field, select\n",(0,o.jsx)(n.code,{children:"spendLocal(amount, beneficiary)"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["In the ",(0,o.jsx)(n.code,{children:"amount: Compact (BalanceOf)"})," text field, enter the spend amount in\n",(0,o.jsx)(n.a,{href:"/docs/learn-DOT#the-planck-unit",children:"plancks"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.code,{children:"beneficiary: MultiAddress (AccountIdLookupOf)"})," drop-down field will have ",(0,o.jsx)(n.code,{children:"Id"})," selected by\ndefault. Select the beneficiary from the ",(0,o.jsx)(n.code,{children:"Id: AccountId"})," drop-down field."]}),"\n"]}),"\n",(0,o.jsx)(n.admonition,{type:"info",children:(0,o.jsxs)(n.p,{children:["Copy the ",(0,o.jsx)(n.code,{children:"preimage hash"}),' value before clicking the "Submit preimage" button.']})}),"\n",(0,o.jsxs)(n.ol,{start:"7",children:["\n",(0,o.jsx)(n.li,{children:'Click the "Submit preimage" button.'}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"After the preimage is submitted successfully on-chain, Polkadot-JS UI lists it under the tab of\nGovernance -> Preimages."}),"\n",(0,o.jsx)(n.h3,{id:"submitting-a-proposal",children:"Submitting a Proposal"}),"\n",(0,o.jsx)(n.p,{children:'Submitting a proposal requires you to bond some tokens. On Polkadot-JS UI, you can navigate to the\nGovernance -> Referenda to make a new proposal. In order to submit a proposal, you will need to\nsubmit what\'s called the preimage hash. The preimage hash is simply the hash of the proposal to be\nenacted. The easiest way to get the preimage hash is by clicking on the "Submit preimage" button as\nshown in the previous section.'}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"submit proposal",src:t(60849).A+"",width:"1936",height:"1118"})}),"\n",(0,o.jsx)(n.p,{children:"The proposal will be registered from the account selected and the balance lock will be applied to\nit. An appropriate origin must be chosen, as each origin has different privileges, and acceptance\ncriteria. After entering the hash of the preimage for the proposal, the preimage length field is\nautomatically populated. The enactment delay can be specified either as a block number, or as a\nspecific number of blocks after the referendum is approved. The deposit for this proposal will be\nlocked for the referendum duration."}),"\n",(0,o.jsx)(n.h3,{id:"submitting-a-referendum-on-the-whitelisted-caller-track",children:"Submitting a Referendum on the Whitelisted Caller Track"}),"\n",(0,o.jsxs)(n.p,{children:["Let's consider increasing the number of validators participating in parachain consensus. You could\n",(0,o.jsx)(n.a,{href:"#submitting-a-preimage",children:"submit a preimage"})," with the call that sets the number of validators to\n1,000 and submit a referendum to the Root track directly. However, this requires a large decision\ndeposit and has very conservative passing parameters such that it will probably need the entire\n28-day voting period to pass."]}),"\n",(0,o.jsx)(n.p,{children:"Operations that are deemed safe or time critical by the Polkadot Technical Fellowship can use the\nWhitelisted Caller track. This track requires less turnout in the first half of the decision period\nso that it can pass more quickly. This track is typically used for more neutral, technical proposals\nlike runtime upgrades or changing the system's parachain validation configuration."}),"\n",(0,o.jsxs)(n.p,{children:["Using the Whitelisted Caller track requires some special calls. Submitting a referendum in the same\nform as other tracks will not work. Namely, rather than voting on a particular ",(0,o.jsx)(n.code,{children:"proposal"}),", the\nWhitelisted Caller track requires a vote to ",(0,o.jsx)(n.code,{children:"dispatch"})," the ",(0,o.jsx)(n.code,{children:"proposal"})," via the Whitelist pallet.\nBefore opening a referendum on this track, you should also attempt to get a positive signal from the\nFellowship that they will whitelist the proposal. If they do not, then even if the public referendum\npasses, it will not execute."]}),"\n",(0,o.jsx)(n.p,{children:"Below are the steps to follow when submitting a proposal to the Whitelist track."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"#submitting-a-preimage",children:"Submit a preimage"})," with the call to ",(0,o.jsx)(n.em,{children:"dispatch"})," the proposal (",(0,o.jsx)(n.code,{children:"call"}),") you\nwant to submit -- ",(0,o.jsx)(n.code,{children:"whitelist.dispatchWhitelistedCallWithPreimage(call)"})," -- and obtain the preimage\nhash. This is the preimage for the ",(0,o.jsx)(n.em,{children:"public referendum"})," on the Whitelisted Caller track."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"preimage-whitelist",src:t(56985).A+"",width:"2146",height:"1113"})}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Obtain the hash of ",(0,o.jsx)(n.code,{children:"call"}),". The Polkadot Fellowship needs to start a Fellowship referendum to\nwhitelist the call with ",(0,o.jsx)(n.code,{children:"whitelist.whitelistCall(callHash)"}),". The Fellowship referendum gets voted\non by the Polkadot Fellowship members only."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"call-hash",src:t(36585).A+"",width:"2257",height:"858"})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"The public now votes on the referendum. Someone must place a decision deposit to go into the\ndeciding phase."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Once passed, it gets enacted successfully as long as the call has been whitelisted by the\nFellowship."}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"Note that the public referendum and Fellowship referendum can happen simultaneously. However, if the\nFellowship does not whitelist the call, you must submit it directly to the Root origin."}),"\n",(0,o.jsx)(n.h2,{id:"voting-on-referenda",children:"Voting on Referenda"}),"\n",(0,o.jsx)(n.p,{children:"As Polkadot OpenGov takes both the approval and support into account, there are four options to\nchoose from when voting on a referendum:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Aye"}),"\n",(0,o.jsx)(n.li,{children:"Nay"}),"\n",(0,o.jsx)(n.li,{children:"Split"}),"\n",(0,o.jsx)(n.li,{children:"Abstain"}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"Also, you have to specify the conviction multiplier for this vote. The longer you are willing to\nlock your tokens, the stronger your vote will be weighted. Unwillingness to lock your tokens means\nthat your vote only counts for 10% of the tokens that you hold."}),"\n",(0,o.jsxs)(n.p,{children:["For detailed instructions on how to vote on Polkadot OpenGov referenda, check\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184120-polkadot-opengov-how-to-vote",children:"this support guide."})]}),"\n",(0,o.jsx)(n.admonition,{title:"Polkadot OpenGov uses Conviction Voting Pallet (Not Democracy Pallet)",type:"caution",children:(0,o.jsxs)(n.p,{children:["Use ",(0,o.jsx)(n.code,{children:"convictionVoting.vote"})," for voting on Referenda in Polkadot OpenGov instead of ",(0,o.jsx)(n.code,{children:"democracy.vote"}),"\n(which only works for the old version of governance)."]})}),"\n",(0,o.jsx)(n.h3,{id:"removing-votes",children:"Removing Votes"}),"\n",(0,o.jsxs)(n.p,{children:["To remove votes, you need to use the ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics tab"})," and\ncall the ",(0,o.jsx)(n.code,{children:"removeVote"})," function through the ",(0,o.jsx)(n.code,{children:"convictionVoting"})," pallet."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"rm-vote",src:t(36894).A+"",width:"2388",height:"594"})}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"class"})," is the ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins",children:"OpenGov track"})," of the referendum you voted\non and the ",(0,o.jsx)(n.code,{children:"index"})," is the referendum number."]}),"\n",(0,o.jsx)(n.h3,{id:"removing-expired-voting-locks",children:"Removing Expired Voting Locks"}),"\n",(0,o.jsxs)(n.p,{children:["To remove an expired lock, you need to use the\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics tab"})," and call the ",(0,o.jsx)(n.code,{children:"unlock"})," function through\nthe ",(0,o.jsx)(n.code,{children:"convictionVoting"})," pallet. Note that if you voted on referenda in multiple tracks, the tokens\nwill be unlocked after removing votes and unlocking on all the tracks. Similarly, if you you\n",(0,o.jsx)(n.a,{href:"#delegations",children:"delegated"})," on multiple tracks, the funds will be unlocked after\n",(0,o.jsx)(n.a,{href:"#undelegate-votes",children:"undelegating"})," and unlocking on all the tracks."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"rm-voting-lock",src:t(82187).A+"",width:"2382",height:"684"})}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"class"})," is the ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins",children:"OpenGov track"})," where you have the lock."]}),"\n",(0,o.jsxs)(n.p,{children:["For additional instructions, check\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184129-polkadot-js-ui-how-to-remove-expired-referenda-locks",children:"this support guide."})]}),"\n",(0,o.jsx)(n.h2,{id:"delegations",children:"Delegations"}),"\n",(0,o.jsx)(n.admonition,{title:"Video Tutorial about Delegations using the Polkadot-JS UI",type:"info",children:(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"https://youtu.be/PNGs11EvCB0",children:"this video tutorial"})," to learn about how to delegate, modify\ndelegations and remove delegations using the Polkadot-JS UI."]})}),"\n",(0,o.jsxs)(n.p,{children:["For an overview of how delegation works in Polkadot OpenGov, check out the\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#multirole-delegation",children:"Multirole Delegation"})," section on the\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:"Learn Polkadot OpenGov"})," page."]}),"\n",(0,o.jsxs)(n.p,{children:["Instructions to do delegations with Polkadot-JS are also available on the\n",(0,o.jsx)(n.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184776-polkadot-js-ui-how-to-delegate-your-voting-power-on-polkadot-opengov",children:"Support Pages"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"delegate-votes",children:"Delegate Votes"}),"\n",(0,o.jsxs)(n.p,{children:['You can start delegating your votes by clicking the "Delegate" button on\n',(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"}),"."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"js-delegation-start",src:t(28577).A+"",width:"1055",height:"497"})}),"\n",(0,o.jsxs)(n.p,{children:["If it is the first time you delegate or vote, there will be a banner message. You can delegate on a\nsingle track or all the tracks. You have an option to specify the number of votes (i.e., the number\nof tokens) and the ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#voluntary-locking",children:"conviction multiplier"}),'. After\nclicking "Next", you will need to specify the account to delegate your votes to, and after clicking\n"Delegate" and "Sign and Submit" your delegations will appear for each track (see below).']}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"js-delegation-allTracks",src:t(87236).A+"",width:"2116",height:"1438"})}),"\n",(0,o.jsx)(n.p,{children:"Note that if you want to delegate just a few tracks, you have two options:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:'Repeat the process using the "Delegate" button multiple times'}),"\n",(0,o.jsxs)(n.li,{children:["Issue a batch call with multiple ",(0,o.jsx)(n.code,{children:"convictionVoting.delegate"})," extrinsics under\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics"})]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"js-delegation-delegate",src:t(44176).A+"",width:"2694",height:"1104"})}),"\n",(0,o.jsx)(n.p,{children:'By clicking on "Add item" you can add new extrinsics for multiple tracks.'}),"\n",(0,o.jsx)(n.h3,{id:"undelegate-votes",children:"Undelegate Votes"}),"\n",(0,o.jsxs)(n.p,{children:['The "Delegate" button on ',(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"})," is only\nfor delegating votes. You cannot undelegate or modify your delegations. If you wish to undelegate,\nyou will need to go to ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics"})," and\nsubmit a ",(0,o.jsx)(n.code,{children:"convictionVoting.undelegate"})," extrinsic, specifying the track you wish to undelegate."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"js-delegation-undelegate",src:t(99829).A+"",width:"2708",height:"632"})}),"\n",(0,o.jsx)(n.p,{children:'Undelegated tracks will show up as "0 votes" on the Delegate tab.'}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"js-delegation-undelegate",src:t(38981).A+"",width:"2128",height:"1432"})}),"\n",(0,o.jsx)(n.p,{children:"After you undelegated, the conviction lock will start the countdown, and your funds will be\navailable for unlocking after the countdown ends."}),"\n",(0,o.jsx)(n.h3,{id:"remove-expired-locks-from-delegations",children:"Remove Expired Locks from Delegations"}),"\n",(0,o.jsxs)(n.p,{children:["To remove expired locks from delegations, you can\n",(0,o.jsx)(n.a,{href:"#removing-expired-voting-locks",children:"follow the same procedure as how to remove expired voting locks"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"modify-your-delegations",children:"Modify your Delegations"}),"\n",(0,o.jsxs)(n.p,{children:['The "Delegate" button on ',(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"})," is only\nfor delegating votes. You cannot undelegate or modify your delegations. If you wish to update the\ndelegated account, the conviction, and the number of votes you will need to go to\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Developer > Extrinsics"}),", ",(0,o.jsx)(n.a,{href:"#undelegate-votes",children:"undelegate"}),"\nthe track and ",(0,o.jsx)(n.a,{href:"#delegate-votes",children:"delegate"})," again with updated information."]}),"\n",(0,o.jsx)(n.h2,{id:"claiming-opengov-deposits",children:"Claiming OpenGov Deposits"}),"\n",(0,o.jsx)(n.admonition,{title:"Video Tutorial about OpenGov deposits using the Polkadot-JS UI",type:"info",children:(0,o.jsxs)(n.p,{children:["See ",(0,o.jsx)(n.a,{href:"https://youtu.be/kkEq5cqW2Pk",children:"this video tutorial"})," to learn about how to claim OpenGov deposits\nusing the Polkadot-JS UI."]})}),"\n",(0,o.jsx)(n.h3,{id:"claiming-the-preimage-and-decision-deposits",children:"Claiming the Preimage and Decision Deposits"}),"\n",(0,o.jsxs)(n.p,{children:["After a referendum finishes its life cycle (and gets approved or rejected or timed out), the\npreimage and decision deposits can be claimed. For claiming the preimage deposit, navigate to\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Polkadot-JS UI > Governance > Preimages"})," and click on\nunnote button shown on the preimage you submitted."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Claim Preimage Deposit",src:t(43214).A+"",width:"2828",height:"362"})}),"\n",(0,o.jsxs)(n.p,{children:["Similarly, to claim the decision deposit, navigate to\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Polkadot-JS UI > Governance > Referenda"})," and scroll down\nto the end of the page to click on the referenda with the decision deposit and claim it."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Claim Referendum Deposits",src:t(22450).A+"",width:"2830",height:"444"})}),"\n",(0,o.jsx)(n.h3,{id:"claiming-the-referendum-submission-deposit",children:"Claiming the Referendum Submission Deposit"}),"\n",(0,o.jsxs)(n.p,{children:["The submission deposit for a referendum can be claimed\n",(0,o.jsxs)(n.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/cfb29254f74412cea35e8048d8aea94bc789fcb1/substrate/frame/referenda/src/types.rs#L261",children:["only if the referendum was ",(0,o.jsx)(n.code,{children:"Approved"})," or ",(0,o.jsx)(n.code,{children:"Canceled"})]}),".\nThe submission deposit can be claimed by issuing the ",(0,o.jsx)(n.code,{children:"refundSubmissionDeposit"})," extrinsic."]}),"\n",(0,o.jsxs)(n.p,{children:["Users can not refund their submission deposit while the referendum is ",(0,o.jsx)(n.code,{children:"Ongoing"})," or ",(0,o.jsx)(n.code,{children:"Rejected"}),".\nSimilarly, users cannot refund their submission deposit if the proposal has ",(0,o.jsx)(n.code,{children:"TimedOut"})," (failing to\nsubmit the decision deposit\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#opengov-referendum-timeout",children:"within specific period"})," will lead to a\nreferendum timeout). This behavior exists so that users can refrain from spamming the chain with\nproposals that have no interest from the community. If a proposal is in the ",(0,o.jsx)(n.code,{children:"TimedOut"})," state, any\nuser can call ",(0,o.jsx)(n.code,{children:"slash_proposal_deposit"}),", which will move the funds from the user to a\nruntime-configured account, like the treasury."]}),"\n",(0,o.jsxs)(n.p,{children:["To refund your slashed deposit, you can start a new referendum and specifically request a refund\nfrom the treasury. You need to make sure you have enough balance for a new submission and decision\ndeposit, and you will need to select the right track to ask for a refund. For example, the\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#small-tipper",children:"Small Tipper Track"})," would be fine for any kind of\ndeposit refund up to 250 DOT (8.25 KSM on Kusama)."]}),"\n",(0,o.jsx)(n.h2,{id:"cancel-or-kill-a-referendum",children:"Cancel or Kill a Referendum"}),"\n",(0,o.jsxs)(n.admonition,{type:"info",children:[(0,o.jsxs)(n.p,{children:["Anybody can cancel an ongoing referendum (i.e., a referendum within the Lead-in or\nvoting/confirmation period). For more information about the referenda timeline in Polkadot OpenGov,\nsee the ",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov#referenda-timeline",children:"dedicated page"}),"."]}),(0,o.jsxs)(n.p,{children:["To successfully cancel a referendum through the track ",(0,o.jsx)(n.code,{children:"20 / Referendum Canceller"}),", you will need to\nattain\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#referendum-canceller",children:"specific approval and support levels"}),"."]})]}),"\n",(0,o.jsxs)(n.p,{children:["To cancel a referendum, you need first to submit a preimage with the ",(0,o.jsx)(n.code,{children:"referenda.cancel"})," extrinsic.\nGo to the ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Polkadot-JS UI > Governance > Referenda"}),' and\nclick on the "Add Preimage" button. You must specify the ',(0,o.jsx)(n.code,{children:"referenda.cancel"})," extrinsic with the index\nequal to the ongoing Referendum you wish to cancel. In the screenshot below, the Referendum to be\ncancelled is 249."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"cancel-referenda-preimage-creation",src:t(53972).A+"",width:"2144",height:"944"})}),"\n",(0,o.jsxs)(n.p,{children:["This call will cancel the referendum and return the deposit. You can also kill a referendum using\nthe ",(0,o.jsx)(n.code,{children:"referenda.kill"})," extrinsic. This will cancel the referendum and slash the deposit."]}),"\n",(0,o.jsx)(n.admonition,{title:"Preimage Submission Deposit",type:"info",children:(0,o.jsx)(n.p,{children:"A deposit is required for the preimage to be stored on chain. The preimage deposit is proportional\nto the amount of information stored within the preimage. The deposit amount required for a preimage\nwith a treasury spend transaction is around 41 DOT (1.4 KSM on Kusama). Ensure you have enough\naccount balance to pay for this submission deposit as well as the transaction fees."})}),"\n",(0,o.jsxs)(n.p,{children:["Once a preimage is submitted, it can be checked under\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Governance > Preimages"}),"."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"cancel-referenda-preimage-check",src:t(50887).A+"",width:"2758",height:"190"})}),"\n",(0,o.jsxs)(n.p,{children:["You must copy the preimage to use it when you submit your proposal. To submit the proposal to cancel\nreferendum 249, for example, you need to go under\n",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Governance > Referenda"}),' and click the "Submit Proposal"\nbutton.']}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"cancel-referenda-proposal",src:t(29860).A+"",width:"2130",height:"1226"})}),"\n",(0,o.jsxs)(n.p,{children:["You must specify the account to submit the proposal (this can differ from the account used to create\nthe preimage). Then you will need to specify the track ",(0,o.jsx)(n.code,{children:"20 / Referendum Canceller"})," and add the\npreimage hash containing the specific action that will be enacted if the referendum passes. Note\nthat a ",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#opengov-submission-deposit",children:"submission deposit"})," will be\nreserved for submitting the proposal."]}),"\n",(0,o.jsxs)(n.p,{children:["Once the proposal has been submitted, it will stay in the Lead-in period until there is enough space\nwithin the track, and a\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov-origins#polkadot-opengov-terminology-and-parameters",children:"track-dependent preparation period and decision deposit"}),"\nhave been met. Failing to submit the decision deposit will ultimately lead to a\n",(0,o.jsx)(n.a,{href:"/docs/chain-state-values#opengov-referendum-timeout",children:"referendum timeout"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"interpreting-on-chain-voting-data",children:"Interpreting On-Chain Voting Data"}),"\n",(0,o.jsx)(n.p,{children:"Below is the numeric conversion of the type of vote and conviction displayed in a block explorer."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"Nay 0.1x => 0\nNay 1x => 1\nNay 2x => 2\nNay 3x => 3\nNay 4x => 4\nNay 5x => 5\nNay 6x => 6\n\nAye 0.1x => 128\nAye 1x => 129\nAye 2x => 130\nAye 3x => 131\nAye 4x => 132\nAye 5x => 133\nAye 6x => 134\n"})}),"\n",(0,o.jsxs)(n.p,{children:["Take, for example, the information provided for\n",(0,o.jsx)(n.a,{href:"https://kusama.subscan.io/extrinsic/22460598-2",children:"this vote"}),". The vote ",(0,o.jsx)(n.code,{children:"131"})," means the account voted\nAye with 3x conviction."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"vote_numeric_conversion",src:t(71685).A+"",width:"870",height:"255"})}),"\n",(0,o.jsx)(n.p,{children:'At first glance, it may not be easy to interpret what you voted on. We need to take a step back and\nconsider the "voting data" at the binary level.'}),"\n",(0,o.jsx)(n.p,{children:"The vote is stored as a byte using a bitfield data structure and displayed on the block explorer as\na decimal integer. The bitfield stores both the conviction and aye/nay boolean, where the boolean is\nrepresented using the MSB of the byte. This would mean that the seven remaining bits are grouped to\nstore the conviction."})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(96540),i=t(74848);const s=function(e){var n,t=e.message,s=(0,o.useState)(!0),a=s[0],r=s[1];return(0,i.jsx)(i.Fragment,{children:a&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=t,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},50887:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/cancel-referenda-preimage-check-45ef7f984450113a2b1a87e9e2751d69.png"},53972:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/cancel-referenda-preimage-creation-3923463db47aec298f74a426dba23166.png"},29860:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/cancel-referenda-proposal-b9c5e90784ec8216360053d8bda84980.png"},43214:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/claim-preimage-deposit-069843b91eba35d4829b237b59ab2d12.png"},22450:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/claim-referendum-decision-deposit-6352bbad189dac6fe7a651b5a3c8f5a5.png"},36585:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/encoded-call-hash-4e0347923993beea4d12d5a787649f8f.png"},56985:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-submit-preimage-whitelist-67d383745b6e7b3ef31a37567e044e80.png"},60849:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/opengov-submit-proposal-0c82b35f3f7b1d9e66130a621b76c44b.png"},87236:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-allTracks-788efa580f296aa78b65b77691570181.png"},44176:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-delegate-3bcce735bcc35b831079cd44ad0eef15.png"},28577:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-start-c8186f8875fd402b993abfd5ab09f515.png"},99829:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-undelegate-a5018d2ecd2d5523f711199cd6fa1e63.png"},38981:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/js-delegation-undelegated-9b5efde53d2016c4e4b1f0f6b651ecf5.png"},36894:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/rm-vote-8572ff30a00c8d6fe903fae7a39147f4.png"},82187:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/rm-voting-lock-214119c2fcfe92488190b321cdfe823a.png"},79087:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/OpenGov-Treasury-Preimage-SpendLocal-693c955b1e3e27bb6c98a6aad4d1b697.png"},71685:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/vote_numeric_conversion-6aef93a6fd1ea92beabfcbe058ac876b.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>r});var o=t(96540);const i={},s=o.createContext(i);function a(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c8dd560b.021e957d.js b/assets/js/c8dd560b.021e957d.js deleted file mode 100644 index 581b0937124d..000000000000 --- a/assets/js/c8dd560b.021e957d.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[4293],{77405:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var o=n(74848),s=n(28453),r=(n(47379),n(67141));const i={id:"learn-guides-accounts-proxy-pure",title:"Polkadot-JS Guides about Pure Proxy Accounts",sidebar_label:"Pure Proxy Guides",description:"Polkadot-JS Guides about Pure Proxy Accounts",keyword:["guides","polkadot-js","accounts","proxy","pure proxy","anonymous proxy"],slug:"../learn-guides-accounts-proxy-pure"},a=void 0,l={id:"learn/learn-guides-accounts-proxy-pure",title:"Polkadot-JS Guides about Pure Proxy Accounts",description:"Polkadot-JS Guides about Pure Proxy Accounts",source:"@site/../docs/learn/learn-guides-accounts-proxy-pure.md",sourceDirName:"learn",slug:"/learn-guides-accounts-proxy-pure",permalink:"/docs/learn-guides-accounts-proxy-pure",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts-proxy-pure.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-guides-accounts-proxy-pure",title:"Polkadot-JS Guides about Pure Proxy Accounts",sidebar_label:"Pure Proxy Guides",description:"Polkadot-JS Guides about Pure Proxy Accounts",keyword:["guides","polkadot-js","accounts","proxy","pure proxy","anonymous proxy"],slug:"../learn-guides-accounts-proxy-pure"},sidebar:"docs",previous:{title:"Proxy Guides",permalink:"/docs/learn-guides-accounts-proxy"},next:{title:"Transfer Guides",permalink:"/docs/learn-guides-transfers"}},c={},u=[{value:"Create and Remove Pure Proxies with Polkadot-JS",id:"create-and-remove-pure-proxies-with-polkadot-js",level:2},{value:"Advanced Account Management with Pure Proxies",id:"advanced-account-management-with-pure-proxies",level:2},{value:"Pure Proxies and Multisigs",id:"pure-proxies-and-multisigs",level:2},{value:"Scenario One: One Pure Proxy within a Multisig",id:"scenario-one-one-pure-proxy-within-a-multisig",level:3},{value:"Scenario Two: Multisig made of Pure Proxies",id:"scenario-two-multisig-made-of-pure-proxies",level:3},{value:"Scenario Three: Multisig controlling a Pure Proxy",id:"scenario-three-multisig-controlling-a-pure-proxy",level:3}];function d(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(t.admonition,{title:"The Account Tab in the Polkadot-JS UI cannot handle complex proxy setups",type:"caution",children:[(0,o.jsxs)(t.p,{children:["The Accounts Tab in the Polkadot-JS UI cannot handle complex proxy setups (e.g. a proxy -> multisig\n-> a pure proxy which is part of another multisig). These complex setups must be done using the\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics Tab"})," directly."]}),(0,o.jsxs)(t.p,{children:[(0,o.jsxs)(t.strong,{children:["We recommend to use the ",(0,o.jsx)(t.a,{href:"/docs/learn-DOT#getting-tokens-on-the-westend-testnet",children:"Westend Testnet"})," if\nyou are testing features for the first time."]})," By performing the complex proxy setups on the\ntestnet, you can comfortably replicate the procedure on the main networks."]})]}),"\n",(0,o.jsx)(t.admonition,{title:"Risk of loss of funds",type:"danger",children:(0,o.jsx)(t.p,{children:"Read carefully the text below and before performing any action using pure proxies, experiment on the\nWestend testnet."})}),"\n",(0,o.jsx)(t.h2,{id:"create-and-remove-pure-proxies-with-polkadot-js",children:"Create and Remove Pure Proxies with Polkadot-JS"}),"\n",(0,o.jsxs)(t.p,{children:["To create a ",(0,o.jsx)(t.strong,{children:"pure proxy"})," see\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182196",children:"this support article"}),", or\nwatch ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T443RcCYP24",children:"this technical explainer video"}),"."]}),"\n",(0,o.jsx)(t.admonition,{title:"Removing Pure Proxies",type:"caution",children:(0,o.jsxs)(t.p,{children:["The procedure for removing a ",(0,o.jsx)(t.em,{children:"pure"}),' proxy is different from the one used to remove other proxies.\nVisit the section "Removing an Anonymous Proxy" on\n',(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182196",children:"this support article"}),", or\nwatch ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T443RcCYP24",children:"this technical explainer video"}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:["Learn more about pure proxies from our\n",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=YkYApbhU3i0",children:"technical explainer video"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"advanced-account-management-with-pure-proxies",children:"Advanced Account Management with Pure Proxies"}),"\n",(0,o.jsx)(t.admonition,{title:"Walk-through tutorial video of Account Management",type:"info",children:(0,o.jsxs)(t.p,{children:["You can see ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=YkYApbhU3i0",children:"this video tutorial"})," that goes through the\nexample below. The tutorial requires some familiarity with the Extrinsic Tab of the Polkadot-JS UI."]})}),"\n",(0,o.jsx)(t.p,{children:"Let's take for example 3 accounts belonging to Charlie, Dan and Eleanor working for Company X.\nCharlie holds funds belonging to Company X, but he wants to leave the company and transfer the\neconomic responsibility to Eleanor. Dan is a staking proxy of Charlie."}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsxs)(t.strong,{children:["Without ",(0,o.jsx)(t.em,{children:"Pure"})," Proxy"]}),", Charlie must (see ",(0,o.jsx)(t.em,{children:"left"})," side of the Figure below):"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Remove Dan as a staking proxy, this step requires 1 signature"}),"\n",(0,o.jsx)(t.li,{children:"Stop nominating and unbound all funds , this step requires 2 signatures"}),"\n",(0,o.jsx)(t.li,{children:"Transfer the funds to Eleanor, this step requires 1 signature"}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"Then Eleanor adds Dan as a staking proxy (1 signature). The whole process requires 5 signatures.\nHere we are presenting a simple example, in fact, with multi-signature accounts and multiple proxies\nthe procedure would be more time-consuming and labor-intensive."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"why anonymous proxies",src:n(79022).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsxs)(t.strong,{children:["With ",(0,o.jsx)(t.em,{children:"Pure"})," Proxy"]})," (see ",(0,o.jsx)(t.em,{children:"right"})," side of the Figure above), Charlie must add Eleanor as ",(0,o.jsx)(t.em,{children:"any"}),"\nproxy of the ",(0,o.jsx)(t.em,{children:"pure"})," proxy, and remove himself (or Eleanor can remove him). The process requires just\n2 signatures (1 signature to add the new ",(0,o.jsx)(t.em,{children:"any"})," proxy and 1 signature the remove the old one). The\nfunds remain in the ",(0,o.jsx)(t.em,{children:"pure"})," proxy, and it is not necessary to stop nominating or unbond funds. Also,\nany proxy relationships with the ",(0,o.jsx)(t.em,{children:"pure"})," proxy stay in place. Thus, if we use the ",(0,o.jsx)(t.em,{children:"pure"})," proxy, with\nan increasing number of proxies we will always have to sign twice (not necessarily true in\nmulti-signature accounts). While if we are not using the ",(0,o.jsx)(t.em,{children:"pure"})," proxy, the more the proxies the more\nsignatures we need to detach them from the old stash and attach them to the new stash (see Figure\nbelow)."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"anon vs stash plot",src:n(47862).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(t.h2,{id:"pure-proxies-and-multisigs",children:"Pure Proxies and Multisigs"}),"\n",(0,o.jsx)(t.h3,{id:"scenario-one-one-pure-proxy-within-a-multisig",children:"Scenario One: One Pure Proxy within a Multisig"}),"\n",(0,o.jsx)(t.admonition,{title:"Walk-through tutorial video",type:"info",children:(0,o.jsxs)(t.p,{children:["You can see ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=iGRoGstB_pQ",children:"this video tutorial"})," that goes through\nthis scenario. The tutorial requires some familiarity with the Extrinsic Tab of the Polkadot-JS UI."]})}),"\n",(0,o.jsxs)(t.p,{children:["It is possible to put a ",(0,o.jsx)(t.em,{children:"pure"})," proxy within a multisig, and then transactions will be signed by the\n",(0,o.jsx)(t.em,{children:"any"})," proxy on behalf of the ",(0,o.jsx)(t.em,{children:"pure"})," proxy (proxied account). Let's take for example the diagram\nbelow. Alice, Bob and Anon are part of the multisig ABC, a multisig account with threshold 2. P-C is\na ",(0,o.jsx)(t.em,{children:"pure"})," proxy spawned by Charlie, who now acts as ",(0,o.jsx)(t.em,{children:"any"})," proxy and thus signs anything on behalf of\nP-C. The ",(0,o.jsx)(t.em,{children:"pure"})," proxy cannot sign directly because it does not have a private key. So, for example,\nto send funds from the multisig to Dan, Charly needs to submit a ",(0,o.jsx)(t.code,{children:"proxy.proxy"})," extrinsic to P-C,\nwhich in turn will submit a ",(0,o.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic to ABC containing the call data for the\n",(0,o.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsic about the transfer of some funds from ABC to Dan. Alice can\nthen approve the transfer by submitting a ",(0,o.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic also containing the call data\nfor the ",(0,o.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsic about the transfer of some funds from ABC to Dan."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"multisig with one anon",src:n(87091).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(t.p,{children:["If Charly wants to leave the multisig, a new ",(0,o.jsx)(t.em,{children:"any"})," proxy can be added to P-C and Charly can be\nremoved (by himself or by the new ",(0,o.jsx)(t.em,{children:"any"})," proxy). Note that the multisig also contains Bob that in\nthis specific example does not do anything."]}),"\n",(0,o.jsx)(t.admonition,{title:"Proxy calls",type:"note",children:(0,o.jsxs)(t.p,{children:["To use a ",(0,o.jsx)(t.em,{children:"pure"})," proxy within a multisig you need to use the Extrinsic Tab and generate a\n",(0,o.jsx)(t.code,{children:"proxy.proxy"})," extrinsic. If you try to sign a multisig transaction using the ",(0,o.jsx)(t.em,{children:"pure"})," proxy you will\nbe prompted with a warning. Remember, you cannot sign something directly if you do not have a\nprivate key."]})}),"\n",(0,o.jsx)(t.h3,{id:"scenario-two-multisig-made-of-pure-proxies",children:"Scenario Two: Multisig made of Pure Proxies"}),"\n",(0,o.jsx)(t.admonition,{title:"Walk-through Tutorial Video",type:"info",children:(0,o.jsxs)(t.p,{children:["You can see ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=F82C3zDNJyk",children:"this video tutorial"})," that goes through\nthis scenario. The tutorial requires some familiarity with the Extrinsic Tab of the Polkadot-JS UI."]})}),"\n",(0,o.jsxs)(t.p,{children:["The diagram below shows a multisig that is made only with ",(0,o.jsx)(t.em,{children:"pure"})," proxies (P-A, P-B and P-C). In this\nsituation Alice, Bob or Charly can leave the multisig at any time without the requirement of\ncreating a new multisig. If for example, Bob leaves the multisig the procedure will require somebody\nelse to be added as ",(0,o.jsx)(t.em,{children:"any"})," proxy to P-B, and then Bob can remove himself (or the new ",(0,o.jsx)(t.em,{children:"any"})," proxy can\nremove Bob)."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"multisig with anons",src:n(79947).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(t.p,{children:["In the diagram above, Alice submits the ",(0,o.jsx)(t.code,{children:"proxy.proxy"})," extrinsic to P-A, which in turn submits the\n",(0,o.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic containing the ",(0,o.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsic about the\ntransfer of some tokens from ABC to Dan. Then, Charly does the same to confirm the transaction. Note\nthat Charly will need to pay for some weight, for the computation that is necessary to execute the\ntransaction."]}),"\n",(0,o.jsx)(t.h3,{id:"scenario-three-multisig-controlling-a-pure-proxy",children:"Scenario Three: Multisig controlling a Pure Proxy"}),"\n",(0,o.jsxs)(t.p,{children:["This setup is used by the ",(0,o.jsx)(t.a,{href:"/docs/multisig-apps#multix",children:"MultiX"})," tool."]}),"\n",(0,o.jsxs)(t.p,{children:["After its creation, a multi-signature account creates a pure proxy that becomes the proxied account.\nThe multi-signature account behaves as ",(0,o.jsx)(t.em,{children:"any"})," proxy of the pure. If signatories of the\nmulti-signature account change, a new multisig can be created, assigned as ",(0,o.jsx)(t.em,{children:"any"})," proxy of the pure,\nand then the old multisig can be removed as a proxy."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"multisig with pure",src:n(4782).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(t.p,{children:["Compared to ",(0,o.jsx)(t.a,{href:"#scenario-two-multisig-made-of-pure-proxies",children:"Scenario Two"}),", signatories do not need to\ncreate pure proxies here. Multisig controlling a Pure Proxy is a more practical solution, where the\nsignatories, number of signatories and/or the threshold can be changed, which changes the multisig\naddress but does not impact the pure proxy address. In Scenario Two, if signatories behind the pure\nproxies change, the address of the multisig stays the same. However, changing the number of\nsignatories and threshold would not be possible."]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},67141:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(96540),s=n(74848);const r=function(e){var t,n=e.message,r=(0,o.useState)(!0),i=r[0],a=r[1];return(0,s.jsx)(s.Fragment,{children:i&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){a(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var o=n(90675),s=n(10467),r=n(96540),i=n(19588),a=n(2026),l=n(11135);function c(e,t,n){return u.apply(this,arguments)}function u(){return(u=(0,s.A)((0,o.A)().mark((function e(t,n,s){var r,l,c,u,d;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return r="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return r="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return r="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return r="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return r="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return r="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==r){e.next=22;break}return e.abrupt("return");case 22:return c=new i.E(r),e.next=25,a.G.create({provider:c});case 25:u=e.sent,(d=n.split(".")).forEach((function(e){e in u&&(u=u[e])})),e.t1=d[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=u.toString(),e.abrupt("break",39);case 33:return e.next=35,u();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+d[0]+") in "+n);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,n,o){switch(t){case"humanReadable":(0,l.HumanReadable)(e,n,o);break;case"precise":(0,l.Precise)(e,n,o);break;case"blocksToDays":(0,l.BlocksToDays)(e,o);break;case"erasToDays":(0,l.ErasToDays)(e,o,n);break;case"percentage":(0,l.Percentage)(e,o);break;case"permillToPercent":(0,l.PermillToPercent)(e,o);break;case"arrayLength":(0,l.ArrayLength)(e,o);break;default:return void console.log("Ignoring unknown filter type")}}const h=function(e){var t=e.network,n=e.path,i=e.defaultValue,a=e.filter,l=void 0===a?void 0:a,u=(0,r.useState)(""),h=u[0],p=u[1];return t=t.toLowerCase(),(0,r.useEffect)((function(){void 0!==l?d(i.toString(),l,t,p):p(i.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var r=function(){var e=(0,s.A)((0,o.A)().mark((function e(){var s;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,n,p);case 2:if(void 0!==(s=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?d(s,l,t,p):p(s);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{r()}catch(a){console.log(a)}}}),[]),h}},11135:e=>{var t="polkadot",n="kusama",o="statemine",s="statemint",r="polkadotpeople",i="kusamapeople",a={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var u=void 0;if(l===t||l===s)u=3;else if(l===n||l===o||l===r)u=6;else{if(l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");u=8}e=parseFloat(e),c((e=Number.isInteger(e/a[l].precision)?e/a[l].precision+" "+a[l].symbol:(e/a[l].precision).toFixed(u)+" "+a[l].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/a[t].precision+" "+a[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,a,l){var c=void 0;if(l===t||l===s||l==r)c=1;else{if(l!==n&&l!==o&&l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}a((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},47862:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/anon-vs-stash-plot-fa8f730710dbf5cbec2d7db43d5d962d.png"},79947:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/multisig-with-anons-209a0f481e6a13ed943a952be07e1a75.png"},87091:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/multisig-with-one-anon-b8bb0a5183fbdc1d1809d4cd58489ab4.png"},4782:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/multisig-with-pure-684efe47eba1ab52cd41218daf674357.png"},79022:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/why-anon-proxy-48fc32ddd2da9a5e9342554c68372d98.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/c8dd560b.e46a4d81.js b/assets/js/c8dd560b.e46a4d81.js new file mode 100644 index 000000000000..26dc32a2b7a7 --- /dev/null +++ b/assets/js/c8dd560b.e46a4d81.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[4293],{77405:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var o=n(74848),s=n(28453),r=(n(47379),n(67141));const i={id:"learn-guides-accounts-proxy-pure",title:"Polkadot-JS Guides about Pure Proxy Accounts",sidebar_label:"Pure Proxy Guides",description:"Polkadot-JS Guides about Pure Proxy Accounts",keyword:["guides","polkadot-js","accounts","proxy","pure proxy","anonymous proxy"],slug:"../learn-guides-accounts-proxy-pure"},a=void 0,l={id:"learn/learn-guides-accounts-proxy-pure",title:"Polkadot-JS Guides about Pure Proxy Accounts",description:"Polkadot-JS Guides about Pure Proxy Accounts",source:"@site/../docs/learn/learn-guides-accounts-proxy-pure.md",sourceDirName:"learn",slug:"/learn-guides-accounts-proxy-pure",permalink:"/docs/learn-guides-accounts-proxy-pure",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts-proxy-pure.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-accounts-proxy-pure",title:"Polkadot-JS Guides about Pure Proxy Accounts",sidebar_label:"Pure Proxy Guides",description:"Polkadot-JS Guides about Pure Proxy Accounts",keyword:["guides","polkadot-js","accounts","proxy","pure proxy","anonymous proxy"],slug:"../learn-guides-accounts-proxy-pure"},sidebar:"docs",previous:{title:"Proxy Guides",permalink:"/docs/learn-guides-accounts-proxy"},next:{title:"Transfer Guides",permalink:"/docs/learn-guides-transfers"}},c={},u=[{value:"Create and Remove Pure Proxies with Polkadot-JS",id:"create-and-remove-pure-proxies-with-polkadot-js",level:2},{value:"Advanced Account Management with Pure Proxies",id:"advanced-account-management-with-pure-proxies",level:2},{value:"Pure Proxies and Multisigs",id:"pure-proxies-and-multisigs",level:2},{value:"Scenario One: One Pure Proxy within a Multisig",id:"scenario-one-one-pure-proxy-within-a-multisig",level:3},{value:"Scenario Two: Multisig made of Pure Proxies",id:"scenario-two-multisig-made-of-pure-proxies",level:3},{value:"Scenario Three: Multisig controlling a Pure Proxy",id:"scenario-three-multisig-controlling-a-pure-proxy",level:3}];function d(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(t.admonition,{title:"The Account Tab in the Polkadot-JS UI cannot handle complex proxy setups",type:"caution",children:[(0,o.jsxs)(t.p,{children:["The Accounts Tab in the Polkadot-JS UI cannot handle complex proxy setups (e.g. a proxy -> multisig\n-> a pure proxy which is part of another multisig). These complex setups must be done using the\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics Tab"})," directly."]}),(0,o.jsxs)(t.p,{children:[(0,o.jsxs)(t.strong,{children:["We recommend to use the ",(0,o.jsx)(t.a,{href:"/docs/learn-DOT#getting-tokens-on-the-westend-testnet",children:"Westend Testnet"})," if\nyou are testing features for the first time."]})," By performing the complex proxy setups on the\ntestnet, you can comfortably replicate the procedure on the main networks."]})]}),"\n",(0,o.jsx)(t.admonition,{title:"Risk of loss of funds",type:"danger",children:(0,o.jsx)(t.p,{children:"Read carefully the text below and before performing any action using pure proxies, experiment on the\nWestend testnet."})}),"\n",(0,o.jsx)(t.h2,{id:"create-and-remove-pure-proxies-with-polkadot-js",children:"Create and Remove Pure Proxies with Polkadot-JS"}),"\n",(0,o.jsxs)(t.p,{children:["To create a ",(0,o.jsx)(t.strong,{children:"pure proxy"})," see\n",(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182196",children:"this support article"}),", or\nwatch ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T443RcCYP24",children:"this technical explainer video"}),"."]}),"\n",(0,o.jsx)(t.admonition,{title:"Removing Pure Proxies",type:"caution",children:(0,o.jsxs)(t.p,{children:["The procedure for removing a ",(0,o.jsx)(t.em,{children:"pure"}),' proxy is different from the one used to remove other proxies.\nVisit the section "Removing an Anonymous Proxy" on\n',(0,o.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182196",children:"this support article"}),", or\nwatch ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=T443RcCYP24",children:"this technical explainer video"}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:["Learn more about pure proxies from our\n",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=YkYApbhU3i0",children:"technical explainer video"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"advanced-account-management-with-pure-proxies",children:"Advanced Account Management with Pure Proxies"}),"\n",(0,o.jsx)(t.admonition,{title:"Walk-through tutorial video of Account Management",type:"info",children:(0,o.jsxs)(t.p,{children:["You can see ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=YkYApbhU3i0",children:"this video tutorial"})," that goes through the\nexample below. The tutorial requires some familiarity with the Extrinsic Tab of the Polkadot-JS UI."]})}),"\n",(0,o.jsx)(t.p,{children:"Let's take for example 3 accounts belonging to Charlie, Dan and Eleanor working for Company X.\nCharlie holds funds belonging to Company X, but he wants to leave the company and transfer the\neconomic responsibility to Eleanor. Dan is a staking proxy of Charlie."}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsxs)(t.strong,{children:["Without ",(0,o.jsx)(t.em,{children:"Pure"})," Proxy"]}),", Charlie must (see ",(0,o.jsx)(t.em,{children:"left"})," side of the Figure below):"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Remove Dan as a staking proxy, this step requires 1 signature"}),"\n",(0,o.jsx)(t.li,{children:"Stop nominating and unbound all funds , this step requires 2 signatures"}),"\n",(0,o.jsx)(t.li,{children:"Transfer the funds to Eleanor, this step requires 1 signature"}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"Then Eleanor adds Dan as a staking proxy (1 signature). The whole process requires 5 signatures.\nHere we are presenting a simple example, in fact, with multi-signature accounts and multiple proxies\nthe procedure would be more time-consuming and labor-intensive."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"why anonymous proxies",src:n(79022).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsxs)(t.strong,{children:["With ",(0,o.jsx)(t.em,{children:"Pure"})," Proxy"]})," (see ",(0,o.jsx)(t.em,{children:"right"})," side of the Figure above), Charlie must add Eleanor as ",(0,o.jsx)(t.em,{children:"any"}),"\nproxy of the ",(0,o.jsx)(t.em,{children:"pure"})," proxy, and remove himself (or Eleanor can remove him). The process requires just\n2 signatures (1 signature to add the new ",(0,o.jsx)(t.em,{children:"any"})," proxy and 1 signature the remove the old one). The\nfunds remain in the ",(0,o.jsx)(t.em,{children:"pure"})," proxy, and it is not necessary to stop nominating or unbond funds. Also,\nany proxy relationships with the ",(0,o.jsx)(t.em,{children:"pure"})," proxy stay in place. Thus, if we use the ",(0,o.jsx)(t.em,{children:"pure"})," proxy, with\nan increasing number of proxies we will always have to sign twice (not necessarily true in\nmulti-signature accounts). While if we are not using the ",(0,o.jsx)(t.em,{children:"pure"})," proxy, the more the proxies the more\nsignatures we need to detach them from the old stash and attach them to the new stash (see Figure\nbelow)."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"anon vs stash plot",src:n(47862).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsx)(t.h2,{id:"pure-proxies-and-multisigs",children:"Pure Proxies and Multisigs"}),"\n",(0,o.jsx)(t.h3,{id:"scenario-one-one-pure-proxy-within-a-multisig",children:"Scenario One: One Pure Proxy within a Multisig"}),"\n",(0,o.jsx)(t.admonition,{title:"Walk-through tutorial video",type:"info",children:(0,o.jsxs)(t.p,{children:["You can see ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=iGRoGstB_pQ",children:"this video tutorial"})," that goes through\nthis scenario. The tutorial requires some familiarity with the Extrinsic Tab of the Polkadot-JS UI."]})}),"\n",(0,o.jsxs)(t.p,{children:["It is possible to put a ",(0,o.jsx)(t.em,{children:"pure"})," proxy within a multisig, and then transactions will be signed by the\n",(0,o.jsx)(t.em,{children:"any"})," proxy on behalf of the ",(0,o.jsx)(t.em,{children:"pure"})," proxy (proxied account). Let's take for example the diagram\nbelow. Alice, Bob and Anon are part of the multisig ABC, a multisig account with threshold 2. P-C is\na ",(0,o.jsx)(t.em,{children:"pure"})," proxy spawned by Charlie, who now acts as ",(0,o.jsx)(t.em,{children:"any"})," proxy and thus signs anything on behalf of\nP-C. The ",(0,o.jsx)(t.em,{children:"pure"})," proxy cannot sign directly because it does not have a private key. So, for example,\nto send funds from the multisig to Dan, Charly needs to submit a ",(0,o.jsx)(t.code,{children:"proxy.proxy"})," extrinsic to P-C,\nwhich in turn will submit a ",(0,o.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic to ABC containing the call data for the\n",(0,o.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsic about the transfer of some funds from ABC to Dan. Alice can\nthen approve the transfer by submitting a ",(0,o.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic also containing the call data\nfor the ",(0,o.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsic about the transfer of some funds from ABC to Dan."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"multisig with one anon",src:n(87091).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(t.p,{children:["If Charly wants to leave the multisig, a new ",(0,o.jsx)(t.em,{children:"any"})," proxy can be added to P-C and Charly can be\nremoved (by himself or by the new ",(0,o.jsx)(t.em,{children:"any"})," proxy). Note that the multisig also contains Bob that in\nthis specific example does not do anything."]}),"\n",(0,o.jsx)(t.admonition,{title:"Proxy calls",type:"note",children:(0,o.jsxs)(t.p,{children:["To use a ",(0,o.jsx)(t.em,{children:"pure"})," proxy within a multisig you need to use the Extrinsic Tab and generate a\n",(0,o.jsx)(t.code,{children:"proxy.proxy"})," extrinsic. If you try to sign a multisig transaction using the ",(0,o.jsx)(t.em,{children:"pure"})," proxy you will\nbe prompted with a warning. Remember, you cannot sign something directly if you do not have a\nprivate key."]})}),"\n",(0,o.jsx)(t.h3,{id:"scenario-two-multisig-made-of-pure-proxies",children:"Scenario Two: Multisig made of Pure Proxies"}),"\n",(0,o.jsx)(t.admonition,{title:"Walk-through Tutorial Video",type:"info",children:(0,o.jsxs)(t.p,{children:["You can see ",(0,o.jsx)(t.a,{href:"https://www.youtube.com/watch?v=F82C3zDNJyk",children:"this video tutorial"})," that goes through\nthis scenario. The tutorial requires some familiarity with the Extrinsic Tab of the Polkadot-JS UI."]})}),"\n",(0,o.jsxs)(t.p,{children:["The diagram below shows a multisig that is made only with ",(0,o.jsx)(t.em,{children:"pure"})," proxies (P-A, P-B and P-C). In this\nsituation Alice, Bob or Charly can leave the multisig at any time without the requirement of\ncreating a new multisig. If for example, Bob leaves the multisig the procedure will require somebody\nelse to be added as ",(0,o.jsx)(t.em,{children:"any"})," proxy to P-B, and then Bob can remove himself (or the new ",(0,o.jsx)(t.em,{children:"any"})," proxy can\nremove Bob)."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"multisig with anons",src:n(79947).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(t.p,{children:["In the diagram above, Alice submits the ",(0,o.jsx)(t.code,{children:"proxy.proxy"})," extrinsic to P-A, which in turn submits the\n",(0,o.jsx)(t.code,{children:"multisig.asMulti"})," extrinsic containing the ",(0,o.jsx)(t.code,{children:"balances.transferKeepAlive"})," extrinsic about the\ntransfer of some tokens from ABC to Dan. Then, Charly does the same to confirm the transaction. Note\nthat Charly will need to pay for some weight, for the computation that is necessary to execute the\ntransaction."]}),"\n",(0,o.jsx)(t.h3,{id:"scenario-three-multisig-controlling-a-pure-proxy",children:"Scenario Three: Multisig controlling a Pure Proxy"}),"\n",(0,o.jsxs)(t.p,{children:["This setup is used by the ",(0,o.jsx)(t.a,{href:"/docs/multisig-apps#multix",children:"MultiX"})," tool."]}),"\n",(0,o.jsxs)(t.p,{children:["After its creation, a multi-signature account creates a pure proxy that becomes the proxied account.\nThe multi-signature account behaves as ",(0,o.jsx)(t.em,{children:"any"})," proxy of the pure. If signatories of the\nmulti-signature account change, a new multisig can be created, assigned as ",(0,o.jsx)(t.em,{children:"any"})," proxy of the pure,\nand then the old multisig can be removed as a proxy."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"multisig with pure",src:n(4782).A+"",width:"1920",height:"800"})}),"\n",(0,o.jsxs)(t.p,{children:["Compared to ",(0,o.jsx)(t.a,{href:"#scenario-two-multisig-made-of-pure-proxies",children:"Scenario Two"}),", signatories do not need to\ncreate pure proxies here. Multisig controlling a Pure Proxy is a more practical solution, where the\nsignatories, number of signatories and/or the threshold can be changed, which changes the multisig\naddress but does not impact the pure proxy address. In Scenario Two, if signatories behind the pure\nproxies change, the address of the multisig stays the same. However, changing the number of\nsignatories and threshold would not be possible."]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},67141:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(96540),s=n(74848);const r=function(e){var t,n=e.message,r=(0,o.useState)(!0),i=r[0],a=r[1];return(0,s.jsx)(s.Fragment,{children:i&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){a(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var o=n(90675),s=n(10467),r=n(96540),i=n(19588),a=n(2026),l=n(11135);function c(e,t,n){return u.apply(this,arguments)}function u(){return(u=(0,s.A)((0,o.A)().mark((function e(t,n,s){var r,l,c,u,d;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=void 0,l=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return r="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return r="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return r="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return r="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return r="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return r="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==r){e.next=22;break}return e.abrupt("return");case 22:return c=new i.E(r),e.next=25,a.G.create({provider:c});case 25:u=e.sent,(d=n.split(".")).forEach((function(e){e in u&&(u=u[e])})),e.t1=d[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return l=u.toString(),e.abrupt("break",39);case 33:return e.next=35,u();case 35:return l=(l=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+d[0]+") in "+n);case 39:return e.abrupt("return",l);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,n,o){switch(t){case"humanReadable":(0,l.HumanReadable)(e,n,o);break;case"precise":(0,l.Precise)(e,n,o);break;case"blocksToDays":(0,l.BlocksToDays)(e,o);break;case"erasToDays":(0,l.ErasToDays)(e,o,n);break;case"percentage":(0,l.Percentage)(e,o);break;case"permillToPercent":(0,l.PermillToPercent)(e,o);break;case"arrayLength":(0,l.ArrayLength)(e,o);break;default:return void console.log("Ignoring unknown filter type")}}const h=function(e){var t=e.network,n=e.path,i=e.defaultValue,a=e.filter,l=void 0===a?void 0:a,u=(0,r.useState)(""),h=u[0],p=u[1];return t=t.toLowerCase(),(0,r.useEffect)((function(){void 0!==l?d(i.toString(),l,t,p):p(i.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var r=function(){var e=(0,s.A)((0,o.A)().mark((function e(){var s;return(0,o.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(t,n,p);case 2:if(void 0!==(s=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==l?d(s,l,t,p):p(s);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{r()}catch(a){console.log(a)}}}),[]),h}},11135:e=>{var t="polkadot",n="kusama",o="statemine",s="statemint",r="polkadotpeople",i="kusamapeople",a={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,l,c){var u=void 0;if(l===t||l===s)u=3;else if(l===n||l===o||l===r)u=6;else{if(l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");u=8}e=parseFloat(e),c((e=Number.isInteger(e/a[l].precision)?e/a[l].precision+" "+a[l].symbol:(e/a[l].precision).toFixed(u)+" "+a[l].symbol).toString())},Precise:function(e,t,n){n(e=(e=parseFloat(e))/a[t].precision+" "+a[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,a,l){var c=void 0;if(l===t||l===s||l==r)c=1;else{if(l!==n&&l!==o&&l!=i)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");c=4}a((e/=c).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},47862:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/anon-vs-stash-plot-fa8f730710dbf5cbec2d7db43d5d962d.png"},79947:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/multisig-with-anons-209a0f481e6a13ed943a952be07e1a75.png"},87091:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/multisig-with-one-anon-b8bb0a5183fbdc1d1809d4cd58489ab4.png"},4782:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/multisig-with-pure-684efe47eba1ab52cd41218daf674357.png"},79022:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n.p+"assets/images/why-anon-proxy-48fc32ddd2da9a5e9342554c68372d98.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/cb9afd28.26565d39.js b/assets/js/cb9afd28.26565d39.js new file mode 100644 index 000000000000..b9dff7202506 --- /dev/null +++ b/assets/js/cb9afd28.26565d39.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1738],{27735:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>u});var r=n(74848),o=n(28453),s=n(67141),a=n(3514);const i={id:"learn-polkadot-js-guides",title:"Polkadot-JS Guides",sidebar_label:"Polkadot-JS Guides",description:"Guides about Polkadot-JS.",keywords:["polkadot-JS","polkadotjs","guides","advanced"],slug:"../learn-polkadot-js-guides"},l=void 0,d={id:"learn/learn-polkadot-js-guides",title:"Polkadot-JS Guides",description:"Guides about Polkadot-JS.",source:"@site/../docs/learn/learn-polkadot-js-guides.md",sourceDirName:"learn",slug:"/learn-polkadot-js-guides",permalink:"/docs/learn-polkadot-js-guides",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadot-js-guides.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-polkadot-js-guides",title:"Polkadot-JS Guides",sidebar_label:"Polkadot-JS Guides",description:"Guides about Polkadot-JS.",keywords:["polkadot-JS","polkadotjs","guides","advanced"],slug:"../learn-polkadot-js-guides"},sidebar:"docs",previous:{title:"Polkadot-JS UI",permalink:"/docs/polkadotjs-ui"},next:{title:"Account Guides",permalink:"/docs/learn-guides-accounts"}},c={},u=[];function p(e){const t={a:"a",admonition:"admonition",p:"p",strong:"strong",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,r.jsx)(t.admonition,{type:"info",children:(0,r.jsxs)(t.p,{children:["We support only the use of the ",(0,r.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:(0,r.jsx)(t.strong,{children:"Polkadot-JS UI"})}),"\ntogether with the ",(0,r.jsx)(t.a,{href:"https://polkadot.js.org/extension/",children:(0,r.jsx)(t.strong,{children:"Polkadot-JS browser extension"})}),",\n",(0,r.jsx)(t.a,{href:"https://www.ledger.com/ledger-live",children:(0,r.jsx)(t.strong,{children:"Ledger"})})," and\n",(0,r.jsx)(t.a,{href:"https://www.parity.io/technologies/signer/",children:(0,r.jsx)(t.strong,{children:"Polkadot Vault"})})," for signing transactions. We do not\nprovide support for third party applications."]})}),"\n",(0,r.jsx)(a.A,{})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(96540),o=n(74848);const s=function(e){var t,n=e.message,s=(0,r.useState)(!0),a=s[0],i=s[1];return(0,o.jsx)(o.Fragment,{children:a&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,n)=>{n.d(t,{A:()=>k});n(96540);var r=n(34164),o=n(26972),s=n(28774),a=n(53465),i=n(16654),l=n(21312),d=n(51107);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=n(74848);function p(e){var t=e.href,n=e.children;return(0,u.jsx)(s.A,{href:t,className:(0,r.A)("card padding--lg",c.cardContainer),children:n})}function h(e){var t=e.href,n=e.icon,o=e.title,s=e.description;return(0,u.jsxs)(p,{href:t,children:[(0,u.jsxs)(d.A,{as:"h2",className:(0,r.A)("text--truncate",c.cardTitle),title:o,children:[n," ",o]}),s&&(0,u.jsx)("p",{className:(0,r.A)("text--truncate",c.cardDescription),title:s,children:s})]})}function m(e){var t,n,r=e.item,s=(0,o.Nr)(r),i=(n=(0,a.W)().selectMessage,function(e){return n(e,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,u.jsx)(h,{href:s,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:i(r.items.length)}):null}function f(e){var t,n,r=e.item,s=(0,i.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",a=(0,o.cC)(null!=(t=r.docId)?t:void 0);return(0,u.jsx)(h,{href:r.href,icon:s,title:r.label,description:null!=(n=r.description)?n:null==a?void 0:a.description})}function g(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(f,{item:t});case"category":return(0,u.jsx)(m,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function x(e){var t=e.className,n=(0,o.$S)();return(0,u.jsx)(k,{items:n.items,className:t})}function k(e){var t=e.items,n=e.className;if(!t)return(0,u.jsx)(x,Object.assign({},e));var s=(0,o.d1)(t);return(0,u.jsx)("section",{className:(0,r.A)("row",n),children:s.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(g,{item:e})},t)}))})}},53465:(e,t,n)=>{n.d(t,{W:()=>d});var r=n(96540),o=n(44586),s=["zero","one","two","few","many","other"];function a(e){return s.filter((function(t){return e.includes(t)}))}var i={locale:"en",pluralForms:a(["one","other"]),select:function(e){return 1===e?"one":"other"}};function l(){var e=(0,o.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:a(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),i}var t,n}),[e])}function d(){var e=l();return{selectMessage:function(t,n){return function(e,t,n){var r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var o=n.select(t),s=n.pluralForms.indexOf(o);return r[Math.min(s,r.length-1)]}(n,t,e)}}}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>i});var r=n(96540);const o={},s=r.createContext(o);function a(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/cb9afd28.bc079caf.js b/assets/js/cb9afd28.bc079caf.js deleted file mode 100644 index 39cc43b2ea04..000000000000 --- a/assets/js/cb9afd28.bc079caf.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1738],{27735:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>l,metadata:()=>d,toc:()=>u});var r=n(74848),o=n(28453),s=n(67141),a=n(3514);const l={id:"learn-polkadot-js-guides",title:"Polkadot-JS Guides",sidebar_label:"Polkadot-JS Guides",description:"Guides about Polkadot-JS.",keywords:["polkadot-JS","polkadotjs","guides","advanced"],slug:"../learn-polkadot-js-guides"},i=void 0,d={id:"learn/learn-polkadot-js-guides",title:"Polkadot-JS Guides",description:"Guides about Polkadot-JS.",source:"@site/../docs/learn/learn-polkadot-js-guides.md",sourceDirName:"learn",slug:"/learn-polkadot-js-guides",permalink:"/docs/learn-polkadot-js-guides",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadot-js-guides.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1714545713e3,frontMatter:{id:"learn-polkadot-js-guides",title:"Polkadot-JS Guides",sidebar_label:"Polkadot-JS Guides",description:"Guides about Polkadot-JS.",keywords:["polkadot-JS","polkadotjs","guides","advanced"],slug:"../learn-polkadot-js-guides"},sidebar:"docs",previous:{title:"Polkadot-JS UI",permalink:"/docs/polkadotjs-ui"},next:{title:"Account Guides",permalink:"/docs/learn-guides-accounts"}},c={},u=[];function p(e){const t={a:"a",admonition:"admonition",p:"p",strong:"strong",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,r.jsx)(t.admonition,{type:"info",children:(0,r.jsxs)(t.p,{children:["We support only the use of the ",(0,r.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/explorer",children:(0,r.jsx)(t.strong,{children:"Polkadot-JS UI"})}),"\ntogether with the ",(0,r.jsx)(t.a,{href:"https://polkadot.js.org/extension/",children:(0,r.jsx)(t.strong,{children:"Polkadot-JS browser extension"})}),",\n",(0,r.jsx)(t.a,{href:"https://www.ledger.com/ledger-live",children:(0,r.jsx)(t.strong,{children:"Ledger"})})," and\n",(0,r.jsx)(t.a,{href:"https://www.parity.io/technologies/signer/",children:(0,r.jsx)(t.strong,{children:"Polkadot Vault"})})," for signing transactions. We do not\nprovide support for third party applications."]})}),"\n",(0,r.jsx)(a.A,{})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(96540),o=n(74848);const s=function(e){var t,n=e.message,s=(0,r.useState)(!0),a=s[0],l=s[1];return(0,o.jsx)(o.Fragment,{children:a&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,n)=>{n.d(t,{A:()=>x});n(96540);var r=n(34164),o=n(26972),s=n(28774),a=n(53465),l=n(16654),i=n(21312),d=n(51107);const c={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=n(74848);function p(e){var t=e.href,n=e.children;return(0,u.jsx)(s.A,{href:t,className:(0,r.A)("card padding--lg",c.cardContainer),children:n})}function h(e){var t=e.href,n=e.icon,o=e.title,s=e.description;return(0,u.jsxs)(p,{href:t,children:[(0,u.jsxs)(d.A,{as:"h2",className:(0,r.A)("text--truncate",c.cardTitle),title:o,children:[n," ",o]}),s&&(0,u.jsx)("p",{className:(0,r.A)("text--truncate",c.cardDescription),title:s,children:s})]})}function m(e){var t,n,r=e.item,s=(0,o.Nr)(r),l=(n=(0,a.W)().selectMessage,function(e){return n(e,(0,i.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return s?(0,u.jsx)(h,{href:s,icon:"\ud83d\uddc3\ufe0f",title:r.label,description:null!=(t=r.description)?t:l(r.items.length)}):null}function f(e){var t,n,r=e.item,s=(0,l.A)(r.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",a=(0,o.cC)(null!=(t=r.docId)?t:void 0);return(0,u.jsx)(h,{href:r.href,icon:s,title:r.label,description:null!=(n=r.description)?n:null==a?void 0:a.description})}function g(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(f,{item:t});case"category":return(0,u.jsx)(m,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function k(e){var t=e.className,n=(0,o.$S)();return(0,u.jsx)(x,{items:n.items,className:t})}function x(e){var t=e.items,n=e.className;if(!t)return(0,u.jsx)(k,Object.assign({},e));var s=(0,o.d1)(t);return(0,u.jsx)("section",{className:(0,r.A)("row",n),children:s.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(g,{item:e})},t)}))})}},53465:(e,t,n)=>{n.d(t,{W:()=>d});var r=n(96540),o=n(44586),s=["zero","one","two","few","many","other"];function a(e){return s.filter((function(t){return e.includes(t)}))}var l={locale:"en",pluralForms:a(["one","other"]),select:function(e){return 1===e?"one":"other"}};function i(){var e=(0,o.A)().i18n.currentLocale;return(0,r.useMemo)((function(){try{return t=e,n=new Intl.PluralRules(t),{locale:t,pluralForms:a(n.resolvedOptions().pluralCategories),select:function(e){return n.select(e)}}}catch(r){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+r.message+"\n"),l}var t,n}),[e])}function d(){var e=i();return{selectMessage:function(t,n){return function(e,t,n){var r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error("For locale="+n.locale+", a maximum of "+n.pluralForms.length+" plural forms are expected ("+n.pluralForms.join(",")+"), but the message contains "+r.length+": "+e);var o=n.select(t),s=n.pluralForms.indexOf(o);return r[Math.min(s,r.length-1)]}(n,t,e)}}}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>l});var r=n(96540);const o={},s=r.createContext(o);function a(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dbbd9e76.ab0bcc20.js b/assets/js/dbbd9e76.ab0bcc20.js new file mode 100644 index 000000000000..12cc84a51abf --- /dev/null +++ b/assets/js/dbbd9e76.ab0bcc20.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2922],{22123:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>d,default:()=>p,frontMatter:()=>o,metadata:()=>r,toc:()=>c});var n=a(74848),i=a(28453),s=a(67141);const o={id:"learn-guides-vault",title:"Polkadot-JS Guides about the Vault App",sidebar_label:"Polkadot Vault Guides",description:"Polkadot-JS Guides about Polkadot Vault.",keywords:["parity signer","signer","polkadot vault","polkadot-js"],slug:"../learn-guides-vault"},d=void 0,r={id:"learn/learn-guides-vault",title:"Polkadot-JS Guides about the Vault App",description:"Polkadot-JS Guides about Polkadot Vault.",source:"@site/../docs/learn/learn-guides-vault.md",sourceDirName:"learn",slug:"/learn-guides-vault",permalink:"/docs/learn-guides-vault",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-vault.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-vault",title:"Polkadot-JS Guides about the Vault App",sidebar_label:"Polkadot Vault Guides",description:"Polkadot-JS Guides about Polkadot Vault.",keywords:["parity signer","signer","polkadot vault","polkadot-js"],slug:"../learn-guides-vault"},sidebar:"docs",previous:{title:"Ledger Guides",permalink:"/docs/learn-guides-ledger"},next:{title:"Asset Hub Guides",permalink:"/docs/learn-guides-assets"}},l={},c=[{value:"Sending a Transfer with the Vault App",id:"sending-a-transfer-with-the-vault-app",level:2},{value:"Import Vault Accounts into Polkadot-JS",id:"import-vault-accounts-into-polkadot-js",level:2},{value:"Do Your Own Chain Spec and Metadata Update",id:"do-your-own-chain-spec-and-metadata-update",level:2},{value:"Chain Specification",id:"chain-specification",level:3},{value:"Chain Spec QR",id:"chain-spec-qr",level:4},{value:"Generating Signature",id:"generating-signature",level:4},{value:"Signing Chain Spec",id:"signing-chain-spec",level:4},{value:"Metadata Updates",id:"metadata-updates",level:3},{value:"Metadata QR Fountain",id:"metadata-qr-fountain",level:4},{value:"Generating Signature",id:"generating-signature-1",level:4},{value:"Signing Metadata",id:"signing-metadata",level:4},{value:"Add Chain & Update Metadata",id:"add-chain--update-metadata",level:3},{value:"Metadata Portal",id:"metadata-portal",level:3},{value:"Modify config File",id:"modify-config-file",level:4},{value:"Rename Chain's Files",id:"rename-chains-files",level:4},{value:"Run Portal",id:"run-portal",level:4}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsx)(t.p,{children:"These guides apply to both Parity Signer and Polkadot Vault apps."})}),"\n",(0,n.jsx)(t.h2,{id:"sending-a-transfer-with-the-vault-app",children:"Sending a Transfer with the Vault App"}),"\n",(0,n.jsx)(t.admonition,{title:"Verifying Extrinsics",type:"danger",children:(0,n.jsxs)(t.p,{children:["Visit the\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-using-Ledger",children:(0,n.jsx)(t.strong,{children:"dedicated support page"})}),"\nand see ",(0,n.jsx)(t.a,{href:"https://youtu.be/bxMs-9fBtFk?t=360",children:(0,n.jsx)(t.strong,{children:"this video tutorial"})})," tutorial to learn about how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nto you while signing for transactions."]})}),"\n",(0,n.jsxs)(t.p,{children:["General instructions to send a transfer can be found on\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170304-how-to-send-transfer-funds-out-of-your-dot-account-on-the-polkadot-js-ui",children:"this support page"}),".\nTo sign transactions with the Polkadot Vault app check\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182000-how-to-sign-a-transaction-in-parity-signer",children:"this support article"}),"\nor see ",(0,n.jsx)(t.a,{href:"https://youtu.be/gbvrHzr4EDY?t=281",children:"this video tutorial"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"import-vault-accounts-into-polkadot-js",children:"Import Vault Accounts into Polkadot-JS"}),"\n",(0,n.jsxs)(t.p,{children:["See\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184118-polkadot-vault-how-to-add-your-account-on-polkadot-js-ui",children:"this support article"}),"\nto import a Polkadot Vault account into the\n",(0,n.jsx)(t.a,{href:"/docs/polkadotjs#polkadot-js-extension",children:"Polkadot-JS Browser Extension"})," or\n",(0,n.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/parity-signer-companion/damllfnhhcbmclmjilomenbhkappdjgb",children:"Parity Signer Companion"}),".\nAccounts added to those extensions will be injected into the Polkadot-JS UI."]}),"\n",(0,n.jsx)(t.h2,{id:"do-your-own-chain-spec-and-metadata-update",children:"Do Your Own Chain Spec and Metadata Update"}),"\n",(0,n.jsx)(t.admonition,{title:"This section is for developers and power users only",type:"danger",children:(0,n.jsx)(t.p,{children:"By requesting the chain specification and metadata you trust the specific endpoint you are using\n(unless you are using you own node)."})}),"\n",(0,n.jsxs)(t.p,{children:["The following guide bases on the ",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/parity-signer",children:"Parity Signer"})," Github\npage (to create the Chain Spec QR code and the metadata QR code fountain) and\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/metadata-portal",children:"Metadata Portal"})," Github page (to embed the Chain\nSpec and Metadata into a portal)."]}),"\n",(0,n.jsx)(t.h3,{id:"chain-specification",children:"Chain Specification"}),"\n",(0,n.jsx)(t.h4,{id:"chain-spec-qr",children:"Chain Spec QR"}),"\n",(0,n.jsxs)(t.p,{children:["To add more chains on the Vault app you can follow the instructions\n",(0,n.jsx)(t.a,{href:"https://paritytech.github.io/parity-signer/tutorials/Add-New-Network.html#add-network-specs",children:"here"}),".\nIn this example we will add the ",(0,n.jsx)(t.a,{href:"/docs/learn-assets",children:"Asset Hub"})," system parachain. Briefly,\nfork the ",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/parity-signer",children:"Parity Signer GitHub repository"}),", start the\nterminal within the ",(0,n.jsx)(t.code,{children:"/generate_message"})," folder and type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"cargo run add-specs -d -u wss://kusama-asset-hub-rpc.polkadot.io --encryption sr25519"})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:"wss://kusama-asset.hub-rpc.polkadot.io"})," is the Parity RPC endpoint for the Asset Hub on\nKusama. This will create the file ",(0,n.jsx)(t.code,{children:"sign_me_add_specs_statemine_sr25510"})," under the\n",(0,n.jsx)(t.code,{children:"files/in_progress"})," folder. See all endpoints listed for\n",(0,n.jsx)(t.a,{href:"https://github.com/polkadot-js/apps/blob/089fd77b14169749e35e073a93f7e7276963009c/packages/apps-config/src/endpoints/productionRelayPolkadot.ts",children:"Polkadot"}),"\nand\n",(0,n.jsx)(t.a,{href:"https://github.com/polkadot-js/apps/blob/089fd77b14169749e35e073a93f7e7276963009c/packages/apps-config/src/endpoints/productionRelayKusama.ts",children:"Kusama"}),"\non the Polkadot-JS UI."]}),"\n",(0,n.jsx)(t.h4,{id:"generating-signature",children:"Generating Signature"}),"\n",(0,n.jsx)(t.admonition,{title:"Use a hot account",type:"danger",children:(0,n.jsx)(t.p,{children:"Make sure that the account used to sign the chain specification is a hot account. Never use a cold\naccount from the Vault app or Ledger, as after typing the seed phrase into the terminal that account\nwill be considered hot."})}),"\n",(0,n.jsxs)(t.p,{children:["Start the terminal within the ",(0,n.jsx)(t.code,{children:"files/in_progress"})," folder and type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:'cat sign_me_add_specs_statemine_sr25519 | subkey sign --suri "YOUR SEED PHRASE"'})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:'"YOUR SEED PHRASE"'})," is the seed phrase of the account that will be used to sign and\nauthenticate both the chain spec and later on the metadata. Running the code above will return a\nsignature similar to that below:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"0xc4ce72db959000b6166af96d3bda55a927fd837747bf1bf1ae8a69e57c9ef37c25a88707c47b105a9eb1fbcf9345680eff57eb978cf73919506f6c738834e78a"})}),"\n",(0,n.jsx)(t.h4,{id:"signing-chain-spec",children:"Signing Chain Spec"}),"\n",(0,n.jsxs)(t.p,{children:["Now, go back to the ",(0,n.jsx)(t.code,{children:"/generate_message"})," folder and type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"cargo run --release make --goal qr --crypto sr25519 --msg add-specs --payload sign_me_add_specs_statemine_sr25519 --verifier-hex PUBLIC KEY --signature-hex SIGNATURE"})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:"PUBLIC KEY"})," is the public key of the account with seed ",(0,n.jsx)(t.code,{children:'"YOUR SEED PHRASE"'}),", and ",(0,n.jsx)(t.code,{children:"SIGNATURE"}),"\nis the signature generated in the previous step. Running the code above will create the file\n",(0,n.jsx)(t.code,{children:"add_specs_statemine-sr25519"})," under the ",(0,n.jsx)(t.code,{children:"files/completed"})," folder."]}),"\n",(0,n.jsx)(t.h3,{id:"metadata-updates",children:"Metadata Updates"}),"\n",(0,n.jsx)(t.p,{children:"Similarly to what we did for the chain specification, we now generate and sign the Asset Hub\nmetadata."}),"\n",(0,n.jsx)(t.h4,{id:"metadata-qr-fountain",children:"Metadata QR Fountain"}),"\n",(0,n.jsxs)(t.p,{children:["To update the chain metadata for the Asset Hub specs on the Vault app you can follow the\ninstructions\n",(0,n.jsx)(t.a,{href:"https://paritytech.github.io/parity-signer/tutorials/Add-New-Network.html#add-network-metadata",children:"here"}),".\nBriefly, in the Parity Signer repository, start the terminal within the ",(0,n.jsx)(t.code,{children:"/generate_message"})," folder\nand type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"cargo run load-metadata -d -u wss://kusama-asset-hub-rpc.polkadot.io"})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:"wss://kusama-asset-hub-rpc.polkadot.io"})," is the Parity RPC endpoint for the Asset Hub on\nKusama. This will create the file ",(0,n.jsx)(t.code,{children:"sign_me_load_metadata_statemineV9370"})," under the\n",(0,n.jsx)(t.code,{children:"files/in_progress"})," folder. Note that for future metadata updates the file name will change as the\nversion at the time of writing was ",(0,n.jsx)(t.code,{children:"V9370"}),"."]}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["Note that the name of the file changes according to the network version. That is, ",(0,n.jsx)(t.code,{children:"????"})," in\n",(0,n.jsx)(t.code,{children:"sign_me_load_metadata_statemineV????"})," will be the latest version at fetch time."]})}),"\n",(0,n.jsx)(t.h4,{id:"generating-signature-1",children:"Generating Signature"}),"\n",(0,n.jsx)(t.admonition,{title:"Use a hot account",type:"danger",children:(0,n.jsx)(t.p,{children:"Make sure that the account used to sign the metadata is a hot account. Never use a cold account from\nthe Vault app or Ledger, as after typing the seed phrase into the terminal that account will be\nconsidered hot."})}),"\n",(0,n.jsxs)(t.p,{children:["Start the terminal within the ",(0,n.jsx)(t.code,{children:"files/in_progress"})," folder and type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:'cat sign_me_load_metadata_statemineV9370 | subkey sign --suri "YOUR SEED PHRASE"'})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:'"YOUR SEED PHRASE"'})," is the seed phrase of the account you used to sign the chain\nspecification. Running the code above will return a signature similar to that below:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"0xde1ad7aeb252acb3cf42a522dcc8dc3f317a49be2ed636836dd6df8f7e47135f2c712480055822eba87e9ea5ac7d3bba96045992ae795856fdf4eea09a411f85"})}),"\n",(0,n.jsx)(t.admonition,{title:"Do not copy the code lines above",type:"info",children:(0,n.jsxs)(t.p,{children:["Note that the name of the file changes according to the network version. That is, ",(0,n.jsx)(t.code,{children:"????"})," in\n",(0,n.jsx)(t.code,{children:"sign_me_load_metadata_statemineV????"})," will be the latest version at fetch time. So, do not copy the\ncode line above, but change the version with the appropriate one saved under the ",(0,n.jsx)(t.code,{children:"files/in_progress"}),"\nfolder. The signature changes as well."]})}),"\n",(0,n.jsx)(t.h4,{id:"signing-metadata",children:"Signing Metadata"}),"\n",(0,n.jsxs)(t.p,{children:["Now, go back to the ",(0,n.jsx)(t.code,{children:"/generate_message"})," folder and type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"cargo run --release make --goal qr --crypto sr25519 --msg load-metadata --payload sign_me_load_metadata_statemineV9370 --verifier-hex PUBLIC KEY --signature-hex SIGNATURE"})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:"PUBLIC KEY"})," is the public key of the account with seed ",(0,n.jsx)(t.code,{children:'"YOUR SEED PHRASE"'}),", and ",(0,n.jsx)(t.code,{children:"SIGNATURE"}),"\nis the signature generated in the previous step. Running the code above will create the file\n",(0,n.jsx)(t.code,{children:"load_metadata_statemineV9370"})," under the ",(0,n.jsx)(t.code,{children:"files/completed"})," folder."]}),"\n",(0,n.jsx)(t.h3,{id:"add-chain--update-metadata",children:"Add Chain & Update Metadata"}),"\n",(0,n.jsxs)(t.p,{children:["You can open ",(0,n.jsx)(t.code,{children:"add_specs_statemine-sr25519"})," on your browser (just drag the file on an open tab). This\nis a .png file containing the QR code to add the Asset Hub chain specification into the Vault App.\nYou can do the same with the ",(0,n.jsx)(t.code,{children:"load_metadata_statemineV9370"}),". This is a .apng file containing the QR\ncode fountain to do the metadata update for the Asset Hub on Kusama."]}),"\n",(0,n.jsx)(t.h3,{id:"metadata-portal",children:"Metadata Portal"}),"\n",(0,n.jsxs)(t.h4,{id:"modify-config-file",children:["Modify ",(0,n.jsx)(t.code,{children:"config"})," File"]}),"\n",(0,n.jsxs)(t.p,{children:["Alternatively, you can add the chain specification QR code and the metadata QR code fountain in a\nmetadata portal. Briefly, fork the\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/metadata-portal",children:"Parity's Metadata Portal GitHub repository"}),". You can\nmodify the following fields of the ",(0,n.jsx)(t.code,{children:"config.toml"})," file:"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"name"}),": your name / institution"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"public_key"}),": the public key of the account you use to sign the chain spec and the metadata."]}),"\n",(0,n.jsx)(t.li,{children:"At the bottom of the file add the following information:"}),"\n"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:'[[chains]]\nname = "Statemine"\ntitle = "Kusama Asset Hub"\nrpc_endpoint = "wss://kusama-asset-hub-rpc.polkadot.io"\ncolor = "#f27230"\n\n[chains.github_release]\nowner = "paritytech"\nrepo = "statemint"\ngenesis_hash = "0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a"\n'})}),"\n",(0,n.jsx)(t.p,{children:"For each additional chain, you need to add the respective information. Information about the genesis\nhash can be found on the Polkadot-JS UI > connect to the relevant chain > Developer > Chain State."}),"\n",(0,n.jsx)(t.h4,{id:"rename-chains-files",children:"Rename Chain's Files"}),"\n",(0,n.jsx)(t.p,{children:"Rename the signed chain specification and metadata files as follow:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["\n",(0,n.jsxs)(t.p,{children:["Chain specification: ",(0,n.jsx)(t.code,{children:"add_specs_statemine-sr25519"})," --\x3e ",(0,n.jsx)(t.code,{children:"statemine_specs.png"})]}),"\n"]}),"\n",(0,n.jsxs)(t.li,{children:["\n",(0,n.jsxs)(t.p,{children:["Metadata updates: ",(0,n.jsx)(t.code,{children:"load_metadata_statemineV9370"}),"--\x3e ",(0,n.jsx)(t.code,{children:"statemine_metadata_9370.apng"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["Thus, for chain specification the file must be renamed to ",(0,n.jsx)(t.code,{children:"chainName_specs.png"})," while for metadata\nthe file must be renamed to ",(0,n.jsx)(t.code,{children:"chainName_metadata_version.apng"})," where ",(0,n.jsx)(t.code,{children:"chainName"})," is the name of the\nchain and ",(0,n.jsx)(t.code,{children:"version"})," is the version of the metadata."]}),"\n",(0,n.jsxs)(t.p,{children:["Add the renamed files to the ",(0,n.jsx)(t.code,{children:"/public/qr folder"})," within the Metadata Portal repository."]}),"\n",(0,n.jsx)(t.h4,{id:"run-portal",children:"Run Portal"}),"\n",(0,n.jsxs)(t.p,{children:["Open the terminal within the Metadata Portal repository and run ",(0,n.jsx)(t.code,{children:"make updater"}),". Then run\n",(0,n.jsx)(t.code,{children:"make collector"}),"; this will create the ",(0,n.jsx)(t.code,{children:"_latest.apng"})," files for each of the chains (removed by the\ncommand ",(0,n.jsx)(t.code,{children:"make cleaner"}),"). Finally, run ",(0,n.jsx)(t.code,{children:"yarn start"})," to load the metadata portal on your localhost."]})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},67141:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(96540),i=a(74848);const s=function(e){var t,a=e.message,s=(0,n.useState)(!0),o=s[0],d=s[1];return(0,i.jsx)(i.Fragment,{children:o&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){d(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=a,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,t,a)=>{a.d(t,{R:()=>o,x:()=>d});var n=a(96540);const i={},s=n.createContext(i);function o(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dbbd9e76.b1add0d6.js b/assets/js/dbbd9e76.b1add0d6.js deleted file mode 100644 index 016fb92ec57c..000000000000 --- a/assets/js/dbbd9e76.b1add0d6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2922],{22123:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>d,default:()=>p,frontMatter:()=>o,metadata:()=>r,toc:()=>c});var n=a(74848),i=a(28453),s=a(67141);const o={id:"learn-guides-vault",title:"Polkadot-JS Guides about the Vault App",sidebar_label:"Polkadot Vault Guides",description:"Polkadot-JS Guides about Polkadot Vault.",keywords:["parity signer","signer","polkadot vault","polkadot-js"],slug:"../learn-guides-vault"},d=void 0,r={id:"learn/learn-guides-vault",title:"Polkadot-JS Guides about the Vault App",description:"Polkadot-JS Guides about Polkadot Vault.",source:"@site/../docs/learn/learn-guides-vault.md",sourceDirName:"learn",slug:"/learn-guides-vault",permalink:"/docs/learn-guides-vault",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-vault.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-guides-vault",title:"Polkadot-JS Guides about the Vault App",sidebar_label:"Polkadot Vault Guides",description:"Polkadot-JS Guides about Polkadot Vault.",keywords:["parity signer","signer","polkadot vault","polkadot-js"],slug:"../learn-guides-vault"},sidebar:"docs",previous:{title:"Ledger Guides",permalink:"/docs/learn-guides-ledger"},next:{title:"Asset Hub Guides",permalink:"/docs/learn-guides-assets"}},l={},c=[{value:"Sending a Transfer with the Vault App",id:"sending-a-transfer-with-the-vault-app",level:2},{value:"Import Vault Accounts into Polkadot-JS",id:"import-vault-accounts-into-polkadot-js",level:2},{value:"Do Your Own Chain Spec and Metadata Update",id:"do-your-own-chain-spec-and-metadata-update",level:2},{value:"Chain Specification",id:"chain-specification",level:3},{value:"Chain Spec QR",id:"chain-spec-qr",level:4},{value:"Generating Signature",id:"generating-signature",level:4},{value:"Signing Chain Spec",id:"signing-chain-spec",level:4},{value:"Metadata Updates",id:"metadata-updates",level:3},{value:"Metadata QR Fountain",id:"metadata-qr-fountain",level:4},{value:"Generating Signature",id:"generating-signature-1",level:4},{value:"Signing Metadata",id:"signing-metadata",level:4},{value:"Add Chain & Update Metadata",id:"add-chain--update-metadata",level:3},{value:"Metadata Portal",id:"metadata-portal",level:3},{value:"Modify config File",id:"modify-config-file",level:4},{value:"Rename Chain's Files",id:"rename-chains-files",level:4},{value:"Run Portal",id:"run-portal",level:4}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsx)(t.p,{children:"These guides apply to both Parity Signer and Polkadot Vault apps."})}),"\n",(0,n.jsx)(t.h2,{id:"sending-a-transfer-with-the-vault-app",children:"Sending a Transfer with the Vault App"}),"\n",(0,n.jsx)(t.admonition,{title:"Verifying Extrinsics",type:"danger",children:(0,n.jsxs)(t.p,{children:["Visit the\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000179161-how-can-i-verify-what-extrinsic-i-m-signing-#Verify-an-extrinsic-using-Ledger",children:(0,n.jsx)(t.strong,{children:"dedicated support page"})}),"\nand see ",(0,n.jsx)(t.a,{href:"https://youtu.be/bxMs-9fBtFk?t=360",children:(0,n.jsx)(t.strong,{children:"this video tutorial"})})," tutorial to learn about how to\nverify extrinsics before signing them. The video will also mention potential attacks that can happen\nto you while signing for transactions."]})}),"\n",(0,n.jsxs)(t.p,{children:["General instructions to send a transfer can be found on\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000170304-how-to-send-transfer-funds-out-of-your-dot-account-on-the-polkadot-js-ui",children:"this support page"}),".\nTo sign transactions with the Polkadot Vault app check\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182000-how-to-sign-a-transaction-in-parity-signer",children:"this support article"}),"\nor see ",(0,n.jsx)(t.a,{href:"https://youtu.be/gbvrHzr4EDY?t=281",children:"this video tutorial"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"import-vault-accounts-into-polkadot-js",children:"Import Vault Accounts into Polkadot-JS"}),"\n",(0,n.jsxs)(t.p,{children:["See\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000184118-polkadot-vault-how-to-add-your-account-on-polkadot-js-ui",children:"this support article"}),"\nto import a Polkadot Vault account into the\n",(0,n.jsx)(t.a,{href:"/docs/polkadotjs#polkadot-js-extension",children:"Polkadot-JS Browser Extension"})," or\n",(0,n.jsx)(t.a,{href:"https://chrome.google.com/webstore/detail/parity-signer-companion/damllfnhhcbmclmjilomenbhkappdjgb",children:"Parity Signer Companion"}),".\nAccounts added to those extensions will be injected into the Polkadot-JS UI."]}),"\n",(0,n.jsx)(t.h2,{id:"do-your-own-chain-spec-and-metadata-update",children:"Do Your Own Chain Spec and Metadata Update"}),"\n",(0,n.jsx)(t.admonition,{title:"This section is for developers and power users only",type:"danger",children:(0,n.jsx)(t.p,{children:"By requesting the chain specification and metadata you trust the specific endpoint you are using\n(unless you are using you own node)."})}),"\n",(0,n.jsxs)(t.p,{children:["The following guide bases on the ",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/parity-signer",children:"Parity Signer"})," Github\npage (to create the Chain Spec QR code and the metadata QR code fountain) and\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/metadata-portal",children:"Metadata Portal"})," Github page (to embed the Chain\nSpec and Metadata into a portal)."]}),"\n",(0,n.jsx)(t.h3,{id:"chain-specification",children:"Chain Specification"}),"\n",(0,n.jsx)(t.h4,{id:"chain-spec-qr",children:"Chain Spec QR"}),"\n",(0,n.jsxs)(t.p,{children:["To add more chains on the Vault app you can follow the instructions\n",(0,n.jsx)(t.a,{href:"https://paritytech.github.io/parity-signer/tutorials/Add-New-Network.html#add-network-specs",children:"here"}),".\nIn this example we will add the ",(0,n.jsx)(t.a,{href:"/docs/learn-assets",children:"Asset Hub"})," system parachain. Briefly,\nfork the ",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/parity-signer",children:"Parity Signer GitHub repository"}),", start the\nterminal within the ",(0,n.jsx)(t.code,{children:"/generate_message"})," folder and type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"cargo run add-specs -d -u wss://kusama-asset-hub-rpc.polkadot.io --encryption sr25519"})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:"wss://kusama-asset.hub-rpc.polkadot.io"})," is the Parity RPC endpoint for the Asset Hub on\nKusama. This will create the file ",(0,n.jsx)(t.code,{children:"sign_me_add_specs_statemine_sr25510"})," under the\n",(0,n.jsx)(t.code,{children:"files/in_progress"})," folder. See all endpoints listed for\n",(0,n.jsx)(t.a,{href:"https://github.com/polkadot-js/apps/blob/089fd77b14169749e35e073a93f7e7276963009c/packages/apps-config/src/endpoints/productionRelayPolkadot.ts",children:"Polkadot"}),"\nand\n",(0,n.jsx)(t.a,{href:"https://github.com/polkadot-js/apps/blob/089fd77b14169749e35e073a93f7e7276963009c/packages/apps-config/src/endpoints/productionRelayKusama.ts",children:"Kusama"}),"\non the Polkadot-JS UI."]}),"\n",(0,n.jsx)(t.h4,{id:"generating-signature",children:"Generating Signature"}),"\n",(0,n.jsx)(t.admonition,{title:"Use a hot account",type:"danger",children:(0,n.jsx)(t.p,{children:"Make sure that the account used to sign the chain specification is a hot account. Never use a cold\naccount from the Vault app or Ledger, as after typing the seed phrase into the terminal that account\nwill be considered hot."})}),"\n",(0,n.jsxs)(t.p,{children:["Start the terminal within the ",(0,n.jsx)(t.code,{children:"files/in_progress"})," folder and type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:'cat sign_me_add_specs_statemine_sr25519 | subkey sign --suri "YOUR SEED PHRASE"'})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:'"YOUR SEED PHRASE"'})," is the seed phrase of the account that will be used to sign and\nauthenticate both the chain spec and later on the metadata. Running the code above will return a\nsignature similar to that below:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"0xc4ce72db959000b6166af96d3bda55a927fd837747bf1bf1ae8a69e57c9ef37c25a88707c47b105a9eb1fbcf9345680eff57eb978cf73919506f6c738834e78a"})}),"\n",(0,n.jsx)(t.h4,{id:"signing-chain-spec",children:"Signing Chain Spec"}),"\n",(0,n.jsxs)(t.p,{children:["Now, go back to the ",(0,n.jsx)(t.code,{children:"/generate_message"})," folder and type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"cargo run --release make --goal qr --crypto sr25519 --msg add-specs --payload sign_me_add_specs_statemine_sr25519 --verifier-hex PUBLIC KEY --signature-hex SIGNATURE"})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:"PUBLIC KEY"})," is the public key of the account with seed ",(0,n.jsx)(t.code,{children:'"YOUR SEED PHRASE"'}),", and ",(0,n.jsx)(t.code,{children:"SIGNATURE"}),"\nis the signature generated in the previous step. Running the code above will create the file\n",(0,n.jsx)(t.code,{children:"add_specs_statemine-sr25519"})," under the ",(0,n.jsx)(t.code,{children:"files/completed"})," folder."]}),"\n",(0,n.jsx)(t.h3,{id:"metadata-updates",children:"Metadata Updates"}),"\n",(0,n.jsx)(t.p,{children:"Similarly to what we did for the chain specification, we now generate and sign the Asset Hub\nmetadata."}),"\n",(0,n.jsx)(t.h4,{id:"metadata-qr-fountain",children:"Metadata QR Fountain"}),"\n",(0,n.jsxs)(t.p,{children:["To update the chain metadata for the Asset Hub specs on the Vault app you can follow the\ninstructions\n",(0,n.jsx)(t.a,{href:"https://paritytech.github.io/parity-signer/tutorials/Add-New-Network.html#add-network-metadata",children:"here"}),".\nBriefly, in the Parity Signer repository, start the terminal within the ",(0,n.jsx)(t.code,{children:"/generate_message"})," folder\nand type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"cargo run load-metadata -d -u wss://kusama-asset-hub-rpc.polkadot.io"})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:"wss://kusama-asset-hub-rpc.polkadot.io"})," is the Parity RPC endpoint for the Asset Hub on\nKusama. This will create the file ",(0,n.jsx)(t.code,{children:"sign_me_load_metadata_statemineV9370"})," under the\n",(0,n.jsx)(t.code,{children:"files/in_progress"})," folder. Note that for future metadata updates the file name will change as the\nversion at the time of writing was ",(0,n.jsx)(t.code,{children:"V9370"}),"."]}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["Note that the name of the file changes according to the network version. That is, ",(0,n.jsx)(t.code,{children:"????"})," in\n",(0,n.jsx)(t.code,{children:"sign_me_load_metadata_statemineV????"})," will be the latest version at fetch time."]})}),"\n",(0,n.jsx)(t.h4,{id:"generating-signature-1",children:"Generating Signature"}),"\n",(0,n.jsx)(t.admonition,{title:"Use a hot account",type:"danger",children:(0,n.jsx)(t.p,{children:"Make sure that the account used to sign the metadata is a hot account. Never use a cold account from\nthe Vault app or Ledger, as after typing the seed phrase into the terminal that account will be\nconsidered hot."})}),"\n",(0,n.jsxs)(t.p,{children:["Start the terminal within the ",(0,n.jsx)(t.code,{children:"files/in_progress"})," folder and type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:'cat sign_me_load_metadata_statemineV9370 | subkey sign --suri "YOUR SEED PHRASE"'})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:'"YOUR SEED PHRASE"'})," is the seed phrase of the account you used to sign the chain\nspecification. Running the code above will return a signature similar to that below:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"0xde1ad7aeb252acb3cf42a522dcc8dc3f317a49be2ed636836dd6df8f7e47135f2c712480055822eba87e9ea5ac7d3bba96045992ae795856fdf4eea09a411f85"})}),"\n",(0,n.jsx)(t.admonition,{title:"Do not copy the code lines above",type:"info",children:(0,n.jsxs)(t.p,{children:["Note that the name of the file changes according to the network version. That is, ",(0,n.jsx)(t.code,{children:"????"})," in\n",(0,n.jsx)(t.code,{children:"sign_me_load_metadata_statemineV????"})," will be the latest version at fetch time. So, do not copy the\ncode line above, but change the version with the appropriate one saved under the ",(0,n.jsx)(t.code,{children:"files/in_progress"}),"\nfolder. The signature changes as well."]})}),"\n",(0,n.jsx)(t.h4,{id:"signing-metadata",children:"Signing Metadata"}),"\n",(0,n.jsxs)(t.p,{children:["Now, go back to the ",(0,n.jsx)(t.code,{children:"/generate_message"})," folder and type the following:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"cargo run --release make --goal qr --crypto sr25519 --msg load-metadata --payload sign_me_load_metadata_statemineV9370 --verifier-hex PUBLIC KEY --signature-hex SIGNATURE"})}),"\n",(0,n.jsxs)(t.p,{children:["where ",(0,n.jsx)(t.code,{children:"PUBLIC KEY"})," is the public key of the account with seed ",(0,n.jsx)(t.code,{children:'"YOUR SEED PHRASE"'}),", and ",(0,n.jsx)(t.code,{children:"SIGNATURE"}),"\nis the signature generated in the previous step. Running the code above will create the file\n",(0,n.jsx)(t.code,{children:"load_metadata_statemineV9370"})," under the ",(0,n.jsx)(t.code,{children:"files/completed"})," folder."]}),"\n",(0,n.jsx)(t.h3,{id:"add-chain--update-metadata",children:"Add Chain & Update Metadata"}),"\n",(0,n.jsxs)(t.p,{children:["You can open ",(0,n.jsx)(t.code,{children:"add_specs_statemine-sr25519"})," on your browser (just drag the file on an open tab). This\nis a .png file containing the QR code to add the Asset Hub chain specification into the Vault App.\nYou can do the same with the ",(0,n.jsx)(t.code,{children:"load_metadata_statemineV9370"}),". This is a .apng file containing the QR\ncode fountain to do the metadata update for the Asset Hub on Kusama."]}),"\n",(0,n.jsx)(t.h3,{id:"metadata-portal",children:"Metadata Portal"}),"\n",(0,n.jsxs)(t.h4,{id:"modify-config-file",children:["Modify ",(0,n.jsx)(t.code,{children:"config"})," File"]}),"\n",(0,n.jsxs)(t.p,{children:["Alternatively, you can add the chain specification QR code and the metadata QR code fountain in a\nmetadata portal. Briefly, fork the\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/metadata-portal",children:"Parity's Metadata Portal GitHub repository"}),". You can\nmodify the following fields of the ",(0,n.jsx)(t.code,{children:"config.toml"})," file:"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"name"}),": your name / institution"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"public_key"}),": the public key of the account you use to sign the chain spec and the metadata."]}),"\n",(0,n.jsx)(t.li,{children:"At the bottom of the file add the following information:"}),"\n"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:'[[chains]]\nname = "Statemine"\ntitle = "Kusama Asset Hub"\nrpc_endpoint = "wss://kusama-asset-hub-rpc.polkadot.io"\ncolor = "#f27230"\n\n[chains.github_release]\nowner = "paritytech"\nrepo = "statemint"\ngenesis_hash = "0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a"\n'})}),"\n",(0,n.jsx)(t.p,{children:"For each additional chain, you need to add the respective information. Information about the genesis\nhash can be found on the Polkadot-JS UI > connect to the relevant chain > Developer > Chain State."}),"\n",(0,n.jsx)(t.h4,{id:"rename-chains-files",children:"Rename Chain's Files"}),"\n",(0,n.jsx)(t.p,{children:"Rename the signed chain specification and metadata files as follow:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["\n",(0,n.jsxs)(t.p,{children:["Chain specification: ",(0,n.jsx)(t.code,{children:"add_specs_statemine-sr25519"})," --\x3e ",(0,n.jsx)(t.code,{children:"statemine_specs.png"})]}),"\n"]}),"\n",(0,n.jsxs)(t.li,{children:["\n",(0,n.jsxs)(t.p,{children:["Metadata updates: ",(0,n.jsx)(t.code,{children:"load_metadata_statemineV9370"}),"--\x3e ",(0,n.jsx)(t.code,{children:"statemine_metadata_9370.apng"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["Thus, for chain specification the file must be renamed to ",(0,n.jsx)(t.code,{children:"chainName_specs.png"})," while for metadata\nthe file must be renamed to ",(0,n.jsx)(t.code,{children:"chainName_metadata_version.apng"})," where ",(0,n.jsx)(t.code,{children:"chainName"})," is the name of the\nchain and ",(0,n.jsx)(t.code,{children:"version"})," is the version of the metadata."]}),"\n",(0,n.jsxs)(t.p,{children:["Add the renamed files to the ",(0,n.jsx)(t.code,{children:"/public/qr folder"})," within the Metadata Portal repository."]}),"\n",(0,n.jsx)(t.h4,{id:"run-portal",children:"Run Portal"}),"\n",(0,n.jsxs)(t.p,{children:["Open the terminal within the Metadata Portal repository and run ",(0,n.jsx)(t.code,{children:"make updater"}),". Then run\n",(0,n.jsx)(t.code,{children:"make collector"}),"; this will create the ",(0,n.jsx)(t.code,{children:"_latest.apng"})," files for each of the chains (removed by the\ncommand ",(0,n.jsx)(t.code,{children:"make cleaner"}),"). Finally, run ",(0,n.jsx)(t.code,{children:"yarn start"})," to load the metadata portal on your localhost."]})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},67141:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(96540),i=a(74848);const s=function(e){var t,a=e.message,s=(0,n.useState)(!0),o=s[0],d=s[1];return(0,i.jsx)(i.Fragment,{children:o&&(0,i.jsxs)("div",{className:"message-box",children:[(0,i.jsx)("button",{className:"close-button",onClick:function(){d(!1)},children:"\u2716 "}),(0,i.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=a,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,t,a)=>{a.d(t,{R:()=>o,x:()=>d});var n=a(96540);const i={},s=n.createContext(i);function o(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dd2fa029.51c441af.js b/assets/js/dd2fa029.51c441af.js deleted file mode 100644 index f43ff673c8c6..000000000000 --- a/assets/js/dd2fa029.51c441af.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2047],{98546:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>c,toc:()=>u});var n=r(74848),o=r(28453),a=r(67141),s=r(3514);const l={id:"learn-polkadotjs",title:"Polkadot-JS",sidebar_label:"Polkadot-JS",description:"Overview of Polkadot-JS.",keywords:["polkadot-js","polkadot js"],slug:"../learn-polkadotjs"},i=void 0,c={id:"learn/learn-polkadotjs",title:"Polkadot-JS",description:"Overview of Polkadot-JS.",source:"@site/../docs/learn/learn-polkadotjs.md",sourceDirName:"learn",slug:"/learn-polkadotjs",permalink:"/docs/learn-polkadotjs",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadotjs.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1714545713e3,frontMatter:{id:"learn-polkadotjs",title:"Polkadot-JS",sidebar_label:"Polkadot-JS",description:"Overview of Polkadot-JS.",keywords:["polkadot-js","polkadot js"],slug:"../learn-polkadotjs"},sidebar:"docs",previous:{title:"Advanced",permalink:"/docs/learn-advanced-index"},next:{title:"Polkadot-JS Tooling",permalink:"/docs/polkadotjs"}},d={},u=[];function p(e){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsx)(s.A,{})]})}function m(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(p,{...e})}):p()}},67141:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(96540),o=r(74848);const a=function(e){var t,r=e.message,a=(0,n.useState)(!0),s=a[0],l=a[1];return(0,o.jsx)(o.Fragment,{children:s&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=r,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,r)=>{r.d(t,{A:()=>v});r(96540);var n=r(34164),o=r(26972),a=r(28774),s=r(53465),l=r(16654),i=r(21312),c=r(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=r(74848);function p(e){var t=e.href,r=e.children;return(0,u.jsx)(a.A,{href:t,className:(0,n.A)("card padding--lg",d.cardContainer),children:r})}function m(e){var t=e.href,r=e.icon,o=e.title,a=e.description;return(0,u.jsxs)(p,{href:t,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,n.A)("text--truncate",d.cardTitle),title:o,children:[r," ",o]}),a&&(0,u.jsx)("p",{className:(0,n.A)("text--truncate",d.cardDescription),title:a,children:a})]})}function f(e){var t,r,n=e.item,a=(0,o.Nr)(n),l=(r=(0,s.W)().selectMessage,function(e){return r(e,(0,i.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,u.jsx)(m,{href:a,icon:"\ud83d\uddc3\ufe0f",title:n.label,description:null!=(t=n.description)?t:l(n.items.length)}):null}function h(e){var t,r,n=e.item,a=(0,l.A)(n.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,o.cC)(null!=(t=n.docId)?t:void 0);return(0,u.jsx)(m,{href:n.href,icon:a,title:n.label,description:null!=(r=n.description)?r:null==s?void 0:s.description})}function k(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(h,{item:t});case"category":return(0,u.jsx)(f,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function g(e){var t=e.className,r=(0,o.$S)();return(0,u.jsx)(v,{items:r.items,className:t})}function v(e){var t=e.items,r=e.className;if(!t)return(0,u.jsx)(g,Object.assign({},e));var a=(0,o.d1)(t);return(0,u.jsx)("section",{className:(0,n.A)("row",r),children:a.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(k,{item:e})},t)}))})}},53465:(e,t,r)=>{r.d(t,{W:()=>c});var n=r(96540),o=r(44586),a=["zero","one","two","few","many","other"];function s(e){return a.filter((function(t){return e.includes(t)}))}var l={locale:"en",pluralForms:s(["one","other"]),select:function(e){return 1===e?"one":"other"}};function i(){var e=(0,o.A)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return t=e,r=new Intl.PluralRules(t),{locale:t,pluralForms:s(r.resolvedOptions().pluralCategories),select:function(e){return r.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),l}var t,r}),[e])}function c(){var e=i();return{selectMessage:function(t,r){return function(e,t,r){var n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error("For locale="+r.locale+", a maximum of "+r.pluralForms.length+" plural forms are expected ("+r.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var o=r.select(t),a=r.pluralForms.indexOf(o);return n[Math.min(a,n.length-1)]}(r,t,e)}}}},28453:(e,t,r)=>{r.d(t,{R:()=>s,x:()=>l});var n=r(96540);const o={},a=n.createContext(o);function s(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dd2fa029.e34bb4f5.js b/assets/js/dd2fa029.e34bb4f5.js new file mode 100644 index 000000000000..65c7ea0451e1 --- /dev/null +++ b/assets/js/dd2fa029.e34bb4f5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2047],{98546:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>m,frontMatter:()=>l,metadata:()=>c,toc:()=>u});var n=r(74848),o=r(28453),a=r(67141),s=r(3514);const l={id:"learn-polkadotjs",title:"Polkadot-JS",sidebar_label:"Polkadot-JS",description:"Overview of Polkadot-JS.",keywords:["polkadot-js","polkadot js"],slug:"../learn-polkadotjs"},i=void 0,c={id:"learn/learn-polkadotjs",title:"Polkadot-JS",description:"Overview of Polkadot-JS.",source:"@site/../docs/learn/learn-polkadotjs.md",sourceDirName:"learn",slug:"/learn-polkadotjs",permalink:"/docs/learn-polkadotjs",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-polkadotjs.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-polkadotjs",title:"Polkadot-JS",sidebar_label:"Polkadot-JS",description:"Overview of Polkadot-JS.",keywords:["polkadot-js","polkadot js"],slug:"../learn-polkadotjs"},sidebar:"docs",previous:{title:"Advanced",permalink:"/docs/learn-advanced-index"},next:{title:"Polkadot-JS Tooling",permalink:"/docs/polkadotjs"}},d={},u=[];function p(e){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsx)(s.A,{})]})}function m(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(p,{...e})}):p()}},67141:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(96540),o=r(74848);const a=function(e){var t,r=e.message,a=(0,n.useState)(!0),s=a[0],l=a[1];return(0,o.jsx)(o.Fragment,{children:s&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){l(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=r,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},3514:(e,t,r)=>{r.d(t,{A:()=>v});r(96540);var n=r(34164),o=r(26972),a=r(28774),s=r(53465),l=r(16654),i=r(21312),c=r(51107);const d={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var u=r(74848);function p(e){var t=e.href,r=e.children;return(0,u.jsx)(a.A,{href:t,className:(0,n.A)("card padding--lg",d.cardContainer),children:r})}function m(e){var t=e.href,r=e.icon,o=e.title,a=e.description;return(0,u.jsxs)(p,{href:t,children:[(0,u.jsxs)(c.A,{as:"h2",className:(0,n.A)("text--truncate",d.cardTitle),title:o,children:[r," ",o]}),a&&(0,u.jsx)("p",{className:(0,n.A)("text--truncate",d.cardDescription),title:a,children:a})]})}function f(e){var t,r,n=e.item,a=(0,o.Nr)(n),l=(r=(0,s.W)().selectMessage,function(e){return r(e,(0,i.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:e}))});return a?(0,u.jsx)(m,{href:a,icon:"\ud83d\uddc3\ufe0f",title:n.label,description:null!=(t=n.description)?t:l(n.items.length)}):null}function h(e){var t,r,n=e.item,a=(0,l.A)(n.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",s=(0,o.cC)(null!=(t=n.docId)?t:void 0);return(0,u.jsx)(m,{href:n.href,icon:a,title:n.label,description:null!=(r=n.description)?r:null==s?void 0:s.description})}function k(e){var t=e.item;switch(t.type){case"link":return(0,u.jsx)(h,{item:t});case"category":return(0,u.jsx)(f,{item:t});default:throw new Error("unknown item type "+JSON.stringify(t))}}function g(e){var t=e.className,r=(0,o.$S)();return(0,u.jsx)(v,{items:r.items,className:t})}function v(e){var t=e.items,r=e.className;if(!t)return(0,u.jsx)(g,Object.assign({},e));var a=(0,o.d1)(t);return(0,u.jsx)("section",{className:(0,n.A)("row",r),children:a.map((function(e,t){return(0,u.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,u.jsx)(k,{item:e})},t)}))})}},53465:(e,t,r)=>{r.d(t,{W:()=>c});var n=r(96540),o=r(44586),a=["zero","one","two","few","many","other"];function s(e){return a.filter((function(t){return e.includes(t)}))}var l={locale:"en",pluralForms:s(["one","other"]),select:function(e){return 1===e?"one":"other"}};function i(){var e=(0,o.A)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return t=e,r=new Intl.PluralRules(t),{locale:t,pluralForms:s(r.resolvedOptions().pluralCategories),select:function(e){return r.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),l}var t,r}),[e])}function c(){var e=i();return{selectMessage:function(t,r){return function(e,t,r){var n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error("For locale="+r.locale+", a maximum of "+r.pluralForms.length+" plural forms are expected ("+r.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var o=r.select(t),a=r.pluralForms.indexOf(o);return n[Math.min(a,n.length-1)]}(r,t,e)}}}},28453:(e,t,r)=>{r.d(t,{R:()=>s,x:()=>l});var n=r(96540);const o={},a=n.createContext(o);function s(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e495ca4d.2839c84e.js b/assets/js/e495ca4d.2839c84e.js new file mode 100644 index 000000000000..9a4e6e34eb4d --- /dev/null +++ b/assets/js/e495ca4d.2839c84e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[662],{6099:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var n=o(74848),a=o(28453),i=o(67141);const s={id:"maintain-guides-democracy",title:"Participate in Democracy",sidebar_label:"Participate in Democracy",description:"Steps on how to participate in democracy.",keywords:["democracy","council","action","proposal"],slug:"../maintain-guides-democracy"},r=void 0,c={id:"maintain/archive/maintain-guides-democracy",title:"Participate in Democracy",description:"Steps on how to participate in democracy.",source:"@site/../docs/maintain/archive/maintain-guides-democracy.md",sourceDirName:"maintain/archive",slug:"/maintain/maintain-guides-democracy",permalink:"/docs/maintain/maintain-guides-democracy",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/archive/maintain-guides-democracy.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"maintain-guides-democracy",title:"Participate in Democracy",sidebar_label:"Participate in Democracy",description:"Steps on how to participate in democracy.",keywords:["democracy","council","action","proposal"],slug:"../maintain-guides-democracy"},sidebar:"docs",previous:{title:"Archive",permalink:"/docs/maintain-archive"},next:{title:"Join the Council",permalink:"/docs/maintain/maintain-guides-how-to-join-council"}},l={},d=[{value:"Important Parameters",id:"important-parameters",level:2},{value:"Proposing an Action",id:"proposing-an-action",level:2},{value:"Submitting a Preimage",id:"submitting-a-preimage",level:2},{value:"Endorsing a Proposal",id:"endorsing-a-proposal",level:2},{value:"Voting on a Proposal",id:"voting-on-a-proposal",level:2},{value:"Unlocking Locked Tokens",id:"unlocking-locked-tokens",level:2},{value:"With a Ledger hardware wallet or Unlocking Very Old Locks",id:"with-a-ledger-hardware-wallet-or-unlocking-very-old-locks",level:4},{value:"Delegate a Vote",id:"delegate-a-vote",level:2},{value:"Undelegate a Vote",id:"undelegate-a-vote",level:2},{value:"Voting with a Governance Proxy",id:"voting-with-a-governance-proxy",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../learn-polkadot-opengov)."}),"\n",(0,n.jsxs)(t.p,{children:["The public referenda chamber is one of the three bodies of on-chain governance as it's instantiated\nin Polkadot and Kusama. The other two bodies are the\n",(0,n.jsx)(t.a,{href:"/docs/maintain/maintain-guides-how-to-join-council",children:"council"})," and the\n",(0,n.jsx)(t.a,{href:"/docs/learn/learn-governance#technical-committee",children:"technical committee"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["Public referenda can be proposed and voted on by any token holder in the system as long as they\nprovide a bond. After a proposal is made, others can agree with it by ",(0,n.jsx)(t.em,{children:"endorsing"})," it and putting up\ntokens equal to the original bond. During every launch period, the most endorsed proposal will be\nmoved to the public referenda table where it can be voted upon. Voters who are willing to lock up\ntheir tokens for a greater duration of time can do so and get their votes amplified. For more\ndetails on the governance system please see ",(0,n.jsx)(t.a,{href:"/docs/learn/learn-governance",children:"here"}),"."]}),"\n",(0,n.jsx)(t.p,{children:"This guide will instruct token holders how to propose and vote on public referenda using the\nDemocracy module. Below are a few links to stay informed and directly engage with the community."}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction"})," - a place to discuss\ngovernance and the future of Polkadot."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://matrix.to/#/#Kusama-Direction:parity.io",children:"Kusama Direction"})," - a place to discuss\ngovernance and the future of Kusama."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://polkadot.polkassembly.io",children:"Polkadot"})," and ",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io",children:"Kusama"}),"\nPolkassembly - for current referenda, latest proposals, motions, treasury proposals, tips,\nbounties, and more."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://matrix.to/#/#dailydigest:web3.foundation",children:"Polkadot Daily Digest"})," - News about what is\nhappening in the Polkadot ecosystem, published every weekday except holidays."]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"important-parameters",children:"Important Parameters"}),"\n",(0,n.jsx)(t.p,{children:"The important parameters to be aware of when voting using the Democracy module are as follows:"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Launch Period"})," - How often new public referenda are launched."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Voting Period"})," - How often votes for referenda are tallied."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Emergency Voting Period"})," - The minimum voting period for a fast-tracked emergency referendum."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Minimum Deposit"})," - The minimum amount to be used as a deposit for a public referendum proposal."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Enactment Period"})," - The minimum period for locking funds ",(0,n.jsx)(t.em,{children:"and"})," the period between a proposal\nbeing approved and enacted."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Cooloff Period"})," - The period in blocks where a proposal may not be re-submitted after being\nvetoed."]}),"\n",(0,n.jsx)(t.h2,{id:"proposing-an-action",children:"Proposing an Action"}),"\n",(0,n.jsx)(t.p,{children:'Proposing an action to be taken requires you to bond some tokens. In order to ensure you have enough\ntokens to make the minimum deposit, you can check the parameter in the chain state. Navigate to\nDeveloper > Chain State > Constants > selected constant query: democracy > minimumDeposit: u128 and\nthen click on the plus button. The bonded tokens will only be released once the proposal is tabled\n(that is, brought to a vote); there is no way for the user to "revoke" their proposal and get the\nbond back before it has become a referendum. Since it is essentially impossible to predict\ndefinitely when a proposal may become a referendum (if ever), this means that any tokens bonded will\nbe locked for an indeterminate amount of time.'}),"\n",(0,n.jsxs)(t.admonition,{title:"Proposals cannot be revoked by the proposer, even if they never turn into a referendum",type:"info",children:[(0,n.jsx)(t.p,{children:"It is important to realize that there is no guarantee that DOT you use for proposing or endorsing a\nproposal will be returned to that account in any given timeframe."}),(0,n.jsx)(t.p,{children:'::: On Polkadot Apps, you can navigate to the Governance -> Democracy tab to make a new proposal. In\norder to submit a proposal, you will need to submit what\'s called the preimage hash. The preimage\nhash is simply the hash of the proposal to be enacted. The easiest way to get the preimage hash is\nby clicking on the "Submit preimage" button and configuring the action that you are proposing.'}),(0,n.jsxs)(t.p,{children:["The example below demonstrates the creation of a proposal on Kusama (",(0,n.jsx)(t.strong,{children:"the same procedure applies to\nPolkadot"}),'). If you wanted to propose that a remark "Expect Chaos!" is added, the preimage hash\nwould be ',(0,n.jsx)(t.code,{children:"0x8ac3f722caf7677254e25ca4ad77d533ca893c7d2ad4009e258d749f2004ef94"}),". You can copy this\npreimage hash and save it for the next step. There is no need to click Submit Preimage at this\npoint, though you could. We'll go over that in the next section."]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"submit preimage",src:o(90005).A+"",width:"1182",height:"526"})}),(0,n.jsxs)(t.p,{children:['Now you will click on the "Submit proposal" button and enter the preimage hash in the input titled\n"preimage hash" and ',(0,n.jsx)(t.em,{children:"at least"}),' the minimum deposit into the "locked balance" field. Click on the\n"Submit proposal" button and confirm the transaction. You should now see your proposal appear in the\n"proposals" column on the page.']}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"submit proposal",src:o(33677).A+"",width:"1184",height:"456"})}),(0,n.jsx)(t.p,{children:"Now your proposal is visible to anyone who accesses the chain and others can endorse it or submit a\npreimage. However, it's hard to tell what exactly this proposal does since it shows the hash of the\naction. Other holders will not be able to make a judgement on whether they endorse it or not until\nsomeone submits the actual preimage for this proposal. In the next step, you will submit the\npreimage."}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"proposal hash",src:o(98955).A+"",width:"1424",height:"276"})}),(0,n.jsx)(t.h2,{id:"submitting-a-preimage",children:"Submitting a Preimage"}),(0,n.jsx)(t.p,{children:"The act of making a proposal is split from submitting the preimage for the proposal since the\nstorage cost of submitting a large preimage could be pretty expensive. Allowing for the preimage\nsubmission to come as a separate transaction means that another account could submit the preimage\nfor you if you don't have the funds to do so. It also means that you don't have to pay so many funds\nright away as you can prove the preimage hash out-of-band."}),(0,n.jsx)(t.p,{children:"However, at some point before the proposal passes you will need to submit the preimage or else the\nproposal cannot be enacted. The guide will now show you how to do this."}),(0,n.jsx)(t.p,{children:'Click on the blue "Submit preimage" button and configure it to be the same as what you did before to\nacquire the preimage hash. This time, instead of copying the hash to another tab, you will follow\nthrough and click "Submit preimage" and confirm the transaction.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"submit preimage",src:o(90005).A+"",width:"1182",height:"526"})}),(0,n.jsx)(t.p,{children:"Once the transaction is included you should see the UI update with the information for your already\nsubmitted proposal."}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"proposals",src:o(65589).A+"",width:"1424",height:"276"})}),(0,n.jsx)(t.h2,{id:"endorsing-a-proposal",children:"Endorsing a Proposal"}),(0,n.jsx)(t.p,{children:"Endorsing a proposal means that you are agreeing with the proposal and backing it with an equal\namount of deposit as was originally locked. The bonded tokens will be released once the proposal is\ntabled (that is, brought to a vote), just like the original proposer's bond. By endorsing a proposal\nyou will move it higher up the rank of proposals. The most endorsed proposal \u2014 in value, not\nthe number of supporters \u2014 will be brought to a referendum every launch period."}),(0,n.jsx)(t.p,{children:"It is important to note that there is no way to stop or cancel endorsing a proposal once it has been\ndone. Therefore, the DOT that was endorsed will be reserved until the proposal is tabled as a\nreferendum. This is an indeterminate amount of time, since there is no guarantee that a proposal\nwill become a referendum for a given period, as other proposals may be proposed and tabled before\nit."}),(0,n.jsxs)(t.p,{children:["Note that it is possible for a single account to endorse a proposal multiple times. This is by\ndesign; it is the value, not the number of endorsements ",(0,n.jsx)(t.em,{children:"per se"}),", that counts in terms of weighting.\nIf there were a limit of one endorsement per account, it would be trivial for a user with, for\nexample, 1000 DOT to create ten accounts with 100 DOT instead of a single account with 1000 DOT.\nThus, no restrictions are made on the number of times a single account can endorse a proposal."]}),(0,n.jsx)(t.p,{children:'To endorse a proposal, navigate to the proposal you want to endorse and click on the "Endorse"\nbutton.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"endorsement button",src:o(67919).A+"",width:"1440",height:"128"})}),(0,n.jsx)(t.p,{children:'You will be prompted with the full details of the proposal (if the preimage has been submitted!) and\ncan then broadcast the transaction by clicking the blue "Endorse" button.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"endorsement confirmed",src:o(31452).A+"",width:"1184",height:"356"})}),(0,n.jsx)(t.p,{children:"Once successful, you will see your endorsement appear in the dropdown in the proposal details."}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"endorsement result",src:o(24633).A+"",width:"1440",height:"336"})}),(0,n.jsx)(t.h2,{id:"voting-on-a-proposal",children:"Voting on a Proposal"}),(0,n.jsxs)(t.p,{children:["At the end of each launch period, the most endorsed proposal will move to a referendum. During this\ntime you can cast a vote for or against the proposal. You may also lock up your tokens for a greater\nlength of time to weigh your vote more strongly. During the time your tokens are\n",(0,n.jsx)(t.a,{href:"/docs/learn-account-balances#locks",children:"locked"}),", you are unable to transfer them, however they\ncan still be used for further votes. Locks are layered on top of each other, so an eight-week lock\ndoes not become a 15-week lock if you vote again a week later, rather another eight-week lock is\nplaced to extend the lock just one extra week."]}),(0,n.jsxs)(t.p,{children:["To vote on a referendum, navigate to the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/democracy/",children:'"Democracy" tab of Polkadot Apps'}),'. Any active referendum\nwill show in the "referenda" column. Click the blue button "Vote" to cast a vote for the referendum.']}),(0,n.jsx)(t.p,{children:'If you would like to cast your vote for the proposal select the "Aye, I approve" option. If you\nwould like to cast your vote against the proposal in the referendum you will select "Nay, I do not\napprove" option.'}),(0,n.jsx)(t.p,{children:"The endorsement option is to select your conviction for this vote. The longer you are willing to\nlock your tokens, the stronger your vote will be weighted. The timeline for the conviction starts\nafter the voting period ends; tokens used for voting will always be locked until the end of the\nvoting period, no matter what conviction you vote with. Unwillingness to lock your tokens means that\nyour vote only counts for 10% of the tokens that you hold, while the maximum lock-up of 896 days\nmeans you can make your vote count for 600% of the tokens that you hold. It is possible to vote with\ntokens already locked by staking."}),(0,n.jsx)(t.p,{children:'When you are comfortable with the decision you have made, click the blue "Vote" button to submit\nyour transaction and wait for it to be included in a block.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"voting",src:o(97943).A+"",width:"940",height:"712"})}),(0,n.jsx)(t.h2,{id:"unlocking-locked-tokens",children:"Unlocking Locked Tokens"}),(0,n.jsxs)(t.p,{children:["Like ",(0,n.jsx)(t.a,{href:"/docs/learn-DOT#lazy-vesting",children:"vesting"}),", the tokens that are locked in democracy are\nunlocked lazily. This means that you, the user, must explicitly call an unlock extrinsic to make\nyour funds available again after the lock expires. Unbonding is another term you hear a lot in\nPolkadot, it means withdrawing your DOT that was used in staking. To know more about it, please see\n",(0,n.jsx)(t.a,{href:"/docs/learn-nominator",children:"here"}),"."]}),(0,n.jsxs)(t.p,{children:['You can do this from the "Accounts" page in\n',(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS Apps"}),', unless you use Ledger (see below).\nFirst, check that your account has a "democracy" lock by opening the details on your balance. In the\nexample below the account has 150 KSM locked in democracy.']}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"democracy balance details",src:o(77651).A+"",width:"342",height:"214"})}),(0,n.jsx)(t.p,{children:'Now you can click the menu button (the three dots) and find the option that says "Clear expired\ndemocracy locks". After selecting this option you may confirm the transaction and your locks will be\ncleared when successful.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"democracy clear locks",src:o(8710).A+"",width:"366",height:"933"})}),(0,n.jsx)(t.h4,{id:"with-a-ledger-hardware-wallet-or-unlocking-very-old-locks",children:"With a Ledger hardware wallet or Unlocking Very Old Locks"}),(0,n.jsx)(t.p,{children:"If you do not see an option to clear expired democracy votes, it may be that the lock is very old.\nOr, if you are using the Ledger hardware wallet, you will not be able to issue the batch Unlock\naction from the UI."}),(0,n.jsx)(t.p,{children:"Instead, you must clear the lock by directly issuing the correct extrinsics."}),(0,n.jsxs)(t.p,{children:["Navigate to the ",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics page"})," and submit the\nfollowing extrinsic: ",(0,n.jsx)(t.code,{children:"democracy.removeVote(index)"}),' using the account that you voted with. For the\nindex number (ReferendumIndex), enter the number of the referendum for which you voted ("12" in the\nimage below).']}),(0,n.jsx)(t.p,{children:"The number of the referendum for which you voted is visible in an explorer such as Subscan."}),(0,n.jsx)(t.p,{children:'You need to press the "Submit Transaction" button to submit the extrinsic.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"democracy clear_lock_extrinsic_1",src:o(62127).A+"",width:"871",height:"234"})}),(0,n.jsx)(t.p,{children:"Now submit the following extrinsic: `democracy.unlock(target), where the target is your account\naddress."}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"democracy clear_lock_extrinsic_2",src:o(43220).A+"",width:"869",height:"237"})}),(0,n.jsxs)(t.p,{children:["If you return to the ",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts page"}),", you should see that\nthe democracy lock has been released."]}),(0,n.jsxs)(t.p,{children:["Note that this applies only to locked DOT that were used for voting on referenda. In order to unlock\nDOT locked by voting for members of the Polkadot Council, you need to go to the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/council",children:"Council"}),' page, click "Vote", and then click on "Unvote\nAll".']}),(0,n.jsx)(t.h2,{id:"delegate-a-vote",children:"Delegate a Vote"}),(0,n.jsx)(t.p,{children:"If you are too busy to keep up and vote on upcoming referenda, there is an option to delegate your\nvote to another account whose opinion you trust. When you delegate to another account, that account\ngets the added voting power of your tokens along with the conviction that you set. The conviction\nfor delegation works just like the conviction for regular voting, except your tokens may be locked\nlonger than they would normally since locking resets when you undelegate your vote."}),(0,n.jsx)(t.p,{children:"The account that is being delegated to does not make any special action once the delegation is in\nplace. They can continue to vote on referenda how they see fit. The difference is now when the\nDemocracy system tallies votes, the delegated tokens now are added to whatever vote the delegatee\nhas made."}),(0,n.jsxs)(t.p,{children:['You can delegate your vote to another account and even attach a "Conviction" to the delegation.\nNavigate to the ',(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:'"Accounts" tab on Polkadot-JS UI'}),' and\nclick on the three vertical dots and select "Delegate democracy votes" option for the account of\nyour choice. Then you would be presented with a pop-up window which lets you enter the account\ndetails of the delegated account, delegated amount and conviction. You can enter the relevant\ndetails and click on the delegate button and then sign and submit the transaction.']}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"delegate",src:o(34930).A+"",width:"1880",height:"724"})}),(0,n.jsx)(t.p,{children:"Your delegation will count toward whatever account you delegated for votes on until you explicitly\nundelegate your vote."}),(0,n.jsxs)(t.admonition,{title:"Query the chain state for an account's delegation preferences",type:"tip",children:[(0,n.jsxs)(t.p,{children:["It is possible to query the delegation preferences of any actively delegating account on the network\nthrough ",(0,n.jsx)(t.code,{children:"democracy.votingOf"})," extrinsic."]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"query delegation",src:o(33685).A+"",width:"2002",height:"992"})})]})]}),"\n",(0,n.jsx)(t.h2,{id:"undelegate-a-vote",children:"Undelegate a Vote"}),"\n",(0,n.jsxs)(t.admonition,{type:"caution",children:[(0,n.jsx)(t.p,{children:"If there is an existing lock due to a previous delegation change or undelegation, any new change or\nundelegation will restart the lock period for the larger DOT amount and the longest conviction\nperiod between the existing and the new lock."}),(0,n.jsx)(t.p,{children:"This will only matter to accounts with conviction, as the accounts with no conviction don't have any\nlock period."}),(0,n.jsx)(t.p,{children:"Examples:"}),(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["\n",(0,n.jsx)(t.p,{children:"Delegate 500 DOT with 1x conviction, then change delegation to 1000 DOT with 1x conviction, the\nlock period will reset for 1000 DOT with 1x conviction."}),"\n"]}),"\n",(0,n.jsxs)(t.li,{children:["\n",(0,n.jsx)(t.p,{children:"Delegate 500 DOT with 3x conviction, then change the delegation to 1000 DOT with 1x conviction,\nthe lock period will reset for 1000 DOT with 3x conviction."}),"\n"]}),"\n",(0,n.jsxs)(t.li,{children:["\n",(0,n.jsx)(t.p,{children:"Delegate 500 DOT with 1x conviction, then change the delegation to 200 DOT with 1x conviction,\nthe lock period will reset for 500 DOT with 1x conviction."}),"\n"]}),"\n"]}),(0,n.jsxs)(t.p,{children:["To understand this in further detail checkout\n",(0,n.jsx)(t.a,{href:"https://substrate.stackexchange.com/questions/5067/delegating-and-undelegating-during-the-lock-period-extends-it-for-the-initial-am",children:"this stackexchange post."})]})]}),"\n",(0,n.jsxs)(t.p,{children:['You may decide at some point in the future to remove your delegation to a target account. In this\ncase, your tokens will be locked for the maximum amount of time in accordance with the conviction\nyou set at the beginning of the delegation. For example, if you chose "2x" delegation for four weeks\nof lock-up time, your tokens will be locked for 4 weeks after sending the ',(0,n.jsx)(t.code,{children:"undelegate"})," transaction.\nOnce your vote has been undelegated, you are in control of making votes with it once again. You can\nstart to vote directly, or choose a different account to act as your delegate."]}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"undelegate"})," transaction must be sent from the account that you wish to clear of its delegation.\nFor example, if Alice has delegated her tokens to Bob, Alice would need to be the one to call the\n",(0,n.jsx)(t.code,{children:"undelegate"})," transaction to clear her delegation."]}),"\n",(0,n.jsxs)(t.p,{children:["The easiest way to do this is from the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:'"Accounts" tab on Polkadot-JS UI'})," where you can manage the\ndelegation of your account."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"manage delegation",src:o(95136).A+"",width:"1990",height:"224"})}),"\n",(0,n.jsx)(t.p,{children:"When you click on \"manage delegation\", you would be presented with a pre-populated pop-up window\nwith that account's delegation preferences. Here, you have an option to undelegate or save the\nmodifications made to the account's delegation preferences."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"undelegate",src:o(89910).A+"",width:"1884",height:"732"})}),"\n",(0,n.jsx)(t.h2,{id:"voting-with-a-governance-proxy",children:"Voting with a Governance Proxy"}),"\n",(0,n.jsx)(t.p,{children:'Making a vote on behalf of a stash requires a "proxy" transaction from the Proxy pallet. When you\nchoose this transaction from the "Extrinsics" tab, it will let you select "vote" from the Democracy\npallet, and you will specify the index of the referendum that is being voted, the judgement (i.e.\n"Aye" for approval or "Nay" for rejection), and the conviction, just like a normal vote.'}),"\n",(0,n.jsxs)(t.p,{children:["For more material on adding and removing Governance proxies, as well as other types, please see the\n",(0,n.jsx)(t.a,{href:"/docs/learn-proxies",children:"Proxy page"}),"."]})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},67141:(e,t,o)=>{o.d(t,{A:()=>i});var n=o(96540),a=o(74848);const i=function(e){var t,o=e.message,i=(0,n.useState)(!0),s=i[0],r=i[1];return(0,a.jsx)(a.Fragment,{children:s&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=o,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},34930:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/delegate-vote-a8b4d534e0e004f8d0d4a32a45f3a77a.png"},31452:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/endorse-7e22987ceebef0c1ce17f475510eacc9.png"},67919:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/endorse1-6f9ed6c3eb99cad52bd07e250307b397.png"},24633:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/endorsed-list-460b771aedaf6e91f9caaaf728d76dfd.png"},95136:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/manage-delegation-19501197d96e688a08f257a1443f18cd.png"},98955:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/proposal-hash-1ae67063393c7e77001e538b9d4a67af.png"},65589:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/proposals-9b3cc3a8bd2ff1c01c0dbc7c90950d3f.png"},33685:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/query-delegation-fece7720f6282de8928688d61ee38477.png"},90005:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/submit_preimage-b0165c4aa5615a416bc1698ff21cba2e.png"},33677:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/submit_proposal-24cc24bb4fdb502da80a28082f779da8.png"},89910:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/undelegate-save-002a17067954a098e2942aa1a7583698.png"},97943:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/voting-4abb1178436833648da30b63d860aa10.png"},77651:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_balance_details-56b5c71fe66fc4a0d66ba4820a3cc6a9.png"},62127:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_clear_lock_extrinsic_1-c42556da5e59023abb388eac1a12aee2.png"},43220:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_clear_lock_extrinsic_2-f6a313a6755d15eb6ab26d33edb80a72.png"},8710:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_clear_locks-028d6202e19ad4410e07a5da8bb69277.png"},28453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>r});var n=o(96540);const a={},i=n.createContext(a);function s(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e495ca4d.abba1ed3.js b/assets/js/e495ca4d.abba1ed3.js deleted file mode 100644 index 681bab806de2..000000000000 --- a/assets/js/e495ca4d.abba1ed3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[662],{6099:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var n=o(74848),a=o(28453),i=o(67141);const s={id:"maintain-guides-democracy",title:"Participate in Democracy",sidebar_label:"Participate in Democracy",description:"Steps on how to participate in democracy.",keywords:["democracy","council","action","proposal"],slug:"../maintain-guides-democracy"},r=void 0,c={id:"maintain/archive/maintain-guides-democracy",title:"Participate in Democracy",description:"Steps on how to participate in democracy.",source:"@site/../docs/maintain/archive/maintain-guides-democracy.md",sourceDirName:"maintain/archive",slug:"/maintain/maintain-guides-democracy",permalink:"/docs/maintain/maintain-guides-democracy",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/maintain/archive/maintain-guides-democracy.md",tags:[],version:"current",lastUpdatedBy:"Radha",lastUpdatedAt:1729674368e3,frontMatter:{id:"maintain-guides-democracy",title:"Participate in Democracy",sidebar_label:"Participate in Democracy",description:"Steps on how to participate in democracy.",keywords:["democracy","council","action","proposal"],slug:"../maintain-guides-democracy"},sidebar:"docs",previous:{title:"Archive",permalink:"/docs/maintain-archive"},next:{title:"Join the Council",permalink:"/docs/maintain/maintain-guides-how-to-join-council"}},l={},d=[{value:"Important Parameters",id:"important-parameters",level:2},{value:"Proposing an Action",id:"proposing-an-action",level:2},{value:"Submitting a Preimage",id:"submitting-a-preimage",level:2},{value:"Endorsing a Proposal",id:"endorsing-a-proposal",level:2},{value:"Voting on a Proposal",id:"voting-on-a-proposal",level:2},{value:"Unlocking Locked Tokens",id:"unlocking-locked-tokens",level:2},{value:"With a Ledger hardware wallet or Unlocking Very Old Locks",id:"with-a-ledger-hardware-wallet-or-unlocking-very-old-locks",level:4},{value:"Delegate a Vote",id:"delegate-a-vote",level:2},{value:"Undelegate a Vote",id:"undelegate-a-vote",level:2},{value:"Voting with a Governance Proxy",id:"voting-with-a-governance-proxy",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.A,{message:"The content on this page is archived. For up-to-date information about governance, see the\n[Polkadot OpenGov page](../../learn/learn-polkadot-opengov)."}),"\n",(0,n.jsxs)(t.p,{children:["The public referenda chamber is one of the three bodies of on-chain governance as it's instantiated\nin Polkadot and Kusama. The other two bodies are the\n",(0,n.jsx)(t.a,{href:"/docs/maintain/maintain-guides-how-to-join-council",children:"council"})," and the\n",(0,n.jsx)(t.a,{href:"/docs/learn/learn-governance#technical-committee",children:"technical committee"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["Public referenda can be proposed and voted on by any token holder in the system as long as they\nprovide a bond. After a proposal is made, others can agree with it by ",(0,n.jsx)(t.em,{children:"endorsing"})," it and putting up\ntokens equal to the original bond. During every launch period, the most endorsed proposal will be\nmoved to the public referenda table where it can be voted upon. Voters who are willing to lock up\ntheir tokens for a greater duration of time can do so and get their votes amplified. For more\ndetails on the governance system please see ",(0,n.jsx)(t.a,{href:"/docs/learn/learn-governance",children:"here"}),"."]}),"\n",(0,n.jsx)(t.p,{children:"This guide will instruct token holders how to propose and vote on public referenda using the\nDemocracy module. Below are a few links to stay informed and directly engage with the community."}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction"})," - a place to discuss\ngovernance and the future of Polkadot."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://matrix.to/#/#Kusama-Direction:parity.io",children:"Kusama Direction"})," - a place to discuss\ngovernance and the future of Kusama."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://polkadot.polkassembly.io",children:"Polkadot"})," and ",(0,n.jsx)(t.a,{href:"https://kusama.polkassembly.io",children:"Kusama"}),"\nPolkassembly - for current referenda, latest proposals, motions, treasury proposals, tips,\nbounties, and more."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"https://matrix.to/#/#dailydigest:web3.foundation",children:"Polkadot Daily Digest"})," - News about what is\nhappening in the Polkadot ecosystem, published every weekday except holidays."]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"important-parameters",children:"Important Parameters"}),"\n",(0,n.jsx)(t.p,{children:"The important parameters to be aware of when voting using the Democracy module are as follows:"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Launch Period"})," - How often new public referenda are launched."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Voting Period"})," - How often votes for referenda are tallied."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Emergency Voting Period"})," - The minimum voting period for a fast-tracked emergency referendum."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Minimum Deposit"})," - The minimum amount to be used as a deposit for a public referendum proposal."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Enactment Period"})," - The minimum period for locking funds ",(0,n.jsx)(t.em,{children:"and"})," the period between a proposal\nbeing approved and enacted."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Cooloff Period"})," - The period in blocks where a proposal may not be re-submitted after being\nvetoed."]}),"\n",(0,n.jsx)(t.h2,{id:"proposing-an-action",children:"Proposing an Action"}),"\n",(0,n.jsx)(t.p,{children:'Proposing an action to be taken requires you to bond some tokens. In order to ensure you have enough\ntokens to make the minimum deposit, you can check the parameter in the chain state. Navigate to\nDeveloper > Chain State > Constants > selected constant query: democracy > minimumDeposit: u128 and\nthen click on the plus button. The bonded tokens will only be released once the proposal is tabled\n(that is, brought to a vote); there is no way for the user to "revoke" their proposal and get the\nbond back before it has become a referendum. Since it is essentially impossible to predict\ndefinitely when a proposal may become a referendum (if ever), this means that any tokens bonded will\nbe locked for an indeterminate amount of time.'}),"\n",(0,n.jsxs)(t.admonition,{title:"Proposals cannot be revoked by the proposer, even if they never turn into a referendum",type:"info",children:[(0,n.jsx)(t.p,{children:"It is important to realize that there is no guarantee that DOT you use for proposing or endorsing a\nproposal will be returned to that account in any given timeframe."}),(0,n.jsx)(t.p,{children:'::: On Polkadot Apps, you can navigate to the Governance -> Democracy tab to make a new proposal. In\norder to submit a proposal, you will need to submit what\'s called the preimage hash. The preimage\nhash is simply the hash of the proposal to be enacted. The easiest way to get the preimage hash is\nby clicking on the "Submit preimage" button and configuring the action that you are proposing.'}),(0,n.jsxs)(t.p,{children:["The example below demonstrates the creation of a proposal on Kusama (",(0,n.jsx)(t.strong,{children:"the same procedure applies to\nPolkadot"}),'). If you wanted to propose that a remark "Expect Chaos!" is added, the preimage hash\nwould be ',(0,n.jsx)(t.code,{children:"0x8ac3f722caf7677254e25ca4ad77d533ca893c7d2ad4009e258d749f2004ef94"}),". You can copy this\npreimage hash and save it for the next step. There is no need to click Submit Preimage at this\npoint, though you could. We'll go over that in the next section."]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"submit preimage",src:o(90005).A+"",width:"1182",height:"526"})}),(0,n.jsxs)(t.p,{children:['Now you will click on the "Submit proposal" button and enter the preimage hash in the input titled\n"preimage hash" and ',(0,n.jsx)(t.em,{children:"at least"}),' the minimum deposit into the "locked balance" field. Click on the\n"Submit proposal" button and confirm the transaction. You should now see your proposal appear in the\n"proposals" column on the page.']}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"submit proposal",src:o(33677).A+"",width:"1184",height:"456"})}),(0,n.jsx)(t.p,{children:"Now your proposal is visible to anyone who accesses the chain and others can endorse it or submit a\npreimage. However, it's hard to tell what exactly this proposal does since it shows the hash of the\naction. Other holders will not be able to make a judgement on whether they endorse it or not until\nsomeone submits the actual preimage for this proposal. In the next step, you will submit the\npreimage."}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"proposal hash",src:o(98955).A+"",width:"1424",height:"276"})}),(0,n.jsx)(t.h2,{id:"submitting-a-preimage",children:"Submitting a Preimage"}),(0,n.jsx)(t.p,{children:"The act of making a proposal is split from submitting the preimage for the proposal since the\nstorage cost of submitting a large preimage could be pretty expensive. Allowing for the preimage\nsubmission to come as a separate transaction means that another account could submit the preimage\nfor you if you don't have the funds to do so. It also means that you don't have to pay so many funds\nright away as you can prove the preimage hash out-of-band."}),(0,n.jsx)(t.p,{children:"However, at some point before the proposal passes you will need to submit the preimage or else the\nproposal cannot be enacted. The guide will now show you how to do this."}),(0,n.jsx)(t.p,{children:'Click on the blue "Submit preimage" button and configure it to be the same as what you did before to\nacquire the preimage hash. This time, instead of copying the hash to another tab, you will follow\nthrough and click "Submit preimage" and confirm the transaction.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"submit preimage",src:o(90005).A+"",width:"1182",height:"526"})}),(0,n.jsx)(t.p,{children:"Once the transaction is included you should see the UI update with the information for your already\nsubmitted proposal."}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"proposals",src:o(65589).A+"",width:"1424",height:"276"})}),(0,n.jsx)(t.h2,{id:"endorsing-a-proposal",children:"Endorsing a Proposal"}),(0,n.jsx)(t.p,{children:"Endorsing a proposal means that you are agreeing with the proposal and backing it with an equal\namount of deposit as was originally locked. The bonded tokens will be released once the proposal is\ntabled (that is, brought to a vote), just like the original proposer's bond. By endorsing a proposal\nyou will move it higher up the rank of proposals. The most endorsed proposal \u2014 in value, not\nthe number of supporters \u2014 will be brought to a referendum every launch period."}),(0,n.jsx)(t.p,{children:"It is important to note that there is no way to stop or cancel endorsing a proposal once it has been\ndone. Therefore, the DOT that was endorsed will be reserved until the proposal is tabled as a\nreferendum. This is an indeterminate amount of time, since there is no guarantee that a proposal\nwill become a referendum for a given period, as other proposals may be proposed and tabled before\nit."}),(0,n.jsxs)(t.p,{children:["Note that it is possible for a single account to endorse a proposal multiple times. This is by\ndesign; it is the value, not the number of endorsements ",(0,n.jsx)(t.em,{children:"per se"}),", that counts in terms of weighting.\nIf there were a limit of one endorsement per account, it would be trivial for a user with, for\nexample, 1000 DOT to create ten accounts with 100 DOT instead of a single account with 1000 DOT.\nThus, no restrictions are made on the number of times a single account can endorse a proposal."]}),(0,n.jsx)(t.p,{children:'To endorse a proposal, navigate to the proposal you want to endorse and click on the "Endorse"\nbutton.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"endorsement button",src:o(67919).A+"",width:"1440",height:"128"})}),(0,n.jsx)(t.p,{children:'You will be prompted with the full details of the proposal (if the preimage has been submitted!) and\ncan then broadcast the transaction by clicking the blue "Endorse" button.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"endorsement confirmed",src:o(31452).A+"",width:"1184",height:"356"})}),(0,n.jsx)(t.p,{children:"Once successful, you will see your endorsement appear in the dropdown in the proposal details."}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"endorsement result",src:o(24633).A+"",width:"1440",height:"336"})}),(0,n.jsx)(t.h2,{id:"voting-on-a-proposal",children:"Voting on a Proposal"}),(0,n.jsxs)(t.p,{children:["At the end of each launch period, the most endorsed proposal will move to a referendum. During this\ntime you can cast a vote for or against the proposal. You may also lock up your tokens for a greater\nlength of time to weigh your vote more strongly. During the time your tokens are\n",(0,n.jsx)(t.a,{href:"/docs/learn-account-balances#locks",children:"locked"}),", you are unable to transfer them, however they\ncan still be used for further votes. Locks are layered on top of each other, so an eight-week lock\ndoes not become a 15-week lock if you vote again a week later, rather another eight-week lock is\nplaced to extend the lock just one extra week."]}),(0,n.jsxs)(t.p,{children:["To vote on a referendum, navigate to the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/democracy/",children:'"Democracy" tab of Polkadot Apps'}),'. Any active referendum\nwill show in the "referenda" column. Click the blue button "Vote" to cast a vote for the referendum.']}),(0,n.jsx)(t.p,{children:'If you would like to cast your vote for the proposal select the "Aye, I approve" option. If you\nwould like to cast your vote against the proposal in the referendum you will select "Nay, I do not\napprove" option.'}),(0,n.jsx)(t.p,{children:"The endorsement option is to select your conviction for this vote. The longer you are willing to\nlock your tokens, the stronger your vote will be weighted. The timeline for the conviction starts\nafter the voting period ends; tokens used for voting will always be locked until the end of the\nvoting period, no matter what conviction you vote with. Unwillingness to lock your tokens means that\nyour vote only counts for 10% of the tokens that you hold, while the maximum lock-up of 896 days\nmeans you can make your vote count for 600% of the tokens that you hold. It is possible to vote with\ntokens already locked by staking."}),(0,n.jsx)(t.p,{children:'When you are comfortable with the decision you have made, click the blue "Vote" button to submit\nyour transaction and wait for it to be included in a block.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"voting",src:o(97943).A+"",width:"940",height:"712"})}),(0,n.jsx)(t.h2,{id:"unlocking-locked-tokens",children:"Unlocking Locked Tokens"}),(0,n.jsxs)(t.p,{children:["Like ",(0,n.jsx)(t.a,{href:"/docs/learn-DOT#lazy-vesting",children:"vesting"}),", the tokens that are locked in democracy are\nunlocked lazily. This means that you, the user, must explicitly call an unlock extrinsic to make\nyour funds available again after the lock expires. Unbonding is another term you hear a lot in\nPolkadot, it means withdrawing your DOT that was used in staking. To know more about it, please see\n",(0,n.jsx)(t.a,{href:"/docs/learn-nominator",children:"here"}),"."]}),(0,n.jsxs)(t.p,{children:['You can do this from the "Accounts" page in\n',(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Polkadot-JS Apps"}),', unless you use Ledger (see below).\nFirst, check that your account has a "democracy" lock by opening the details on your balance. In the\nexample below the account has 150 KSM locked in democracy.']}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"democracy balance details",src:o(77651).A+"",width:"342",height:"214"})}),(0,n.jsx)(t.p,{children:'Now you can click the menu button (the three dots) and find the option that says "Clear expired\ndemocracy locks". After selecting this option you may confirm the transaction and your locks will be\ncleared when successful.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"democracy clear locks",src:o(8710).A+"",width:"366",height:"933"})}),(0,n.jsx)(t.h4,{id:"with-a-ledger-hardware-wallet-or-unlocking-very-old-locks",children:"With a Ledger hardware wallet or Unlocking Very Old Locks"}),(0,n.jsx)(t.p,{children:"If you do not see an option to clear expired democracy votes, it may be that the lock is very old.\nOr, if you are using the Ledger hardware wallet, you will not be able to issue the batch Unlock\naction from the UI."}),(0,n.jsx)(t.p,{children:"Instead, you must clear the lock by directly issuing the correct extrinsics."}),(0,n.jsxs)(t.p,{children:["Navigate to the ",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsics page"})," and submit the\nfollowing extrinsic: ",(0,n.jsx)(t.code,{children:"democracy.removeVote(index)"}),' using the account that you voted with. For the\nindex number (ReferendumIndex), enter the number of the referendum for which you voted ("12" in the\nimage below).']}),(0,n.jsx)(t.p,{children:"The number of the referendum for which you voted is visible in an explorer such as Subscan."}),(0,n.jsx)(t.p,{children:'You need to press the "Submit Transaction" button to submit the extrinsic.'}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"democracy clear_lock_extrinsic_1",src:o(62127).A+"",width:"871",height:"234"})}),(0,n.jsx)(t.p,{children:"Now submit the following extrinsic: `democracy.unlock(target), where the target is your account\naddress."}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"democracy clear_lock_extrinsic_2",src:o(43220).A+"",width:"869",height:"237"})}),(0,n.jsxs)(t.p,{children:["If you return to the ",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:"Accounts page"}),", you should see that\nthe democracy lock has been released."]}),(0,n.jsxs)(t.p,{children:["Note that this applies only to locked DOT that were used for voting on referenda. In order to unlock\nDOT locked by voting for members of the Polkadot Council, you need to go to the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/council",children:"Council"}),' page, click "Vote", and then click on "Unvote\nAll".']}),(0,n.jsx)(t.h2,{id:"delegate-a-vote",children:"Delegate a Vote"}),(0,n.jsx)(t.p,{children:"If you are too busy to keep up and vote on upcoming referenda, there is an option to delegate your\nvote to another account whose opinion you trust. When you delegate to another account, that account\ngets the added voting power of your tokens along with the conviction that you set. The conviction\nfor delegation works just like the conviction for regular voting, except your tokens may be locked\nlonger than they would normally since locking resets when you undelegate your vote."}),(0,n.jsx)(t.p,{children:"The account that is being delegated to does not make any special action once the delegation is in\nplace. They can continue to vote on referenda how they see fit. The difference is now when the\nDemocracy system tallies votes, the delegated tokens now are added to whatever vote the delegatee\nhas made."}),(0,n.jsxs)(t.p,{children:['You can delegate your vote to another account and even attach a "Conviction" to the delegation.\nNavigate to the ',(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:'"Accounts" tab on Polkadot-JS UI'}),' and\nclick on the three vertical dots and select "Delegate democracy votes" option for the account of\nyour choice. Then you would be presented with a pop-up window which lets you enter the account\ndetails of the delegated account, delegated amount and conviction. You can enter the relevant\ndetails and click on the delegate button and then sign and submit the transaction.']}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"delegate",src:o(34930).A+"",width:"1880",height:"724"})}),(0,n.jsx)(t.p,{children:"Your delegation will count toward whatever account you delegated for votes on until you explicitly\nundelegate your vote."}),(0,n.jsxs)(t.admonition,{title:"Query the chain state for an account's delegation preferences",type:"tip",children:[(0,n.jsxs)(t.p,{children:["It is possible to query the delegation preferences of any actively delegating account on the network\nthrough ",(0,n.jsx)(t.code,{children:"democracy.votingOf"})," extrinsic."]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"query delegation",src:o(33685).A+"",width:"2002",height:"992"})})]})]}),"\n",(0,n.jsx)(t.h2,{id:"undelegate-a-vote",children:"Undelegate a Vote"}),"\n",(0,n.jsxs)(t.admonition,{type:"caution",children:[(0,n.jsx)(t.p,{children:"If there is an existing lock due to a previous delegation change or undelegation, any new change or\nundelegation will restart the lock period for the larger DOT amount and the longest conviction\nperiod between the existing and the new lock."}),(0,n.jsx)(t.p,{children:"This will only matter to accounts with conviction, as the accounts with no conviction don't have any\nlock period."}),(0,n.jsx)(t.p,{children:"Examples:"}),(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["\n",(0,n.jsx)(t.p,{children:"Delegate 500 DOT with 1x conviction, then change delegation to 1000 DOT with 1x conviction, the\nlock period will reset for 1000 DOT with 1x conviction."}),"\n"]}),"\n",(0,n.jsxs)(t.li,{children:["\n",(0,n.jsx)(t.p,{children:"Delegate 500 DOT with 3x conviction, then change the delegation to 1000 DOT with 1x conviction,\nthe lock period will reset for 1000 DOT with 3x conviction."}),"\n"]}),"\n",(0,n.jsxs)(t.li,{children:["\n",(0,n.jsx)(t.p,{children:"Delegate 500 DOT with 1x conviction, then change the delegation to 200 DOT with 1x conviction,\nthe lock period will reset for 500 DOT with 1x conviction."}),"\n"]}),"\n"]}),(0,n.jsxs)(t.p,{children:["To understand this in further detail checkout\n",(0,n.jsx)(t.a,{href:"https://substrate.stackexchange.com/questions/5067/delegating-and-undelegating-during-the-lock-period-extends-it-for-the-initial-am",children:"this stackexchange post."})]})]}),"\n",(0,n.jsxs)(t.p,{children:['You may decide at some point in the future to remove your delegation to a target account. In this\ncase, your tokens will be locked for the maximum amount of time in accordance with the conviction\nyou set at the beginning of the delegation. For example, if you chose "2x" delegation for four weeks\nof lock-up time, your tokens will be locked for 4 weeks after sending the ',(0,n.jsx)(t.code,{children:"undelegate"})," transaction.\nOnce your vote has been undelegated, you are in control of making votes with it once again. You can\nstart to vote directly, or choose a different account to act as your delegate."]}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"undelegate"})," transaction must be sent from the account that you wish to clear of its delegation.\nFor example, if Alice has delegated her tokens to Bob, Alice would need to be the one to call the\n",(0,n.jsx)(t.code,{children:"undelegate"})," transaction to clear her delegation."]}),"\n",(0,n.jsxs)(t.p,{children:["The easiest way to do this is from the\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/accounts",children:'"Accounts" tab on Polkadot-JS UI'})," where you can manage the\ndelegation of your account."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"manage delegation",src:o(95136).A+"",width:"1990",height:"224"})}),"\n",(0,n.jsx)(t.p,{children:"When you click on \"manage delegation\", you would be presented with a pre-populated pop-up window\nwith that account's delegation preferences. Here, you have an option to undelegate or save the\nmodifications made to the account's delegation preferences."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"undelegate",src:o(89910).A+"",width:"1884",height:"732"})}),"\n",(0,n.jsx)(t.h2,{id:"voting-with-a-governance-proxy",children:"Voting with a Governance Proxy"}),"\n",(0,n.jsx)(t.p,{children:'Making a vote on behalf of a stash requires a "proxy" transaction from the Proxy pallet. When you\nchoose this transaction from the "Extrinsics" tab, it will let you select "vote" from the Democracy\npallet, and you will specify the index of the referendum that is being voted, the judgement (i.e.\n"Aye" for approval or "Nay" for rejection), and the conviction, just like a normal vote.'}),"\n",(0,n.jsxs)(t.p,{children:["For more material on adding and removing Governance proxies, as well as other types, please see the\n",(0,n.jsx)(t.a,{href:"/docs/learn-proxies",children:"Proxy page"}),"."]})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},67141:(e,t,o)=>{o.d(t,{A:()=>i});var n=o(96540),a=o(74848);const i=function(e){var t,o=e.message,i=(0,n.useState)(!0),s=i[0],r=i[1];return(0,a.jsx)(a.Fragment,{children:s&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=o,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},34930:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/delegate-vote-a8b4d534e0e004f8d0d4a32a45f3a77a.png"},31452:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/endorse-7e22987ceebef0c1ce17f475510eacc9.png"},67919:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/endorse1-6f9ed6c3eb99cad52bd07e250307b397.png"},24633:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/endorsed-list-460b771aedaf6e91f9caaaf728d76dfd.png"},95136:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/manage-delegation-19501197d96e688a08f257a1443f18cd.png"},98955:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/proposal-hash-1ae67063393c7e77001e538b9d4a67af.png"},65589:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/proposals-9b3cc3a8bd2ff1c01c0dbc7c90950d3f.png"},33685:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/query-delegation-fece7720f6282de8928688d61ee38477.png"},90005:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/submit_preimage-b0165c4aa5615a416bc1698ff21cba2e.png"},33677:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/submit_proposal-24cc24bb4fdb502da80a28082f779da8.png"},89910:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/undelegate-save-002a17067954a098e2942aa1a7583698.png"},97943:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/voting-4abb1178436833648da30b63d860aa10.png"},77651:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_balance_details-56b5c71fe66fc4a0d66ba4820a3cc6a9.png"},62127:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_clear_lock_extrinsic_1-c42556da5e59023abb388eac1a12aee2.png"},43220:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_clear_lock_extrinsic_2-f6a313a6755d15eb6ab26d33edb80a72.png"},8710:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/democracy_clear_locks-028d6202e19ad4410e07a5da8bb69277.png"},28453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>r});var n=o(96540);const a={},i=n.createContext(a);function s(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ed3409b3.aa23e07b.js b/assets/js/ed3409b3.aa23e07b.js new file mode 100644 index 000000000000..056ed10fe003 --- /dev/null +++ b/assets/js/ed3409b3.aa23e07b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4117],{1448:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>u});var o=n(74848),s=n(28453),a=n(67141);const i={id:"learn-guides-bounties",title:"Polkadot-JS Guides about Bounties",sidebar_label:"Bounty Guides",description:"Polkadot-JS Guides for Bounties",keyword:["treasury","bounties","guides","child bounty","polkadot-js"],slug:"../learn-guides-bounties"},r=void 0,d={id:"learn/learn-guides-bounties",title:"Polkadot-JS Guides about Bounties",description:"Polkadot-JS Guides for Bounties",source:"@site/../docs/learn/learn-guides-bounties.md",sourceDirName:"learn",slug:"/learn-guides-bounties",permalink:"/docs/learn-guides-bounties",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-bounties.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-bounties",title:"Polkadot-JS Guides about Bounties",sidebar_label:"Bounty Guides",description:"Polkadot-JS Guides for Bounties",keyword:["treasury","bounties","guides","child bounty","polkadot-js"],slug:"../learn-guides-bounties"},sidebar:"docs",previous:{title:"Treasury Guides",permalink:"/docs/learn-guides-treasury"},next:{title:"Identity Guides",permalink:"/docs/learn-guides-identity"}},l={},u=[{value:"Submit a Bounty Proposal",id:"submit-a-bounty-proposal",level:2},{value:"Assign a Curator to a Bounty",id:"assign-a-curator-to-a-bounty",level:2},{value:"Create and Award Child Bounties",id:"create-and-award-child-bounties",level:2},{value:"Claim a Child Bounty Reward",id:"claim-a-child-bounty-reward",level:2},{value:"Close Child Bounties",id:"close-child-bounties",level:2},{value:"Refill Parent Bounties",id:"refill-parent-bounties",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",p:"p",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury#bounties",children:"this page"})," to learn about Bounties."]}),"\n",(0,o.jsx)(t.admonition,{title:"Notify the Polkadot Direction Channel",type:"info",children:(0,o.jsxs)(t.p,{children:["Remember always to notify the\n",(0,o.jsx)(t.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction Element Channel"})," about\n",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov#referenda",children:"OpenGov referenda"})," so that the community can start reviewing\nthem and voting on them."]})}),"\n",(0,o.jsx)(t.h2,{id:"submit-a-bounty-proposal",children:"Submit a Bounty Proposal"}),"\n",(0,o.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,o.jsxs)(t.p,{children:["See\n",(0,o.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_Submit_a_Bounty_Proposal_on_Polkadotjs_Apps__Ps_zfmNXRbm6PuZaj28JBQ",children:"this written tutorial"}),"\nto learn more about how to submit a bounty proposal."]})}),"\n",(0,o.jsx)(t.p,{children:"See the video tutorial below to learn how you can create a bounty and submit it for approval through\nan OpenGov referendum."}),"\n",(0,o.jsxs)("div",{className:"row",children:[(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=52",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=52",children:"Introduction to Bounties"})})]}),(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=8Cft1-8RWmk",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/8Cft1-8RWmk/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=8Cft1-8RWmk",children:"Submit a Bounty"})})]})]}),"\n",(0,o.jsxs)(t.p,{children:['When you add a bounty, this will show as "proposed" in the main\n',(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),'. Once the community approves your bounty\nproposal as an OpenGov referendum, the bounty will show as "funded" at the end of the\n',(0,o.jsx)(t.a,{href:"/docs/glossary#spend-period",children:"spending period"})," on the main\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),". You can then proceed with assigning\ncurators to the bounty."]}),"\n",(0,o.jsxs)(t.p,{children:["To minimize storage on chain in the same way as any proposal, bounties don't contain contextual\ninformation. When a user submits a bounty spending proposal, they will need to find an off-chain\nmedium to explain the proposal, for example a bounty proposal document on\n",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/opengov",children:"Polkassembly"})," or\n",(0,o.jsx)(t.a,{href:"https://polkadot.subsquare.io/",children:"Subsquare"}),".\n",(0,o.jsx)(t.a,{href:"https://docs.google.com/document/d/1-IBz_owspV5OcvezWXpksWDQReWowschD0TFuaVKKcU/edit?usp=sharing",children:"This template"}),"\ncan be used to submit all the information needed by OpenGov voters to make an informed decision."]}),"\n",(0,o.jsxs)(t.p,{children:["Submitting a bounty proposal will require a\n",(0,o.jsx)(t.a,{href:"/docs/chain-state-values#bounty-deposit",children:"deposit"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"assign-a-curator-to-a-bounty",children:"Assign a Curator to a Bounty"}),"\n",(0,o.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,o.jsxs)(t.p,{children:["See\n",(0,o.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_Assign_a_Curator_to_a_Bounty_on_Polkadotjs_Apps__JgK3eSfXQdm_PSvtz8TelQ",children:"this written tutorial"}),"\nto learn more about how to assign a curator to a bounty."]})}),"\n",(0,o.jsxs)(t.p,{children:['Once your bounty is shown as "funded" on the main\n',(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),", you can propose a bounty curator. The\nreferendum must be submitted on the same track used for proposing the bounty or a track with a\nhigher spending limit\n(",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/22e90b1c11509f1f13083f1ac6c5f028f54432e7/substrate/frame/bounties/src/lib.rs#L412",children:"see the code snippet"}),").\nFor example, if the bounty was submitted to the Medium Spender Track, the curator must be proposed\nusing the same track or the Big Spender or Treasurer tracks. See the video tutorial below to learn\nhow you can add a curator to a bounty and submit it for approval through an OpenGov referendum."]}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=TM7vk3oP9IA",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/TM7vk3oP9IA/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=TM7vk3oP9IA",children:"Assign Curator to a Bounty"})})]})}),"\n",(0,o.jsxs)(t.p,{children:["Once your OpenGov referendum has been approved by the community and served the required\n",(0,o.jsx)(t.a,{href:"/docs/glossary#spend-period",children:"spending period"}),', the bounty will still show as "funded" on\nthe main ',(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"})," and await the curator's\nacceptance. The curator must formally accept the curator role by signing a ",(0,o.jsx)(t.code,{children:"bounties.acceptCurator"}),"\nextrinsic. More information about when to do this can be found on the main\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),'. Only after the curators claim their\ncandidacy the bounty will show as "active" on the main Bounty page.']}),"\n",(0,o.jsxs)(t.admonition,{title:"Curator assignment call must be executed after bounty is funded",type:"info",children:[(0,o.jsx)(t.p,{children:"Curator assignment must take place after the bounty has been funded, and approved bounties are\nfunded after a spend period has been completed. A curator assignment referendum cannot be executed\nduring the same spend period when the bounty is funded."}),(0,o.jsxs)(t.p,{children:["If your bounty has been awarded but is not funded yet, you need to make sure that the curator\nassignment referendum gets enacted in the subsequent spending period (you can set a delay in\n",(0,o.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov#submitting-a-proposal",children:"Polkadot-JS"})," when you submit the proposal\nduring the current spend period)."]})]}),"\n",(0,o.jsx)(t.h2,{id:"create-and-award-child-bounties",children:"Create and Award Child Bounties"}),"\n",(0,o.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,o.jsxs)(t.p,{children:["See\n",(0,o.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_Create_and_Award_a_Child_Bounty__Q-YFGkYAR3WxMnvYGHiU3Q",children:"this written tutorial"}),"\nto learn more about how to create and award child bounties."]})}),"\n",(0,o.jsx)(t.admonition,{title:"Remember to add contextual information about child bounties",type:"info",children:(0,o.jsxs)(t.p,{children:["When you add child bounties, please add contextual information on the governance forums\n",(0,o.jsx)(t.a,{href:"https://polkassembly.io/",children:"Polkassembly"})," or ",(0,o.jsx)(t.a,{href:"https://polkadot.subsquare.io/",children:"Subsquare"}),"."]})}),"\n",(0,o.jsx)(t.p,{children:"See the video tutorial below to learn how to create a child bounty, assign a curator, and award a\nchild bounty."}),"\n",(0,o.jsx)(t.p,{children:"The video will show how to create and award a child bounty using a batch call. We will also include\nproposing and approving curator candidacy for the child bounty. The calls can be executed\nseparately, depending on the process curators consider appropriate for their bounty."}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=mLpvx0OQoyM",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/mLpvx0OQoyM/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=mLpvx0OQoyM",children:"Create and Award Child Bounties"})})]})}),"\n",(0,o.jsx)(t.p,{children:"Once a child bounty is awarded, awardees can claim the child bounty."}),"\n",(0,o.jsx)(t.h2,{id:"claim-a-child-bounty-reward",children:"Claim a Child Bounty Reward"}),"\n",(0,o.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,o.jsxs)(t.p,{children:["See\n",(0,o.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_claim_a_Child_Bounty_reward_on_Polkadotjs__t3V7NDUjQlus40EUjc-5Kw",children:"this written tutorial"}),"\nto learn more about how to claim a child bounty reward."]})}),"\n",(0,o.jsxs)(t.p,{children:["The status of child bounties can be viewed on the\n",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/bounties",children:"Polkassembly Bounty page"}),' under the specific parent\nbounty. A child bounty status can be "Added", "Awarded", or "Claimed". For example, the parent\nbounty 17 refers to the Community Events Bounty, which has 183 child bounties.']}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"polkassembly-child-bounties",src:n(98445).A+"",width:"2408",height:"1053"})}),"\n",(0,o.jsx)(t.p,{children:"After the child bounty has been rewarded, follow the guidelines in the video tutorial below to learn\nhow to claim a child bounty reward. Note that the extrinsic to claim the child bounty reward is\npermissionless, and anyone can initiate the claim on behalf of the beneficiary."}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=db82aHgy23c",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/db82aHgy23c/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=db82aHgy23c",children:"Claim Child Bounty Reward"})})]})}),"\n",(0,o.jsx)(t.h2,{id:"close-child-bounties",children:"Close Child Bounties"}),"\n",(0,o.jsxs)(t.p,{children:["Child bounties can be closed without awarding them. To close a child bounty, you must submit a\n",(0,o.jsx)(t.code,{children:"childBounties.closeChild.Bounty"})," extrinsic, specifying the parent bounty and child bounty IDs. Only\nthe parent bounty curator can sign this transaction, resulting in the child bounty\u2019s curator deposit\nbeing returned."]}),"\n",(0,o.jsx)(t.p,{children:"See the video tutorial below to learn how to close a child bounty."}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=2109s",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=2109s",children:"Close a Child Bounty"})})]})}),"\n",(0,o.jsxs)(t.p,{children:["If the child bounty curator acts maliciously, the parent bounty curator can submit a\n",(0,o.jsx)(t.code,{children:"childBounties.unassignCurator"})," that slashes the curator's deposit."]}),"\n",(0,o.jsx)(t.h2,{id:"refill-parent-bounties",children:"Refill Parent Bounties"}),"\n",(0,o.jsxs)(t.p,{children:["To refill a parent bounty,\n",(0,o.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov#submitting-a-preimage",children:"an OpenGov referendum must be submitted"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["The preimage must contain a ",(0,o.jsx)(t.code,{children:"treasury.spendLocal"})," extrinsic specifying the amount of tokens to be\nsent from the treasury to the receiver's address, in this case the\n",(0,o.jsx)(t.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"})," of the\n",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury#bounties",children:"parent bounty"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["To get the bounty system account of a parent bounty, go to\n",(0,o.jsx)(t.a,{href:"https://polkadot.subsquare.io/treasury/bounties",children:"Subsquare"}),", search for the bounty name, and the\naddress will be shown under Metadata."]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(96540),s=n(74848);const a=function(e){var t,n=e.message,a=(0,o.useState)(!0),i=a[0],r=a[1];return(0,s.jsx)(s.Fragment,{children:i&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},98445:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/polkassembly-child-bounties-fde994e770f3e109a07752068aa417b1.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const s={},a=o.createContext(s);function i(e){const t=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ed3409b3.c0861717.js b/assets/js/ed3409b3.c0861717.js deleted file mode 100644 index d96baee9536d..000000000000 --- a/assets/js/ed3409b3.c0861717.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4117],{1448:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>u});var o=n(74848),s=n(28453),a=n(67141);const i={id:"learn-guides-bounties",title:"Polkadot-JS Guides about Bounties",sidebar_label:"Bounty Guides",description:"Polkadot-JS Guides for Bounties",keyword:["treasury","bounties","guides","child bounty","polkadot-js"],slug:"../learn-guides-bounties"},r=void 0,d={id:"learn/learn-guides-bounties",title:"Polkadot-JS Guides about Bounties",description:"Polkadot-JS Guides for Bounties",source:"@site/../docs/learn/learn-guides-bounties.md",sourceDirName:"learn",slug:"/learn-guides-bounties",permalink:"/docs/learn-guides-bounties",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-bounties.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727078287e3,frontMatter:{id:"learn-guides-bounties",title:"Polkadot-JS Guides about Bounties",sidebar_label:"Bounty Guides",description:"Polkadot-JS Guides for Bounties",keyword:["treasury","bounties","guides","child bounty","polkadot-js"],slug:"../learn-guides-bounties"},sidebar:"docs",previous:{title:"Treasury Guides",permalink:"/docs/learn-guides-treasury"},next:{title:"Identity Guides",permalink:"/docs/learn-guides-identity"}},l={},u=[{value:"Submit a Bounty Proposal",id:"submit-a-bounty-proposal",level:2},{value:"Assign a Curator to a Bounty",id:"assign-a-curator-to-a-bounty",level:2},{value:"Create and Award Child Bounties",id:"create-and-award-child-bounties",level:2},{value:"Claim a Child Bounty Reward",id:"claim-a-child-bounty-reward",level:2},{value:"Close Child Bounties",id:"close-child-bounties",level:2},{value:"Refill Parent Bounties",id:"refill-parent-bounties",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",p:"p",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury#bounties",children:"this page"})," to learn about Bounties."]}),"\n",(0,o.jsx)(t.admonition,{title:"Notify the Polkadot Direction Channel",type:"info",children:(0,o.jsxs)(t.p,{children:["Remember always to notify the\n",(0,o.jsx)(t.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"Polkadot Direction Element Channel"})," about\n",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov#referenda",children:"OpenGov referenda"})," so that the community can start reviewing\nthem and voting on them."]})}),"\n",(0,o.jsx)(t.h2,{id:"submit-a-bounty-proposal",children:"Submit a Bounty Proposal"}),"\n",(0,o.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,o.jsxs)(t.p,{children:["See\n",(0,o.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_Submit_a_Bounty_Proposal_on_Polkadotjs_Apps__Ps_zfmNXRbm6PuZaj28JBQ",children:"this written tutorial"}),"\nto learn more about how to submit a bounty proposal."]})}),"\n",(0,o.jsx)(t.p,{children:"See the video tutorial below to learn how you can create a bounty and submit it for approval through\nan OpenGov referendum."}),"\n",(0,o.jsxs)("div",{className:"row",children:[(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=52",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://youtu.be/Qv_nJVcvQr8?t=52",children:"Introduction to Bounties"})})]}),(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=8Cft1-8RWmk",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/8Cft1-8RWmk/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=8Cft1-8RWmk",children:"Submit a Bounty"})})]})]}),"\n",(0,o.jsxs)(t.p,{children:['When you add a bounty, this will show as "proposed" in the main\n',(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),'. Once the community approves your bounty\nproposal as an OpenGov referendum, the bounty will show as "funded" at the end of the\n',(0,o.jsx)(t.a,{href:"/docs/glossary#spend-period",children:"spending period"})," on the main\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),". You can then proceed with assigning\ncurators to the bounty."]}),"\n",(0,o.jsxs)(t.p,{children:["To minimize storage on chain in the same way as any proposal, bounties don't contain contextual\ninformation. When a user submits a bounty spending proposal, they will need to find an off-chain\nmedium to explain the proposal, for example a bounty proposal document on\n",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/opengov",children:"Polkassembly"})," or\n",(0,o.jsx)(t.a,{href:"https://polkadot.subsquare.io/",children:"Subsquare"}),".\n",(0,o.jsx)(t.a,{href:"https://docs.google.com/document/d/1-IBz_owspV5OcvezWXpksWDQReWowschD0TFuaVKKcU/edit?usp=sharing",children:"This template"}),"\ncan be used to submit all the information needed by OpenGov voters to make an informed decision."]}),"\n",(0,o.jsxs)(t.p,{children:["Submitting a bounty proposal will require a\n",(0,o.jsx)(t.a,{href:"/docs/chain-state-values#bounty-deposit",children:"deposit"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"assign-a-curator-to-a-bounty",children:"Assign a Curator to a Bounty"}),"\n",(0,o.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,o.jsxs)(t.p,{children:["See\n",(0,o.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_Assign_a_Curator_to_a_Bounty_on_Polkadotjs_Apps__JgK3eSfXQdm_PSvtz8TelQ",children:"this written tutorial"}),"\nto learn more about how to assign a curator to a bounty."]})}),"\n",(0,o.jsxs)(t.p,{children:['Once your bounty is shown as "funded" on the main\n',(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),", you can propose a bounty curator. The\nreferendum must be submitted on the same track used for proposing the bounty or a track with a\nhigher spending limit\n(",(0,o.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/22e90b1c11509f1f13083f1ac6c5f028f54432e7/substrate/frame/bounties/src/lib.rs#L412",children:"see the code snippet"}),").\nFor example, if the bounty was submitted to the Medium Spender Track, the curator must be proposed\nusing the same track or the Big Spender or Treasurer tracks. See the video tutorial below to learn\nhow you can add a curator to a bounty and submit it for approval through an OpenGov referendum."]}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=TM7vk3oP9IA",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/TM7vk3oP9IA/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=TM7vk3oP9IA",children:"Assign Curator to a Bounty"})})]})}),"\n",(0,o.jsxs)(t.p,{children:["Once your OpenGov referendum has been approved by the community and served the required\n",(0,o.jsx)(t.a,{href:"/docs/glossary#spend-period",children:"spending period"}),', the bounty will still show as "funded" on\nthe main ',(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"})," and await the curator's\nacceptance. The curator must formally accept the curator role by signing a ",(0,o.jsx)(t.code,{children:"bounties.acceptCurator"}),"\nextrinsic. More information about when to do this can be found on the main\n",(0,o.jsx)(t.a,{href:"https://polkadot.js.org/apps/#/bounties",children:"Bounties page"}),'. Only after the curators claim their\ncandidacy the bounty will show as "active" on the main Bounty page.']}),"\n",(0,o.jsxs)(t.admonition,{title:"Curator assignment call must be executed after bounty is funded",type:"info",children:[(0,o.jsx)(t.p,{children:"Curator assignment must take place after the bounty has been funded, and approved bounties are\nfunded after a spend period has been completed. A curator assignment referendum cannot be executed\nduring the same spend period when the bounty is funded."}),(0,o.jsxs)(t.p,{children:["If your bounty has been awarded but is not funded yet, you need to make sure that the curator\nassignment referendum gets enacted in the subsequent spending period (you can set a delay in\n",(0,o.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov#submitting-a-proposal",children:"Polkadot-JS"})," when you submit the proposal\nduring the current spend period)."]})]}),"\n",(0,o.jsx)(t.h2,{id:"create-and-award-child-bounties",children:"Create and Award Child Bounties"}),"\n",(0,o.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,o.jsxs)(t.p,{children:["See\n",(0,o.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_Create_and_Award_a_Child_Bounty__Q-YFGkYAR3WxMnvYGHiU3Q",children:"this written tutorial"}),"\nto learn more about how to create and award child bounties."]})}),"\n",(0,o.jsx)(t.admonition,{title:"Remember to add contextual information about child bounties",type:"info",children:(0,o.jsxs)(t.p,{children:["When you add child bounties, please add contextual information on the governance forums\n",(0,o.jsx)(t.a,{href:"https://polkassembly.io/",children:"Polkassembly"})," or ",(0,o.jsx)(t.a,{href:"https://polkadot.subsquare.io/",children:"Subsquare"}),"."]})}),"\n",(0,o.jsx)(t.p,{children:"See the video tutorial below to learn how to create a child bounty, assign a curator, and award a\nchild bounty."}),"\n",(0,o.jsx)(t.p,{children:"The video will show how to create and award a child bounty using a batch call. We will also include\nproposing and approving curator candidacy for the child bounty. The calls can be executed\nseparately, depending on the process curators consider appropriate for their bounty."}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=mLpvx0OQoyM",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/mLpvx0OQoyM/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=mLpvx0OQoyM",children:"Create and Award Child Bounties"})})]})}),"\n",(0,o.jsx)(t.p,{children:"Once a child bounty is awarded, awardees can claim the child bounty."}),"\n",(0,o.jsx)(t.h2,{id:"claim-a-child-bounty-reward",children:"Claim a Child Bounty Reward"}),"\n",(0,o.jsx)(t.admonition,{title:"Step-by-step written tutorial",type:"info",children:(0,o.jsxs)(t.p,{children:["See\n",(0,o.jsx)(t.a,{href:"https://scribehow.com/shared/How_to_claim_a_Child_Bounty_reward_on_Polkadotjs__t3V7NDUjQlus40EUjc-5Kw",children:"this written tutorial"}),"\nto learn more about how to claim a child bounty reward."]})}),"\n",(0,o.jsxs)(t.p,{children:["The status of child bounties can be viewed on the\n",(0,o.jsx)(t.a,{href:"https://polkadot.polkassembly.io/bounties",children:"Polkassembly Bounty page"}),' under the specific parent\nbounty. A child bounty status can be "Added", "Awarded", or "Claimed". For example, the parent\nbounty 17 refers to the Community Events Bounty, which has 183 child bounties.']}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"polkassembly-child-bounties",src:n(98445).A+"",width:"2408",height:"1053"})}),"\n",(0,o.jsx)(t.p,{children:"After the child bounty has been rewarded, follow the guidelines in the video tutorial below to learn\nhow to claim a child bounty reward. Note that the extrinsic to claim the child bounty reward is\npermissionless, and anyone can initiate the claim on behalf of the beneficiary."}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=db82aHgy23c",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/db82aHgy23c/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=db82aHgy23c",children:"Claim Child Bounty Reward"})})]})}),"\n",(0,o.jsx)(t.h2,{id:"close-child-bounties",children:"Close Child Bounties"}),"\n",(0,o.jsxs)(t.p,{children:["Child bounties can be closed without awarding them. To close a child bounty, you must submit a\n",(0,o.jsx)(t.code,{children:"childBounties.closeChild.Bounty"})," extrinsic, specifying the parent bounty and child bounty IDs. Only\nthe parent bounty curator can sign this transaction, resulting in the child bounty\u2019s curator deposit\nbeing returned."]}),"\n",(0,o.jsx)(t.p,{children:"See the video tutorial below to learn how to close a child bounty."}),"\n",(0,o.jsx)("div",{className:"row",children:(0,o.jsxs)("div",{className:"col text--center",children:[(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=2109s",children:(0,o.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,o.jsx)("p",{children:(0,o.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=2109s",children:"Close a Child Bounty"})})]})}),"\n",(0,o.jsxs)(t.p,{children:["If the child bounty curator acts maliciously, the parent bounty curator can submit a\n",(0,o.jsx)(t.code,{children:"childBounties.unassignCurator"})," that slashes the curator's deposit."]}),"\n",(0,o.jsx)(t.h2,{id:"refill-parent-bounties",children:"Refill Parent Bounties"}),"\n",(0,o.jsxs)(t.p,{children:["To refill a parent bounty,\n",(0,o.jsx)(t.a,{href:"/docs/learn-guides-polkadot-opengov#submitting-a-preimage",children:"an OpenGov referendum must be submitted"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["The preimage must contain a ",(0,o.jsx)(t.code,{children:"treasury.spendLocal"})," extrinsic specifying the amount of tokens to be\nsent from the treasury to the receiver's address, in this case the\n",(0,o.jsx)(t.a,{href:"/docs/learn-account-advanced#system-accounts",children:"system account"})," of the\n",(0,o.jsx)(t.a,{href:"/docs/learn-polkadot-opengov-treasury#bounties",children:"parent bounty"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["To get the bounty system account of a parent bounty, go to\n",(0,o.jsx)(t.a,{href:"https://polkadot.subsquare.io/treasury/bounties",children:"Subsquare"}),", search for the bounty name, and the\naddress will be shown under Metadata."]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},67141:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(96540),s=n(74848);const a=function(e){var t,n=e.message,a=(0,o.useState)(!0),i=a[0],r=a[1];return(0,s.jsx)(s.Fragment,{children:i&&(0,s.jsxs)("div",{className:"message-box",children:[(0,s.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,s.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=n,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},98445:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/polkassembly-child-bounties-fde994e770f3e109a07752068aa417b1.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(96540);const s={},a=o.createContext(s);function i(e){const t=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/eef3f1dd.3dc1a712.js b/assets/js/eef3f1dd.3dc1a712.js deleted file mode 100644 index 3760fed6a692..000000000000 --- a/assets/js/eef3f1dd.3dc1a712.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7827],{3674:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var i=n(74848),a=n(28453),t=n(67141);const r={id:"learn-guides-treasury",title:"Polkadot-JS Guides about the Treasury",sidebar_label:"Treasury Guides",description:"Polkadot-JS Guides about the Polkadot Treasury.",keywords:["opengov","polkadot opengov","referenda","treasury","tipps","polkadot-js"],slug:"../learn-guides-treasury"},o=void 0,l={id:"learn/learn-guides-treasury",title:"Polkadot-JS Guides about the Treasury",description:"Polkadot-JS Guides about the Polkadot Treasury.",source:"@site/../docs/learn/learn-guides-treasury.md",sourceDirName:"learn",slug:"/learn-guides-treasury",permalink:"/docs/learn-guides-treasury",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-treasury.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-guides-treasury",title:"Polkadot-JS Guides about the Treasury",sidebar_label:"Treasury Guides",description:"Polkadot-JS Guides about the Polkadot Treasury.",keywords:["opengov","polkadot opengov","referenda","treasury","tipps","polkadot-js"],slug:"../learn-guides-treasury"},sidebar:"docs",previous:{title:"OpenGov Guides",permalink:"/docs/learn-guides-polkadot-opengov"},next:{title:"Bounty Guides",permalink:"/docs/learn-guides-bounties"}},d={},c=[{value:"Creating a Treasury Proposal",id:"creating-a-treasury-proposal",level:2},{value:"Announcing the Proposal",id:"announcing-the-proposal",level:3},{value:"Creating a Treasury Proposal - Spend Local",id:"creating-a-treasury-proposal---spend-local",level:2},{value:"Submit Treasury Proposal Preimage",id:"submit-treasury-proposal-preimage",level:3},{value:"Submit a Treasury Track Referendum",id:"submit-a-treasury-track-referendum",level:3},{value:"Place a Decision Deposit for the Treasury Track Referendum",id:"place-a-decision-deposit-for-the-treasury-track-referendum",level:3},{value:"Creating a Multistage Payout Proposal with validFrom",id:"creating-a-multistage-payout-proposal-with-validfrom",level:2},{value:"Using batch for Multi-Spend Proposals",id:"using-batch-for-multi-spend-proposals",level:3},{value:"Using validFrom for a Milestone-Based Proposal",id:"using-validfrom-for-a-milestone-based-proposal",level:3},{value:"Creating a USDT Treasury Proposal - Spend (with AssetHub)",id:"creating-a-usdt-treasury-proposal---spend-with-assethub",level:2},{value:"Creating a Preimage",id:"creating-a-preimage",level:3},{value:"Specifying Asset Kind",id:"specifying-asset-kind",level:3},{value:"Specifying the Amount",id:"specifying-the-amount",level:3},{value:"Specifying the Beneficiary",id:"specifying-the-beneficiary",level:3},{value:"Specifying validFrom (optional)",id:"specifying-validfrom-optional",level:3},{value:"Manually Claiming Payouts",id:"manually-claiming-payouts",level:3},{value:"Proposing a "Void" for a Staged Proposal",id:"proposing-a-void-for-a-staged-proposal",level:3},{value:"Submit Treasury Proposal via Polkassembly",id:"submit-treasury-proposal-via-polkassembly",level:2},{value:"Requesting Tips from the Treasury",id:"requesting-tips-from-the-treasury",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,i.jsxs)(s.p,{children:["See ",(0,i.jsx)(s.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"this page"})," to learn about the Polkadot Treasury."]}),"\n",(0,i.jsx)(s.h2,{id:"creating-a-treasury-proposal",children:"Creating a Treasury Proposal"}),"\n",(0,i.jsx)(s.p,{children:"Your proposal should address a problem, outline a goal, give a detailed account of how you will\nreach that goal, and include any ongoing maintenance needs. As much as possible, you should itemize\nthe tasks to be completed so fees can be evaluated and milestones can be followed. You can check the\nguidelines below:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Guidelines for a successful proposal on\n",(0,i.jsx)(s.a,{href:"https://docs.google.com/document/d/1IZykdp2cyQavcRyZd_dgNj5DcgxgZR6kAqGdcNARu1w",children:"Polkadot"})," and\n",(0,i.jsx)(s.a,{href:"https://docs.google.com/document/d/1CzEnurqwqLBOGrJI9CQORiGW9m6QyPOSshhzJdR57Pk",children:"Kusama"})]}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"https://docs.google.com/document/d/1O_84mXYFERCavmnJyxbIPKFkG0bVBySRjCVy-d-VKcc",children:"Treasury proposal template for Polkadot"})}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"announcing-the-proposal",children:"Announcing the Proposal"}),"\n",(0,i.jsxs)(s.p,{children:["To minimize storage on-chain, proposals don't contain contextual information. When a user submits a\nproposal, they will need to find an off-chain way to explain the proposal via\n",(0,i.jsx)(s.a,{href:"/docs/community",children:"community channels"}),"."]}),"\n",(0,i.jsx)(s.p,{children:"Spreading the word about the proposal's explanation to the community is ultimately up to the\nproposer."}),"\n",(0,i.jsx)(s.admonition,{title:"Use Accounts with Verified On-Chain Identity for Treasury Proposals",type:"tip",children:(0,i.jsxs)(s.p,{children:["To ensure legitimacy, it is required that the account linked to the Treasury proposal has an\n",(0,i.jsx)(s.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181981-how-to-set-and-clear-an-identity",children:"identity set"}),"\nand is\n",(0,i.jsx)(s.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181990-how-to-request-and-cancel-identity-judgement",children:"verified by an on-chain registrar"}),"."]})}),"\n",(0,i.jsx)(s.h2,{id:"creating-a-treasury-proposal---spend-local",children:"Creating a Treasury Proposal - Spend Local"}),"\n",(0,i.jsxs)(s.admonition,{title:'"Spend" vs. "Spend Local"',type:"info",children:[(0,i.jsxs)(s.p,{children:["You may notice that the Treasury pallet contains two extrinsics - ",(0,i.jsx)(s.code,{children:"treasury.spend"})," and\n",(0,i.jsx)(s.code,{children:"treasury.spendLocal"}),". ",(0,i.jsx)(s.code,{children:"treasury.spendLocal"})," (formally called ",(0,i.jsx)(s.code,{children:"treasury.spend"}),") refers to a spend of\nDOT that is locally available, i.e., DOT from the relay chain's treasury account. ",(0,i.jsx)(s.code,{children:"spend"})," actually\nallows the caller to specify an asset other than DOT, or even assets in other locations, e.g.\n",(0,i.jsx)(s.a,{href:"/docs/glossary#asset-hub",children:"Asset Hub"}),"."]}),(0,i.jsxs)(s.p,{children:["Unlike ",(0,i.jsx)(s.code,{children:"treasury.spendLocal"}),", ",(0,i.jsx)(s.code,{children:"treasury.spend"})," is ",(0,i.jsx)(s.strong,{children:"not"})," bound by a spend period, and must be\nclaimed manually via the ",(0,i.jsx)(s.code,{children:"treasury.payout"})," extrinsic. ",(0,i.jsx)(s.code,{children:"treasuy.spendLocal"})," behavior remains\nunchanged."]})]}),"\n",(0,i.jsx)(s.h3,{id:"submit-treasury-proposal-preimage",children:"Submit Treasury Proposal Preimage"}),"\n",(0,i.jsxs)(s.p,{children:["The example below shows how to create a ",(0,i.jsx)(s.a,{href:"/docs/glossary#preimage",children:"preimage"})," for a\ntransaction that requests 100 DOT from Treasury."]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Navigate to ",(0,i.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Polkadot-JS UI > Governance > Preimages"}),"\nand then click on Add Preimage."]}),"\n",(0,i.jsx)(s.li,{children:"Select the account which will be used to submit the preimage."}),"\n",(0,i.jsxs)(s.li,{children:["Choose ",(0,i.jsx)(s.code,{children:"treasury"}),' pallet in the "propose" dropdown and the ',(0,i.jsx)(s.code,{children:"spendLocal(amount, beneficiary)"}),"call"]}),"\n",(0,i.jsx)(s.li,{children:"Enter the DOT amount."}),"\n",(0,i.jsx)(s.li,{children:"Enter the AccountID of the beneficiary (which has a verified on-chain identity)."}),"\n",(0,i.jsx)(s.li,{children:"Submit preimage"}),"\n",(0,i.jsx)(s.li,{children:"Sign and submit the transaction by paying the specified transaction fees."}),"\n"]}),"\n",(0,i.jsx)(s.admonition,{title:"Preimage Submission Deposit",type:"info",children:(0,i.jsx)(s.p,{children:"A deposit is required for the preimage to be stored on chain. The preimage deposit is proportional\nto the amount of information stored within the preimage. The deposit amount required for a preimage\nwith a treasury spend transaction is around 41 DOT (1.4 KSM on Kusama). Ensure you have enough\naccount balance to pay for the submission deposit and the transaction fees."})}),"\n",(0,i.jsx)(s.p,{children:"Here is the preimage requesting for 100 DOT."}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Treasury Preimage",src:n(79087).A+"",width:"2148",height:"1191"})}),"\n",(0,i.jsx)(s.admonition,{title:"Balance entered is in Plancks",type:"info",children:(0,i.jsxs)(s.p,{children:["Polkadot JS UI is for developers and the UI takes input of the balance in\n",(0,i.jsx)(s.a,{href:"/docs/learn-DOT#the-planck-unit",children:"plancks"}),". DOT has 10 decimals, which is 10000000000 plancks per DOT."]})}),"\n",(0,i.jsx)(s.p,{children:"After successful submission of the preimage, it is displayed on Polkadot-JS UI > Governance >\nPreimages page. Every preimage is associated with a unique preimage hash (highlighted in a box in\nthe image below). Take a note of this preimage hash, which is required to submit a referendum."}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Treasury Preimage Hash",src:n(39555).A+"",width:"2879",height:"453"})}),"\n",(0,i.jsx)(s.h3,{id:"submit-a-treasury-track-referendum",children:"Submit a Treasury Track Referendum"}),"\n",(0,i.jsx)(s.p,{children:"The example below shows how to submit a Treasury track referendum."}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Navigate to ",(0,i.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Polkadot-JS UI > Governance > Referenda"}),"\nand then click on Submit proposal."]}),"\n",(0,i.jsx)(s.li,{children:"Select the account which will be used to submit the proposal."}),"\n",(0,i.jsx)(s.li,{children:"Choose the appropriate submission track (The example below selected Small Spender track)."}),"\n",(0,i.jsx)(s.li,{children:"Enter the preimage hash of the treasury spend transaction.(If the preimage exists on-chain, the\npreimage length box is automatically populated)"}),"\n",(0,i.jsx)(s.li,{children:"Click on Submit proposal."}),"\n",(0,i.jsx)(s.li,{children:"Sign and submit the transaction."}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Submit Treasury Proposal",src:n(44751).A+"",width:"2141",height:"1238"})}),"\n",(0,i.jsxs)(s.p,{children:["Once your submission is executed, your referendum will appear under your chosen track on the\nPolkadot-JS UI ",(0,i.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"referenda page"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"place-a-decision-deposit-for-the-treasury-track-referendum",children:"Place a Decision Deposit for the Treasury Track Referendum"}),"\n",(0,i.jsxs)(s.p,{children:["For the referendum to move from preparing phase to the deciding phase, a decision deposit needs to\nbe placed. The decision deposit values for each individual\n",(0,i.jsx)(s.a,{href:"./learn-polkadot-opengov-treasury#treasury-tracks",children:"Treasury Tracks"})," are listed in a section above\nin this document."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Submit Treasury Proposal Decision Deposit",src:n(52540).A+"",width:"2133",height:"168"})}),"\n",(0,i.jsxs)(s.p,{children:["The preimage and decision deposits\n",(0,i.jsx)(s.a,{href:"/docs/learn-guides-polkadot-opengov#claiming-the-preimage-and-decision-deposits",children:"can be claimed once the referendum ends"}),"."]}),"\n",(0,i.jsxs)(s.h2,{id:"creating-a-multistage-payout-proposal-with-validfrom",children:["Creating a Multistage Payout Proposal with ",(0,i.jsx)(s.code,{children:"validFrom"})]}),"\n",(0,i.jsx)(s.p,{children:"Staged proposals are similar to a tranche or milestone-based funding model; instead of all spends\nbeing paid simultaneously, each portion is redeemable at a certain block height. This is done by\nspecifying each milestone, set at its respective amount and block height at which it becomes\nredeemable."}),"\n",(0,i.jsx)(s.p,{children:'For example, take the following "staged" proposal, which has three milestones, each at 100 DOT, and\nis redeemable at the following block heights. Usually, block heights correspond to a date in the\nfuture:'}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"100 DOT paid out at block height 1000"}),"\n",(0,i.jsx)(s.li,{children:"200 DOT paid out at block height 2000"}),"\n",(0,i.jsx)(s.li,{children:"500 DOT paid out at block height 4000"}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["Governance can also propose to ",(0,i.jsx)(s.strong,{children:"void"})," a staged proposal before it has completed all of its\npayouts."]}),"\n",(0,i.jsx)(s.admonition,{title:"Calculating dates from block heights",type:"info",children:(0,i.jsx)(s.p,{children:"Although not the most accurate form of measurement, block heights can be used to correspond to\ncertain dates in the future."})}),"\n",(0,i.jsxs)(s.h3,{id:"using-batch-for-multi-spend-proposals",children:["Using ",(0,i.jsx)(s.code,{children:"batch"})," for Multi-Spend Proposals"]}),"\n",(0,i.jsxs)(s.p,{children:["Using the Utility pallet, one can batch multiple ",(0,i.jsx)(s.code,{children:"treasury.spend"})," calls together. Each of these\ncalls can have its own ",(0,i.jsx)(s.code,{children:"validFrom"})," block height, which allows for scenarios such as the above to be\npossible."]}),"\n",(0,i.jsx)(s.admonition,{title:"Multistage payout proposal example",type:"tip",children:(0,i.jsxs)(s.p,{children:["For reference on how to create a multistage payout proposal, please check\n",(0,i.jsx)(s.a,{href:"https://kusama.subsquare.io/referenda/382?tab=call",children:"Referendum 382"})," on Kusama."]})}),"\n",(0,i.jsxs)(s.h3,{id:"using-validfrom-for-a-milestone-based-proposal",children:["Using ",(0,i.jsx)(s.code,{children:"validFrom"})," for a Milestone-Based Proposal"]}),"\n",(0,i.jsxs)(s.p,{children:["Once each spend is defined within the batched call, the ",(0,i.jsx)(s.code,{children:"validFrom"}),' field can be utilized to specify\nthe "date", or block height, at which each spend will be executed.']}),"\n",(0,i.jsx)(s.admonition,{title:"Treasury Spends have to be claimed manually. Spends can expire!",type:"info",children:(0,i.jsxs)(s.p,{children:["Keep in mind that once the ",(0,i.jsx)(s.code,{children:"validFrom"})," block height has been reached, you will have to claim the\nspend within 30 days. Check the claiming process for treasury spends\n",(0,i.jsx)(s.a,{href:"#manually-claiming-payouts",children:"here"})]})}),"\n",(0,i.jsx)(s.h2,{id:"creating-a-usdt-treasury-proposal---spend-with-assethub",children:"Creating a USDT Treasury Proposal - Spend (with AssetHub)"}),"\n",(0,i.jsxs)(s.p,{children:["The following tutorial mostly goes over how to utilize the ",(0,i.jsx)(s.code,{children:"spend"})," extrinsic, which, unlike\n",(0,i.jsx)(s.code,{children:"spendLocal"}),", is able to specify assets besides the native asset in other locations, such as\n",(0,i.jsx)(s.a,{href:"/docs/glossary#asset-hub",children:"Asset Hub"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"creating-a-preimage",children:"Creating a Preimage"}),"\n",(0,i.jsxs)(s.p,{children:["The example below shows how to create a ",(0,i.jsx)(s.a,{href:"../general/glossary#preimage",children:"preimage"})," for a transaction\nthat requests 100 USDT from AssetHub."]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Navigate to ",(0,i.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Polkadot-JS UI > Governance > Referenda"}),"\nand then click on Add Preimage."]}),"\n",(0,i.jsx)(s.li,{children:"Select the account to submit the preimage."}),"\n",(0,i.jsxs)(s.li,{children:["Choose the ",(0,i.jsx)(s.code,{children:"treasury"}),' pallet in the "propose" dropdown and the\n',(0,i.jsx)(s.code,{children:"spend(assetKind, amount, beneficiary, validFrom)"})," call."]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"Now, let's go through each field one-by-one and fill them in accordingly:"}),"\n",(0,i.jsx)(s.h3,{id:"specifying-asset-kind",children:"Specifying Asset Kind"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"assetKind"})," refers to the asset to be used, specified via XCM. In short, we need to be able to find:"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"The relative location of the asset, and"}),"\n",(0,i.jsx)(s.li,{children:"How it is identified within this location."}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"For this example, we are using USDT, which from the perspective of the relay chain would be:"}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"Parachain 1000 (AssetHub) > AssetId (Concrete) > PalletInstance 50 > General Index 1984"})}),"\n",(0,i.jsxs)(s.p,{children:["First, we specify the location - in this case, Asset Hub (parachain 1,000). ",(0,i.jsx)(s.code,{children:"PalletInstance 50"}),"\nrefers to the Assets pallet instance on Asset Hub. The general index is ",(0,i.jsx)(s.code,{children:"1984"}),", which is the ID of\nUSDT in this instance of the Assets pallet."]}),"\n",(0,i.jsxs)(s.admonition,{title:"Bug on Polkadot-JS UI",type:"caution",children:[(0,i.jsxs)(s.p,{children:["As the Polkadot-JS UI is interpreting the general index in DOT, it multiplies the entered values\nwith ",(0,i.jsx)(s.code,{children:"10000000000"})," (As DOT token has 10 decimals) and places it in the ",(0,i.jsx)(s.code,{children:"u128"})," argument. As we would\nlike to have ",(0,i.jsx)(s.code,{children:"1984"})," as the input argument, we can offset this UI induced error by entering\n",(0,i.jsx)(s.code,{children:"0.0000001984"}),"."]}),(0,i.jsxs)(s.p,{children:["The issue on Polkadot-JS repo can be tracked\n",(0,i.jsx)(s.a,{href:"https://github.com/polkadot-js/apps/issues/10430",children:"here"}),"."]})]}),"\n",(0,i.jsxs)(s.p,{children:["Here is how the final ",(0,i.jsx)(s.code,{children:"assetKind"})," field should look:"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Asset Kind",src:n(44855).A+"",width:"1564",height:"1316"})}),"\n",(0,i.jsx)(s.h3,{id:"specifying-the-amount",children:"Specifying the Amount"}),"\n",(0,i.jsxs)(s.p,{children:["The amount should be simply the amount of USDT, where each ",(0,i.jsx)(s.code,{children:"1"})," USDT is ",(0,i.jsx)(s.code,{children:"1000000"}),". Because we are\nasking for 100 USDT, we put ",(0,i.jsx)(s.code,{children:"100000000"})," as the input for the amount."]}),"\n",(0,i.jsxs)(s.admonition,{title:"Bug on Polkadot-JS UI",type:"caution",children:[(0,i.jsxs)(s.p,{children:["As the Polkadot-JS UI is interpreting the asset balance in DOT, it multiplies the entered values\nwith ",(0,i.jsx)(s.code,{children:"10000000000"})," (As DOT token has 10 decimals) and places it in the ",(0,i.jsx)(s.code,{children:"u128"})," argument. As we would\nlike to have ",(0,i.jsx)(s.code,{children:"100000000"})," as the input argument, we can offset this UI induced error by entering\n",(0,i.jsx)(s.code,{children:"0.01"})," for this particular example where we like to input 100 USDT."]}),(0,i.jsxs)(s.p,{children:["The issue on Polkadot-JS repo can be tracked\n",(0,i.jsx)(s.a,{href:"https://github.com/polkadot-js/apps/issues/10430",children:"here"}),"."]})]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Asset Value, Beneficiary and ValidFrom",src:n(22192).A+"",width:"1591",height:"1279"})}),"\n",(0,i.jsx)(s.h3,{id:"specifying-the-beneficiary",children:"Specifying the Beneficiary"}),"\n",(0,i.jsxs)(s.p,{children:["The beneficiary account will be one on Asset Hub. For this reason, the XCM junction must be\nspecified as follows, with one junction (",(0,i.jsx)(s.code,{children:"X1"}),") and the beneficiary account (",(0,i.jsx)(s.code,{children:"AccountId32"}),"), which is\nan account address on the chain."]}),"\n",(0,i.jsxs)(s.h3,{id:"specifying-validfrom-optional",children:["Specifying ",(0,i.jsx)(s.code,{children:"validFrom"})," (optional)"]}),"\n",(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"validFrom"})," field is optional, and refers to the block height of the relay chain upon which the\npayout can be issued. If the ",(0,i.jsx)(s.code,{children:"validFrom"})," parameter is not set, the spend can be paid out immediately\nafter approval. For more information on this field, refer to the\n",(0,i.jsx)(s.a,{href:"#creating-a-staged-proposal-with-validfrom",children:"guide below"}),"."]}),"\n",(0,i.jsx)(s.p,{children:"The final call should look like the following, where we:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Specify our asset as ",(0,i.jsx)(s.strong,{children:"USDT"})," on ",(0,i.jsx)(s.strong,{children:"Asset Hub"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["Specify the ",(0,i.jsx)(s.strong,{children:"amount"})," of ",(0,i.jsx)(s.strong,{children:"USDT"})," (100)."]}),"\n",(0,i.jsx)(s.li,{children:"Specify the beneficiary address."}),"\n",(0,i.jsxs)(s.li,{children:["If applicable, use the ",(0,i.jsx)(s.code,{children:"validFrom"})," field to specify a block number upon which the payout becomes\nvalid."]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"The next steps are to:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Copy the preimage (and its length)"}),"\n",(0,i.jsx)(s.li,{children:"Sign and submit the preimage"}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["Once this is finished, one may submit a proposal\n",(0,i.jsx)(s.a,{href:"#submit-a-treasury-track-referendum",children:"as stated above"}),". Keep in mind one will also need to\n",(0,i.jsx)(s.a,{href:"#place-a-decision-deposit-for-the-treasury-track-referendum",children:"provide the decision deposit as well"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"manually-claiming-payouts",children:"Manually Claiming Payouts"}),"\n",(0,i.jsxs)(s.p,{children:["In order to claim the spend, you must manually call the ",(0,i.jsx)(s.code,{children:"treasury.payout"})," extrinsic via a ",(0,i.jsx)(s.code,{children:"Signed"}),"\norigin. The ",(0,i.jsx)(s.code,{children:"spendID"})," for the pending payout can be queried on-chain through Polkadot-JS UI >\nDeveloper > Chain State > Storage > treasury > spends and unselect the include option and then click\non the plus button to the right."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"payout",src:n(88195).A+"",width:"2768",height:"1370"})}),"\n",(0,i.jsxs)(s.p,{children:["From the list of spends, find the ",(0,i.jsx)(s.code,{children:"spendID"})," of your respetive payout and issue the payout extrinsic."]}),"\n",(0,i.jsx)(s.admonition,{title:"payout example",type:"tip",children:(0,i.jsxs)(s.p,{children:["To claim the first payout of ",(0,i.jsx)(s.a,{href:"https://kusama.subsquare.io/referenda/382?tab=call",children:"Referendum 382"})," on\nKusama, ",(0,i.jsx)(s.a,{href:"https://kusama.subscan.io/extrinsic/23061444-2",children:"this payout extrinsic"})," was issued. After\nissuing the payout extrinsic, the status of the payout changes from ",(0,i.jsx)(s.code,{children:"pending"})," to ",(0,i.jsx)(s.code,{children:"Attempted"})," with a\nreference to a payment ID. If the payout is successful, the balance on Asset Hub should be updated.\n",(0,i.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/6923602-0",children:"Here"})," is the transfer extrinsic on Asset\nHub for the first payout of ",(0,i.jsx)(s.a,{href:"https://kusama.subscan.io/referenda_v2/382",children:"Referendum 382"}),"."]})}),"\n",(0,i.jsxs)(s.p,{children:["To clear the on-chain storage of a successful or expired spend, Treasury pallet's ",(0,i.jsx)(s.code,{children:"checkStatus"}),"\nextrinsic can be used. The transaction fees paid for issuing this extrinsic will be refunded."]}),"\n",(0,i.jsx)(s.h3,{id:"proposing-a-void-for-a-staged-proposal",children:'Proposing a "Void" for a Staged Proposal'}),"\n",(0,i.jsxs)(s.p,{children:["If a proposal that hasn't completed all of its spends needs to be voided, the ",(0,i.jsx)(s.code,{children:"treasury.voidSpend"}),"\nextrinsic can be utilized via a governance proposal."]}),"\n",(0,i.jsx)(s.admonition,{title:"Example proposal - Voiding a Treasury Spend",type:"tip",children:(0,i.jsxs)(s.p,{children:["For reference, check the referenda on Kusama that\n",(0,i.jsx)(s.a,{href:"https://kusama.subsquare.io/referenda/391",children:"tests VoidSpend functionality for Treasury Payouts"}),".\nThrough this referenda, a treasury spend was\n",(0,i.jsx)(s.a,{href:"https://kusama.subscan.io/event?page=1&time_dimension=date&module=treasury&event_id=assetspendvoided",children:"successfully voided"}),"."]})}),"\n",(0,i.jsx)(s.h2,{id:"submit-treasury-proposal-via-polkassembly",children:"Submit Treasury Proposal via Polkassembly"}),"\n",(0,i.jsxs)(s.p,{children:["To submit a treasury track referendum via ",(0,i.jsx)(s.a,{href:"https://polkadot.polkassembly.io/opengov",children:"Polkassembly"}),"\nclick on the FAB button in the bottom right corner. Then,"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:'Click on "Create Treasury Proposal" and choose an address for the proposer.'}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"After choosing an address, you will enter a three-stage guideline:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Write a proposal: you can add a detailed description for the proposal, which will be stored on\nPolkassembly. Alternatively, you can link an existing discussion post."}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"polkassembly-write-proposal",src:n(14879).A+"",width:"2130",height:"1596"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Create a preimage: an existing preimage can be linked, or a new one can be created. To create a\npreimage, add the beneficiary address and the token amount. The track will be auto-selected and\nthe user can proceed with the creation of a preimage."}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"polkassembly-create-preimage",src:n(94664).A+"",width:"2154",height:"1598"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Create a proposal: final confirmation about the proposal creation. The description of the\nproposal and the preimage are automatically linked to the proposal."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"requesting-tips-from-the-treasury",children:"Requesting Tips from the Treasury"}),"\n",(0,i.jsxs)(s.p,{children:["To request a tip funded by the treasury, you can follow the above steps for\n",(0,i.jsx)(s.a,{href:"#creating-a-treasury-proposal",children:"creating a treasury proposal"})," but instead of submitting the proposal\nto the ",(0,i.jsx)(s.code,{children:"32 / Small Spender"})," track, you will need to submit it to the ",(0,i.jsx)(s.code,{children:"30 / Small Tipper"})," or\n",(0,i.jsx)(s.code,{children:"31 / Big Tipper"})," tracks depending on the number of tokens to be requested."]}),"\n",(0,i.jsx)(s.p,{children:"Briefly, you will need to:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Create a preimage using the ",(0,i.jsx)(s.code,{children:"treasury.spendLocal"})," extrinsic and specifying the number of tokens\nand the beneficiary of the tip"]}),"\n",(0,i.jsxs)(s.li,{children:["Submit a proposal to the right track (i.e. ",(0,i.jsx)(s.code,{children:"30"})," or ",(0,i.jsx)(s.code,{children:"31"}),") using the preimage hash"]}),"\n",(0,i.jsxs)(s.li,{children:["Once you started the referendum go to ",(0,i.jsx)(s.a,{href:"https://polkassembly.io/",children:"Polkassembly"}),", log in with the\nproposer account and edit the referendum details"]}),"\n",(0,i.jsxs)(s.li,{children:["Notify ",(0,i.jsx)(s.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"the Polkadot Direction Element Channel"}),"\nor ",(0,i.jsx)(s.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"the Kusama Direction Element Channel"})," about\nyour referendum"]}),"\n",(0,i.jsxs)(s.li,{children:["Place the decision deposit\n",(0,i.jsx)(s.a,{href:"/docs/chain-state-values#opengov-referendum-timeout",children:"before the timeout"})]}),"\n",(0,i.jsxs)(s.li,{children:["Once the referendum ends you can\n",(0,i.jsx)(s.a,{href:"/docs/learn-guides-polkadot-opengov#claiming-the-preimage-and-decision-deposits",children:"claim the preimage and decision deposits back"})]}),"\n"]})]})}function p(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},67141:(e,s,n)=>{n.d(s,{A:()=>t});var i=n(96540),a=n(74848);const t=function(e){var s,n=e.message,t=(0,i.useState)(!0),r=t[0],o=t[1];return(0,a.jsx)(a.Fragment,{children:r&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){o(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=n,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},22192:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/spend-amount-account-validfrom-temp-51145f395b6786e783600e3665bc7fab.png"},44855:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/spend-usdt-assethub-temp-4182c6d400d00e1c4d8e94efc96dadcf.png"},94664:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/polkassembly-create-preimage-7396a8ce796d0f0dcad30d3edced8618.png"},14879:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/polkassembly-write-proposal-a3ce8ab9303111f6003ac8103ba29507.png"},79087:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/OpenGov-Treasury-Preimage-SpendLocal-693c955b1e3e27bb6c98a6aad4d1b697.png"},44751:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/submit-proposal-treasury-3948a231c4f3162a8680ad052af9e903.png"},88195:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/treasury-multistage-payout-spend-id-54e73a1e8829cb911284ad15654d5661.png"},39555:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/treasury-preimage-hash-05bb427d21d3ecf7d5e38418a0a0f4ed.png"},52540:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/treasury-proposal-decision-deposit-849d27481ba0134acf743f7474d8f6a4.png"},28453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>o});var i=n(96540);const a={},t=i.createContext(a);function r(e){const s=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),i.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/eef3f1dd.6bf92f8b.js b/assets/js/eef3f1dd.6bf92f8b.js new file mode 100644 index 000000000000..e18008d3dbd7 --- /dev/null +++ b/assets/js/eef3f1dd.6bf92f8b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7827],{3674:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var i=n(74848),a=n(28453),t=n(67141);const r={id:"learn-guides-treasury",title:"Polkadot-JS Guides about the Treasury",sidebar_label:"Treasury Guides",description:"Polkadot-JS Guides about the Polkadot Treasury.",keywords:["opengov","polkadot opengov","referenda","treasury","tipps","polkadot-js"],slug:"../learn-guides-treasury"},o=void 0,l={id:"learn/learn-guides-treasury",title:"Polkadot-JS Guides about the Treasury",description:"Polkadot-JS Guides about the Polkadot Treasury.",source:"@site/../docs/learn/learn-guides-treasury.md",sourceDirName:"learn",slug:"/learn-guides-treasury",permalink:"/docs/learn-guides-treasury",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-treasury.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-treasury",title:"Polkadot-JS Guides about the Treasury",sidebar_label:"Treasury Guides",description:"Polkadot-JS Guides about the Polkadot Treasury.",keywords:["opengov","polkadot opengov","referenda","treasury","tipps","polkadot-js"],slug:"../learn-guides-treasury"},sidebar:"docs",previous:{title:"OpenGov Guides",permalink:"/docs/learn-guides-polkadot-opengov"},next:{title:"Bounty Guides",permalink:"/docs/learn-guides-bounties"}},d={},c=[{value:"Creating a Treasury Proposal",id:"creating-a-treasury-proposal",level:2},{value:"Announcing the Proposal",id:"announcing-the-proposal",level:3},{value:"Creating a Treasury Proposal - Spend Local",id:"creating-a-treasury-proposal---spend-local",level:2},{value:"Submit Treasury Proposal Preimage",id:"submit-treasury-proposal-preimage",level:3},{value:"Submit a Treasury Track Referendum",id:"submit-a-treasury-track-referendum",level:3},{value:"Place a Decision Deposit for the Treasury Track Referendum",id:"place-a-decision-deposit-for-the-treasury-track-referendum",level:3},{value:"Creating a Multistage Payout Proposal with validFrom",id:"creating-a-multistage-payout-proposal-with-validfrom",level:2},{value:"Using batch for Multi-Spend Proposals",id:"using-batch-for-multi-spend-proposals",level:3},{value:"Using validFrom for a Milestone-Based Proposal",id:"using-validfrom-for-a-milestone-based-proposal",level:3},{value:"Creating a USDT Treasury Proposal - Spend (with AssetHub)",id:"creating-a-usdt-treasury-proposal---spend-with-assethub",level:2},{value:"Creating a Preimage",id:"creating-a-preimage",level:3},{value:"Specifying Asset Kind",id:"specifying-asset-kind",level:3},{value:"Specifying the Amount",id:"specifying-the-amount",level:3},{value:"Specifying the Beneficiary",id:"specifying-the-beneficiary",level:3},{value:"Specifying validFrom (optional)",id:"specifying-validfrom-optional",level:3},{value:"Manually Claiming Payouts",id:"manually-claiming-payouts",level:3},{value:"Proposing a "Void" for a Staged Proposal",id:"proposing-a-void-for-a-staged-proposal",level:3},{value:"Submit Treasury Proposal via Polkassembly",id:"submit-treasury-proposal-via-polkassembly",level:2},{value:"Requesting Tips from the Treasury",id:"requesting-tips-from-the-treasury",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,i.jsxs)(s.p,{children:["See ",(0,i.jsx)(s.a,{href:"/docs/learn-polkadot-opengov-treasury",children:"this page"})," to learn about the Polkadot Treasury."]}),"\n",(0,i.jsx)(s.h2,{id:"creating-a-treasury-proposal",children:"Creating a Treasury Proposal"}),"\n",(0,i.jsx)(s.p,{children:"Your proposal should address a problem, outline a goal, give a detailed account of how you will\nreach that goal, and include any ongoing maintenance needs. As much as possible, you should itemize\nthe tasks to be completed so fees can be evaluated and milestones can be followed. You can check the\nguidelines below:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Guidelines for a successful proposal on\n",(0,i.jsx)(s.a,{href:"https://docs.google.com/document/d/1IZykdp2cyQavcRyZd_dgNj5DcgxgZR6kAqGdcNARu1w",children:"Polkadot"})," and\n",(0,i.jsx)(s.a,{href:"https://docs.google.com/document/d/1CzEnurqwqLBOGrJI9CQORiGW9m6QyPOSshhzJdR57Pk",children:"Kusama"})]}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"https://docs.google.com/document/d/1O_84mXYFERCavmnJyxbIPKFkG0bVBySRjCVy-d-VKcc",children:"Treasury proposal template for Polkadot"})}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"announcing-the-proposal",children:"Announcing the Proposal"}),"\n",(0,i.jsxs)(s.p,{children:["To minimize storage on-chain, proposals don't contain contextual information. When a user submits a\nproposal, they will need to find an off-chain way to explain the proposal via\n",(0,i.jsx)(s.a,{href:"/docs/community",children:"community channels"}),"."]}),"\n",(0,i.jsx)(s.p,{children:"Spreading the word about the proposal's explanation to the community is ultimately up to the\nproposer."}),"\n",(0,i.jsx)(s.admonition,{title:"Use Accounts with Verified On-Chain Identity for Treasury Proposals",type:"tip",children:(0,i.jsxs)(s.p,{children:["To ensure legitimacy, it is required that the account linked to the Treasury proposal has an\n",(0,i.jsx)(s.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181981-how-to-set-and-clear-an-identity",children:"identity set"}),"\nand is\n",(0,i.jsx)(s.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181990-how-to-request-and-cancel-identity-judgement",children:"verified by an on-chain registrar"}),"."]})}),"\n",(0,i.jsx)(s.h2,{id:"creating-a-treasury-proposal---spend-local",children:"Creating a Treasury Proposal - Spend Local"}),"\n",(0,i.jsxs)(s.admonition,{title:'"Spend" vs. "Spend Local"',type:"info",children:[(0,i.jsxs)(s.p,{children:["You may notice that the Treasury pallet contains two extrinsics - ",(0,i.jsx)(s.code,{children:"treasury.spend"})," and\n",(0,i.jsx)(s.code,{children:"treasury.spendLocal"}),". ",(0,i.jsx)(s.code,{children:"treasury.spendLocal"})," (formally called ",(0,i.jsx)(s.code,{children:"treasury.spend"}),") refers to a spend of\nDOT that is locally available, i.e., DOT from the relay chain's treasury account. ",(0,i.jsx)(s.code,{children:"spend"})," actually\nallows the caller to specify an asset other than DOT, or even assets in other locations, e.g.\n",(0,i.jsx)(s.a,{href:"/docs/glossary#asset-hub",children:"Asset Hub"}),"."]}),(0,i.jsxs)(s.p,{children:["Unlike ",(0,i.jsx)(s.code,{children:"treasury.spendLocal"}),", ",(0,i.jsx)(s.code,{children:"treasury.spend"})," is ",(0,i.jsx)(s.strong,{children:"not"})," bound by a spend period, and must be\nclaimed manually via the ",(0,i.jsx)(s.code,{children:"treasury.payout"})," extrinsic. ",(0,i.jsx)(s.code,{children:"treasuy.spendLocal"})," behavior remains\nunchanged."]})]}),"\n",(0,i.jsx)(s.h3,{id:"submit-treasury-proposal-preimage",children:"Submit Treasury Proposal Preimage"}),"\n",(0,i.jsxs)(s.p,{children:["The example below shows how to create a ",(0,i.jsx)(s.a,{href:"/docs/glossary#preimage",children:"preimage"})," for a\ntransaction that requests 100 DOT from Treasury."]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Navigate to ",(0,i.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Polkadot-JS UI > Governance > Preimages"}),"\nand then click on Add Preimage."]}),"\n",(0,i.jsx)(s.li,{children:"Select the account which will be used to submit the preimage."}),"\n",(0,i.jsxs)(s.li,{children:["Choose ",(0,i.jsx)(s.code,{children:"treasury"}),' pallet in the "propose" dropdown and the ',(0,i.jsx)(s.code,{children:"spendLocal(amount, beneficiary)"}),"call"]}),"\n",(0,i.jsx)(s.li,{children:"Enter the DOT amount."}),"\n",(0,i.jsx)(s.li,{children:"Enter the AccountID of the beneficiary (which has a verified on-chain identity)."}),"\n",(0,i.jsx)(s.li,{children:"Submit preimage"}),"\n",(0,i.jsx)(s.li,{children:"Sign and submit the transaction by paying the specified transaction fees."}),"\n"]}),"\n",(0,i.jsx)(s.admonition,{title:"Preimage Submission Deposit",type:"info",children:(0,i.jsx)(s.p,{children:"A deposit is required for the preimage to be stored on chain. The preimage deposit is proportional\nto the amount of information stored within the preimage. The deposit amount required for a preimage\nwith a treasury spend transaction is around 41 DOT (1.4 KSM on Kusama). Ensure you have enough\naccount balance to pay for the submission deposit and the transaction fees."})}),"\n",(0,i.jsx)(s.p,{children:"Here is the preimage requesting for 100 DOT."}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Treasury Preimage",src:n(79087).A+"",width:"2148",height:"1191"})}),"\n",(0,i.jsx)(s.admonition,{title:"Balance entered is in Plancks",type:"info",children:(0,i.jsxs)(s.p,{children:["Polkadot JS UI is for developers and the UI takes input of the balance in\n",(0,i.jsx)(s.a,{href:"/docs/learn-DOT#the-planck-unit",children:"plancks"}),". DOT has 10 decimals, which is 10000000000 plancks per DOT."]})}),"\n",(0,i.jsx)(s.p,{children:"After successful submission of the preimage, it is displayed on Polkadot-JS UI > Governance >\nPreimages page. Every preimage is associated with a unique preimage hash (highlighted in a box in\nthe image below). Take a note of this preimage hash, which is required to submit a referendum."}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Treasury Preimage Hash",src:n(39555).A+"",width:"2879",height:"453"})}),"\n",(0,i.jsx)(s.h3,{id:"submit-a-treasury-track-referendum",children:"Submit a Treasury Track Referendum"}),"\n",(0,i.jsx)(s.p,{children:"The example below shows how to submit a Treasury track referendum."}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Navigate to ",(0,i.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"Polkadot-JS UI > Governance > Referenda"}),"\nand then click on Submit proposal."]}),"\n",(0,i.jsx)(s.li,{children:"Select the account which will be used to submit the proposal."}),"\n",(0,i.jsx)(s.li,{children:"Choose the appropriate submission track (The example below selected Small Spender track)."}),"\n",(0,i.jsx)(s.li,{children:"Enter the preimage hash of the treasury spend transaction.(If the preimage exists on-chain, the\npreimage length box is automatically populated)"}),"\n",(0,i.jsx)(s.li,{children:"Click on Submit proposal."}),"\n",(0,i.jsx)(s.li,{children:"Sign and submit the transaction."}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Submit Treasury Proposal",src:n(44751).A+"",width:"2141",height:"1238"})}),"\n",(0,i.jsxs)(s.p,{children:["Once your submission is executed, your referendum will appear under your chosen track on the\nPolkadot-JS UI ",(0,i.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/referenda",children:"referenda page"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"place-a-decision-deposit-for-the-treasury-track-referendum",children:"Place a Decision Deposit for the Treasury Track Referendum"}),"\n",(0,i.jsxs)(s.p,{children:["For the referendum to move from preparing phase to the deciding phase, a decision deposit needs to\nbe placed. The decision deposit values for each individual\n",(0,i.jsx)(s.a,{href:"./learn-polkadot-opengov-treasury#treasury-tracks",children:"Treasury Tracks"})," are listed in a section above\nin this document."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Submit Treasury Proposal Decision Deposit",src:n(52540).A+"",width:"2133",height:"168"})}),"\n",(0,i.jsxs)(s.p,{children:["The preimage and decision deposits\n",(0,i.jsx)(s.a,{href:"/docs/learn-guides-polkadot-opengov#claiming-the-preimage-and-decision-deposits",children:"can be claimed once the referendum ends"}),"."]}),"\n",(0,i.jsxs)(s.h2,{id:"creating-a-multistage-payout-proposal-with-validfrom",children:["Creating a Multistage Payout Proposal with ",(0,i.jsx)(s.code,{children:"validFrom"})]}),"\n",(0,i.jsx)(s.p,{children:"Staged proposals are similar to a tranche or milestone-based funding model; instead of all spends\nbeing paid simultaneously, each portion is redeemable at a certain block height. This is done by\nspecifying each milestone, set at its respective amount and block height at which it becomes\nredeemable."}),"\n",(0,i.jsx)(s.p,{children:'For example, take the following "staged" proposal, which has three milestones, each at 100 DOT, and\nis redeemable at the following block heights. Usually, block heights correspond to a date in the\nfuture:'}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"100 DOT paid out at block height 1000"}),"\n",(0,i.jsx)(s.li,{children:"200 DOT paid out at block height 2000"}),"\n",(0,i.jsx)(s.li,{children:"500 DOT paid out at block height 4000"}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["Governance can also propose to ",(0,i.jsx)(s.strong,{children:"void"})," a staged proposal before it has completed all of its\npayouts."]}),"\n",(0,i.jsx)(s.admonition,{title:"Calculating dates from block heights",type:"info",children:(0,i.jsx)(s.p,{children:"Although not the most accurate form of measurement, block heights can be used to correspond to\ncertain dates in the future."})}),"\n",(0,i.jsxs)(s.h3,{id:"using-batch-for-multi-spend-proposals",children:["Using ",(0,i.jsx)(s.code,{children:"batch"})," for Multi-Spend Proposals"]}),"\n",(0,i.jsxs)(s.p,{children:["Using the Utility pallet, one can batch multiple ",(0,i.jsx)(s.code,{children:"treasury.spend"})," calls together. Each of these\ncalls can have its own ",(0,i.jsx)(s.code,{children:"validFrom"})," block height, which allows for scenarios such as the above to be\npossible."]}),"\n",(0,i.jsx)(s.admonition,{title:"Multistage payout proposal example",type:"tip",children:(0,i.jsxs)(s.p,{children:["For reference on how to create a multistage payout proposal, please check\n",(0,i.jsx)(s.a,{href:"https://kusama.subsquare.io/referenda/382?tab=call",children:"Referendum 382"})," on Kusama."]})}),"\n",(0,i.jsxs)(s.h3,{id:"using-validfrom-for-a-milestone-based-proposal",children:["Using ",(0,i.jsx)(s.code,{children:"validFrom"})," for a Milestone-Based Proposal"]}),"\n",(0,i.jsxs)(s.p,{children:["Once each spend is defined within the batched call, the ",(0,i.jsx)(s.code,{children:"validFrom"}),' field can be utilized to specify\nthe "date", or block height, at which each spend will be executed.']}),"\n",(0,i.jsx)(s.admonition,{title:"Treasury Spends have to be claimed manually. Spends can expire!",type:"info",children:(0,i.jsxs)(s.p,{children:["Keep in mind that once the ",(0,i.jsx)(s.code,{children:"validFrom"})," block height has been reached, you will have to claim the\nspend within 30 days. Check the claiming process for treasury spends\n",(0,i.jsx)(s.a,{href:"#manually-claiming-payouts",children:"here"})]})}),"\n",(0,i.jsx)(s.h2,{id:"creating-a-usdt-treasury-proposal---spend-with-assethub",children:"Creating a USDT Treasury Proposal - Spend (with AssetHub)"}),"\n",(0,i.jsxs)(s.p,{children:["The following tutorial mostly goes over how to utilize the ",(0,i.jsx)(s.code,{children:"spend"})," extrinsic, which, unlike\n",(0,i.jsx)(s.code,{children:"spendLocal"}),", is able to specify assets besides the native asset in other locations, such as\n",(0,i.jsx)(s.a,{href:"/docs/glossary#asset-hub",children:"Asset Hub"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"creating-a-preimage",children:"Creating a Preimage"}),"\n",(0,i.jsxs)(s.p,{children:["The example below shows how to create a ",(0,i.jsx)(s.a,{href:"../general/glossary#preimage",children:"preimage"})," for a transaction\nthat requests 100 USDT from AssetHub."]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Navigate to ",(0,i.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/preimages",children:"Polkadot-JS UI > Governance > Referenda"}),"\nand then click on Add Preimage."]}),"\n",(0,i.jsx)(s.li,{children:"Select the account to submit the preimage."}),"\n",(0,i.jsxs)(s.li,{children:["Choose the ",(0,i.jsx)(s.code,{children:"treasury"}),' pallet in the "propose" dropdown and the\n',(0,i.jsx)(s.code,{children:"spend(assetKind, amount, beneficiary, validFrom)"})," call."]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"Now, let's go through each field one-by-one and fill them in accordingly:"}),"\n",(0,i.jsx)(s.h3,{id:"specifying-asset-kind",children:"Specifying Asset Kind"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"assetKind"})," refers to the asset to be used, specified via XCM. In short, we need to be able to find:"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"The relative location of the asset, and"}),"\n",(0,i.jsx)(s.li,{children:"How it is identified within this location."}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"For this example, we are using USDT, which from the perspective of the relay chain would be:"}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.code,{children:"Parachain 1000 (AssetHub) > AssetId (Concrete) > PalletInstance 50 > General Index 1984"})}),"\n",(0,i.jsxs)(s.p,{children:["First, we specify the location - in this case, Asset Hub (parachain 1,000). ",(0,i.jsx)(s.code,{children:"PalletInstance 50"}),"\nrefers to the Assets pallet instance on Asset Hub. The general index is ",(0,i.jsx)(s.code,{children:"1984"}),", which is the ID of\nUSDT in this instance of the Assets pallet."]}),"\n",(0,i.jsxs)(s.admonition,{title:"Bug on Polkadot-JS UI",type:"caution",children:[(0,i.jsxs)(s.p,{children:["As the Polkadot-JS UI is interpreting the general index in DOT, it multiplies the entered values\nwith ",(0,i.jsx)(s.code,{children:"10000000000"})," (As DOT token has 10 decimals) and places it in the ",(0,i.jsx)(s.code,{children:"u128"})," argument. As we would\nlike to have ",(0,i.jsx)(s.code,{children:"1984"})," as the input argument, we can offset this UI induced error by entering\n",(0,i.jsx)(s.code,{children:"0.0000001984"}),"."]}),(0,i.jsxs)(s.p,{children:["The issue on Polkadot-JS repo can be tracked\n",(0,i.jsx)(s.a,{href:"https://github.com/polkadot-js/apps/issues/10430",children:"here"}),"."]})]}),"\n",(0,i.jsxs)(s.p,{children:["Here is how the final ",(0,i.jsx)(s.code,{children:"assetKind"})," field should look:"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Asset Kind",src:n(44855).A+"",width:"1564",height:"1316"})}),"\n",(0,i.jsx)(s.h3,{id:"specifying-the-amount",children:"Specifying the Amount"}),"\n",(0,i.jsxs)(s.p,{children:["The amount should be simply the amount of USDT, where each ",(0,i.jsx)(s.code,{children:"1"})," USDT is ",(0,i.jsx)(s.code,{children:"1000000"}),". Because we are\nasking for 100 USDT, we put ",(0,i.jsx)(s.code,{children:"100000000"})," as the input for the amount."]}),"\n",(0,i.jsxs)(s.admonition,{title:"Bug on Polkadot-JS UI",type:"caution",children:[(0,i.jsxs)(s.p,{children:["As the Polkadot-JS UI is interpreting the asset balance in DOT, it multiplies the entered values\nwith ",(0,i.jsx)(s.code,{children:"10000000000"})," (As DOT token has 10 decimals) and places it in the ",(0,i.jsx)(s.code,{children:"u128"})," argument. As we would\nlike to have ",(0,i.jsx)(s.code,{children:"100000000"})," as the input argument, we can offset this UI induced error by entering\n",(0,i.jsx)(s.code,{children:"0.01"})," for this particular example where we like to input 100 USDT."]}),(0,i.jsxs)(s.p,{children:["The issue on Polkadot-JS repo can be tracked\n",(0,i.jsx)(s.a,{href:"https://github.com/polkadot-js/apps/issues/10430",children:"here"}),"."]})]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Asset Value, Beneficiary and ValidFrom",src:n(22192).A+"",width:"1591",height:"1279"})}),"\n",(0,i.jsx)(s.h3,{id:"specifying-the-beneficiary",children:"Specifying the Beneficiary"}),"\n",(0,i.jsxs)(s.p,{children:["The beneficiary account will be one on Asset Hub. For this reason, the XCM junction must be\nspecified as follows, with one junction (",(0,i.jsx)(s.code,{children:"X1"}),") and the beneficiary account (",(0,i.jsx)(s.code,{children:"AccountId32"}),"), which is\nan account address on the chain."]}),"\n",(0,i.jsxs)(s.h3,{id:"specifying-validfrom-optional",children:["Specifying ",(0,i.jsx)(s.code,{children:"validFrom"})," (optional)"]}),"\n",(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"validFrom"})," field is optional, and refers to the block height of the relay chain upon which the\npayout can be issued. If the ",(0,i.jsx)(s.code,{children:"validFrom"})," parameter is not set, the spend can be paid out immediately\nafter approval. For more information on this field, refer to the\n",(0,i.jsx)(s.a,{href:"#creating-a-staged-proposal-with-validfrom",children:"guide below"}),"."]}),"\n",(0,i.jsx)(s.p,{children:"The final call should look like the following, where we:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Specify our asset as ",(0,i.jsx)(s.strong,{children:"USDT"})," on ",(0,i.jsx)(s.strong,{children:"Asset Hub"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["Specify the ",(0,i.jsx)(s.strong,{children:"amount"})," of ",(0,i.jsx)(s.strong,{children:"USDT"})," (100)."]}),"\n",(0,i.jsx)(s.li,{children:"Specify the beneficiary address."}),"\n",(0,i.jsxs)(s.li,{children:["If applicable, use the ",(0,i.jsx)(s.code,{children:"validFrom"})," field to specify a block number upon which the payout becomes\nvalid."]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"The next steps are to:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Copy the preimage (and its length)"}),"\n",(0,i.jsx)(s.li,{children:"Sign and submit the preimage"}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["Once this is finished, one may submit a proposal\n",(0,i.jsx)(s.a,{href:"#submit-a-treasury-track-referendum",children:"as stated above"}),". Keep in mind one will also need to\n",(0,i.jsx)(s.a,{href:"#place-a-decision-deposit-for-the-treasury-track-referendum",children:"provide the decision deposit as well"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"manually-claiming-payouts",children:"Manually Claiming Payouts"}),"\n",(0,i.jsxs)(s.p,{children:["In order to claim the spend, you must manually call the ",(0,i.jsx)(s.code,{children:"treasury.payout"})," extrinsic via a ",(0,i.jsx)(s.code,{children:"Signed"}),"\norigin. The ",(0,i.jsx)(s.code,{children:"spendID"})," for the pending payout can be queried on-chain through Polkadot-JS UI >\nDeveloper > Chain State > Storage > treasury > spends and unselect the include option and then click\non the plus button to the right."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"payout",src:n(88195).A+"",width:"2768",height:"1370"})}),"\n",(0,i.jsxs)(s.p,{children:["From the list of spends, find the ",(0,i.jsx)(s.code,{children:"spendID"})," of your respetive payout and issue the payout extrinsic."]}),"\n",(0,i.jsx)(s.admonition,{title:"payout example",type:"tip",children:(0,i.jsxs)(s.p,{children:["To claim the first payout of ",(0,i.jsx)(s.a,{href:"https://kusama.subsquare.io/referenda/382?tab=call",children:"Referendum 382"})," on\nKusama, ",(0,i.jsx)(s.a,{href:"https://kusama.subscan.io/extrinsic/23061444-2",children:"this payout extrinsic"})," was issued. After\nissuing the payout extrinsic, the status of the payout changes from ",(0,i.jsx)(s.code,{children:"pending"})," to ",(0,i.jsx)(s.code,{children:"Attempted"})," with a\nreference to a payment ID. If the payout is successful, the balance on Asset Hub should be updated.\n",(0,i.jsx)(s.a,{href:"https://assethub-kusama.subscan.io/extrinsic/6923602-0",children:"Here"})," is the transfer extrinsic on Asset\nHub for the first payout of ",(0,i.jsx)(s.a,{href:"https://kusama.subscan.io/referenda_v2/382",children:"Referendum 382"}),"."]})}),"\n",(0,i.jsxs)(s.p,{children:["To clear the on-chain storage of a successful or expired spend, Treasury pallet's ",(0,i.jsx)(s.code,{children:"checkStatus"}),"\nextrinsic can be used. The transaction fees paid for issuing this extrinsic will be refunded."]}),"\n",(0,i.jsx)(s.h3,{id:"proposing-a-void-for-a-staged-proposal",children:'Proposing a "Void" for a Staged Proposal'}),"\n",(0,i.jsxs)(s.p,{children:["If a proposal that hasn't completed all of its spends needs to be voided, the ",(0,i.jsx)(s.code,{children:"treasury.voidSpend"}),"\nextrinsic can be utilized via a governance proposal."]}),"\n",(0,i.jsx)(s.admonition,{title:"Example proposal - Voiding a Treasury Spend",type:"tip",children:(0,i.jsxs)(s.p,{children:["For reference, check the referenda on Kusama that\n",(0,i.jsx)(s.a,{href:"https://kusama.subsquare.io/referenda/391",children:"tests VoidSpend functionality for Treasury Payouts"}),".\nThrough this referenda, a treasury spend was\n",(0,i.jsx)(s.a,{href:"https://kusama.subscan.io/event?page=1&time_dimension=date&module=treasury&event_id=assetspendvoided",children:"successfully voided"}),"."]})}),"\n",(0,i.jsx)(s.h2,{id:"submit-treasury-proposal-via-polkassembly",children:"Submit Treasury Proposal via Polkassembly"}),"\n",(0,i.jsxs)(s.p,{children:["To submit a treasury track referendum via ",(0,i.jsx)(s.a,{href:"https://polkadot.polkassembly.io/opengov",children:"Polkassembly"}),"\nclick on the FAB button in the bottom right corner. Then,"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:'Click on "Create Treasury Proposal" and choose an address for the proposer.'}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"After choosing an address, you will enter a three-stage guideline:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Write a proposal: you can add a detailed description for the proposal, which will be stored on\nPolkassembly. Alternatively, you can link an existing discussion post."}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"polkassembly-write-proposal",src:n(14879).A+"",width:"2130",height:"1596"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Create a preimage: an existing preimage can be linked, or a new one can be created. To create a\npreimage, add the beneficiary address and the token amount. The track will be auto-selected and\nthe user can proceed with the creation of a preimage."}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"polkassembly-create-preimage",src:n(94664).A+"",width:"2154",height:"1598"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Create a proposal: final confirmation about the proposal creation. The description of the\nproposal and the preimage are automatically linked to the proposal."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"requesting-tips-from-the-treasury",children:"Requesting Tips from the Treasury"}),"\n",(0,i.jsxs)(s.p,{children:["To request a tip funded by the treasury, you can follow the above steps for\n",(0,i.jsx)(s.a,{href:"#creating-a-treasury-proposal",children:"creating a treasury proposal"})," but instead of submitting the proposal\nto the ",(0,i.jsx)(s.code,{children:"32 / Small Spender"})," track, you will need to submit it to the ",(0,i.jsx)(s.code,{children:"30 / Small Tipper"})," or\n",(0,i.jsx)(s.code,{children:"31 / Big Tipper"})," tracks depending on the number of tokens to be requested."]}),"\n",(0,i.jsx)(s.p,{children:"Briefly, you will need to:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Create a preimage using the ",(0,i.jsx)(s.code,{children:"treasury.spendLocal"})," extrinsic and specifying the number of tokens\nand the beneficiary of the tip"]}),"\n",(0,i.jsxs)(s.li,{children:["Submit a proposal to the right track (i.e. ",(0,i.jsx)(s.code,{children:"30"})," or ",(0,i.jsx)(s.code,{children:"31"}),") using the preimage hash"]}),"\n",(0,i.jsxs)(s.li,{children:["Once you started the referendum go to ",(0,i.jsx)(s.a,{href:"https://polkassembly.io/",children:"Polkassembly"}),", log in with the\nproposer account and edit the referendum details"]}),"\n",(0,i.jsxs)(s.li,{children:["Notify ",(0,i.jsx)(s.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"the Polkadot Direction Element Channel"}),"\nor ",(0,i.jsx)(s.a,{href:"https://matrix.to/#/#Polkadot-Direction:parity.io",children:"the Kusama Direction Element Channel"})," about\nyour referendum"]}),"\n",(0,i.jsxs)(s.li,{children:["Place the decision deposit\n",(0,i.jsx)(s.a,{href:"/docs/chain-state-values#opengov-referendum-timeout",children:"before the timeout"})]}),"\n",(0,i.jsxs)(s.li,{children:["Once the referendum ends you can\n",(0,i.jsx)(s.a,{href:"/docs/learn-guides-polkadot-opengov#claiming-the-preimage-and-decision-deposits",children:"claim the preimage and decision deposits back"})]}),"\n"]})]})}function p(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},67141:(e,s,n)=>{n.d(s,{A:()=>t});var i=n(96540),a=n(74848);const t=function(e){var s,n=e.message,t=(0,i.useState)(!0),r=t[0],o=t[1];return(0,a.jsx)(a.Fragment,{children:r&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){o(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=n,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},22192:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/spend-amount-account-validfrom-temp-51145f395b6786e783600e3665bc7fab.png"},44855:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/spend-usdt-assethub-temp-4182c6d400d00e1c4d8e94efc96dadcf.png"},94664:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/polkassembly-create-preimage-7396a8ce796d0f0dcad30d3edced8618.png"},14879:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/polkassembly-write-proposal-a3ce8ab9303111f6003ac8103ba29507.png"},79087:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/OpenGov-Treasury-Preimage-SpendLocal-693c955b1e3e27bb6c98a6aad4d1b697.png"},44751:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/submit-proposal-treasury-3948a231c4f3162a8680ad052af9e903.png"},88195:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/treasury-multistage-payout-spend-id-54e73a1e8829cb911284ad15654d5661.png"},39555:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/treasury-preimage-hash-05bb427d21d3ecf7d5e38418a0a0f4ed.png"},52540:(e,s,n)=>{n.d(s,{A:()=>i});const i=n.p+"assets/images/treasury-proposal-decision-deposit-849d27481ba0134acf743f7474d8f6a4.png"},28453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>o});var i=n(96540);const a={},t=i.createContext(a);function r(e){const s=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),i.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f0ff685a.17bf4a10.js b/assets/js/f0ff685a.17bf4a10.js new file mode 100644 index 000000000000..3ccb67f53fd7 --- /dev/null +++ b/assets/js/f0ff685a.17bf4a10.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[2393],{63362:(e,t,o)=>{"use strict";o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>c,toc:()=>d});var n=o(74848),a=o(28453),s=(o(47379),o(67141));const r={id:"learn-guides-accounts-proxy",title:"Polkadot-JS Guides about Proxy Accounts",sidebar_label:"Proxy Guides",description:"Polkadot-JS Guides about Proxy Accounts",keyword:["guides","polkadot-js","accounts","proxy"],slug:"../learn-guides-accounts-proxy"},i=void 0,c={id:"learn/learn-guides-accounts-proxy",title:"Polkadot-JS Guides about Proxy Accounts",description:"Polkadot-JS Guides about Proxy Accounts",source:"@site/../docs/learn/learn-guides-accounts-proxy.md",sourceDirName:"learn",slug:"/learn-guides-accounts-proxy",permalink:"/docs/learn-guides-accounts-proxy",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts-proxy.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-accounts-proxy",title:"Polkadot-JS Guides about Proxy Accounts",sidebar_label:"Proxy Guides",description:"Polkadot-JS Guides about Proxy Accounts",keyword:["guides","polkadot-js","accounts","proxy"],slug:"../learn-guides-accounts-proxy"},sidebar:"docs",previous:{title:"Multisig Guides",permalink:"/docs/learn-guides-accounts-multisig"},next:{title:"Pure Proxy Guides",permalink:"/docs/learn-guides-accounts-proxy-pure"}},l={},d=[{value:"Creating Proxy with Polkadot-JS",id:"creating-proxy-with-polkadot-js",level:2},{value:"Removing Proxy with Polkadot-JS",id:"removing-proxy-with-polkadot-js",level:2},{value:"View your Proxy on Polkadot-JS",id:"view-your-proxy-on-polkadot-js",level:2},{value:"Set-up and Use of Time-delayed Proxies with Polkadot-JS",id:"set-up-and-use-of-time-delayed-proxies-with-polkadot-js",level:2},{value:"Proxy calls",id:"proxy-calls",level:2},{value:"Nested Proxy Calls",id:"nested-proxy-calls",level:3}];function p(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsxs)(t.p,{children:["Proxies allow users to use an account (it can be in cold storage or a hot wallet) less frequently\nbut actively participate in the network with the weight of the tokens in that account. Proxies are\nallowed to perform a limited amount of actions related to specific\n",(0,n.jsx)(t.a,{href:"https://docs.substrate.io/reference/frame-pallets/",children:"substrate pallets"})," on behalf of another\naccount. The videos below contain more information about using proxies."]}),"\n",(0,n.jsxs)("div",{className:"row",children:[(0,n.jsxs)("div",{className:"col text--center",children:[(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=1tcygkq52tU",children:(0,n.jsx)("img",{src:"https://img.youtube.com/vi/1tcygkq52tU/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=1tcygkq52tU",children:"Proxy Accounts Tutorial"})})]}),(0,n.jsxs)("div",{className:"col text--center",children:[(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=4437s",children:(0,n.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=4437s",children:"Proxy Accounts Advanced Tutorial"})})]})]}),"\n",(0,n.jsx)(t.admonition,{title:"Know how to check the calls and pallets accessible by proxies",type:"tip",children:(0,n.jsxs)(t.p,{children:["For the latest information on the calls and pallets that can be fully accessed by proxies, check the\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/153543b0c8c582e73f520e5c08cbe33bddfb5f69/runtime/polkadot/src/lib.rs#L1158",children:"source code in the runtime folder"}),"\non the ",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot repository"})]})}),"\n",(0,n.jsx)(t.h2,{id:"creating-proxy-with-polkadot-js",children:"Creating Proxy with Polkadot-JS"}),"\n",(0,n.jsxs)(t.p,{children:["To create a proxy account with Polkadot-JS read\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182179-how-to-create-a-proxy-account",children:"this support article"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"removing-proxy-with-polkadot-js",children:"Removing Proxy with Polkadot-JS"}),"\n",(0,n.jsxs)(t.p,{children:['Read the section "Removing Proxies" on\n',(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182179-how-to-create-a-proxy-account",children:"this support page"}),"\nto learn how to remove proxies."]}),"\n",(0,n.jsx)(t.h2,{id:"view-your-proxy-on-polkadot-js",children:"View your Proxy on Polkadot-JS"}),"\n",(0,n.jsxs)(t.p,{children:["To view your proxy, just go on the ",(0,n.jsx)(t.em,{children:"Accounts"})," menu in the Polkadot-JS UI, next to the proxied\naccount you will notice a blue icon. Hover on it, and you will see ",(0,n.jsx)(t.em,{children:"Proxy overview"}),". Click on it and\nyou will be presented with a list of all proxies for that account."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"polkadot_view_proxies",src:o(2997).A+"",width:"1842",height:"120"})}),"\n",(0,n.jsxs)(t.p,{children:["Additionally, you can head over to the ",(0,n.jsx)(t.em,{children:"Chain State"})," tab (underneath the ",(0,n.jsx)(t.em,{children:"Developer"})," menu) on\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/chainstate",children:"Polkadot-JS Apps"}),". If\nyou've created your proxy on a Polkadot account, it is required to change your network accordingly\nusing the top left navigation button. On this page, the proxy pallet should be selected, returning\nthe announcements and proxies functions. The proxies function will allow you to see your created\nproxies for either one account or for all accounts (using the toggle will enable this). Proxy\nannouncements are what time lock proxies do to announce they are going to conduct an action."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"polkadot_view_proxies_dev",src:o(16809).A+"",width:"1871",height:"820"})}),"\n",(0,n.jsx)(t.h2,{id:"set-up-and-use-of-time-delayed-proxies-with-polkadot-js",children:"Set-up and Use of Time-delayed Proxies with Polkadot-JS"}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["See ",(0,n.jsx)(t.a,{href:"https://youtu.be/3L7Vu2SX0PE",children:"this video tutorial"})," to learn how you can setup and use\ntime-delayed proxies. The video goes through the example below."]})}),"\n",(0,n.jsxs)(t.p,{children:["Initially the time time-delayed proxy announces its intended action using the ",(0,n.jsx)(t.code,{children:"proxy.announce"}),"\nextrinsic and will wait for the number of blocks defined in the delay time before executing it. The\nproxy will include the hash of the intended function call in the announcement. Within this time\nwindow, the intended action may be canceled by accounts that control the proxy. This can be done by\nthe proxy itself using the ",(0,n.jsx)(t.code,{children:"proxy.removeAnnouncement"})," extrinsic or by the proxied account using the\nthe ",(0,n.jsx)(t.code,{children:"proxy.rejectAnnouncement"})," extrinsic. Now we can use proxies knowing that any malicious actions\ncan be noticed and reverted within a delay period. After the time-delay, the proxy can use the\n",(0,n.jsx)(t.code,{children:"proxy.proxyAnnounced"})," extrinsic to execute the announced call."]}),"\n",(0,n.jsx)(t.p,{children:"Let's take for example the stash account Eleanor setting Bob as a time-delayed staking proxy. In\nthis way, if Bob submits an extrinsic to change the reward destination, such extrinsic can be\nrejected by Eleanor. This implies that Eleanor monitors Bob, and that within the time-delay she can\nspot the announced extrinsic. Eleanor can check all the proxy call announcements made by her\naccount's proxies on-chain. On Polkadot-JS UI, go to Developer > Storage > Proxy > Announcements to\ncheck the hashes for the calls made by the proxy accounts and the block height at which they are\nenabled for execution."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"time-delayed proxies",src:o(25225).A+"",width:"1920",height:"800"})}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["If you try to use ",(0,n.jsx)(t.code,{children:"proxy.proxyAnnounced"}),' to execute the call within the time-delay window you will\nget an error "Proxy unannounced" since the announcement will be done after the time delay. Also note\nthat regular ',(0,n.jsx)(t.code,{children:"proxy.proxy"})," calls do not work with time-delayed proxies, you need to announce the\ncall first and then execute the announced call on a separate transaction."]})}),"\n",(0,n.jsx)(t.h2,{id:"proxy-calls",children:"Proxy calls"}),"\n",(0,n.jsxs)(t.p,{children:["Proxy calls are used by proxies to call proxied accounts. These calls are important for example in\nthe case of ",(0,n.jsx)(t.em,{children:"pure"})," proxies, as any attempt to sign transactions with a ",(0,n.jsx)(t.em,{children:"pure"})," proxy will fail. For\nmore details see the ",(0,n.jsx)(t.a,{href:"/docs/learn-proxies-pure",children:"dedicated section about pure proxies"}),"."]}),"\n",(0,n.jsx)(t.h3,{id:"nested-proxy-calls",children:"Nested Proxy Calls"}),"\n",(0,n.jsxs)(t.p,{children:["As the term suggests, nested proxy calls are proxy calls within proxy calls. Such calls are needed\nif there are proxied accounts that are proxies themselves. In the example diagram below, Alice has a\nstash account that has a ",(0,n.jsx)(t.em,{children:"staking"})," proxy account, P-C. P-C is a ",(0,n.jsx)(t.em,{children:"pure"})," proxy, a proxied account\noriginally spawned by Charly that is now an ",(0,n.jsx)(t.em,{children:"any"})," proxy of P-C and signs everything on its behalf."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"nested proxy calls",src:o(42030).A+"",width:"1920",height:"800"})}),"\n",(0,n.jsxs)(t.p,{children:["For example, to bond more funds, Charly needs to submit a ",(0,n.jsx)(t.code,{children:"prox.proxy"})," extrinsic to P-C, which in\nturn submits a ",(0,n.jsx)(t.code,{children:"proxy.proxy"})," extrinsic to Alice including for example a ",(0,n.jsx)(t.code,{children:"staking.bondExtra"}),"\nextrinsic, specifying the number of extra tokens that need to be bounded. If Charly wants to leave,\na new account can take his place as any proxy (before Charly leaves!). There is no need to change\nthe staking proxy account. Also, Alice is the only one who can remove P-C as a staking proxy, and\nP-C can only perform staking-related tasks. For example, P-C cannot send funds out from Alice's\naccount."]}),"\n",(0,n.jsxs)(t.p,{children:["Proxy calls can be done using the Extrinsic Tab in the Polkadot-JS UI. Nested proxy calls can be\ndone by calling each ",(0,n.jsx)(t.code,{children:"proxy.proxy"})," extrinsic separately, or in some cases by just calling the last\n",(0,n.jsx)(t.code,{children:"proxy.proxy"})," extrinsic. In the diagram above, submitting the proxy call from P-C to Alice will\nautomatically ask for Charly's signature. Thus one proxy call will trigger the second one because\nCharly's is the only ",(0,n.jsx)(t.em,{children:"any"})," proxy of P-C, and P-C cannot sign anything. While if we want to use Bob's\naccount we will need to submit all three proxy calls."]})]})}function u(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},67141:(e,t,o)=>{"use strict";o.d(t,{A:()=>s});var n=o(96540),a=o(74848);const s=function(e){var t,o=e.message,s=(0,n.useState)(!0),r=s[0],i=s[1];return(0,a.jsx)(a.Fragment,{children:r&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=o,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,o)=>{"use strict";o.d(t,{A:()=>u});var n=o(90675),a=o(10467),s=o(96540),r=o(19588),i=o(2026),c=o(11135);function l(e,t,o){return d.apply(this,arguments)}function d(){return(d=(0,a.A)((0,n.A)().mark((function e(t,o,a){var s,c,l,d,p;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,c=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return l=new r.E(s),e.next=25,i.G.create({provider:l});case 25:d=e.sent,(p=o.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=p[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return c=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return c=(c=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+p[0]+") in "+o);case 39:return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e,t,o,n){switch(t){case"humanReadable":(0,c.HumanReadable)(e,o,n);break;case"precise":(0,c.Precise)(e,o,n);break;case"blocksToDays":(0,c.BlocksToDays)(e,n);break;case"erasToDays":(0,c.ErasToDays)(e,n,o);break;case"percentage":(0,c.Percentage)(e,n);break;case"permillToPercent":(0,c.PermillToPercent)(e,n);break;case"arrayLength":(0,c.ArrayLength)(e,n);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var t=e.network,o=e.path,r=e.defaultValue,i=e.filter,c=void 0===i?void 0:i,d=(0,s.useState)(""),u=d[0],h=d[1];return t=t.toLowerCase(),(0,s.useEffect)((function(){void 0!==c?p(r.toString(),c,t,h):h(r.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,a.A)((0,n.A)().mark((function e(){var a;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(t,o,h);case 2:if(void 0!==(a=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==c?p(a,c,t,h):h(a);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(i){console.log(i)}}}),[]),u}},11135:e=>{var t="polkadot",o="kusama",n="statemine",a="statemint",s="polkadotpeople",r="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,c,l){var d=void 0;if(c===t||c===a)d=3;else if(c===o||c===n||c===s)d=6;else{if(c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),l((e=Number.isInteger(e/i[c].precision)?e/i[c].precision+" "+i[c].symbol:(e/i[c].precision).toFixed(d)+" "+i[c].symbol).toString())},Precise:function(e,t,o){o(e=(e=parseFloat(e))/i[t].precision+" "+i[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,i,c){var l=void 0;if(c===t||c===a||c==s)l=1;else{if(c!==o&&c!==n&&c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");l=4}i((e/=l).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},42030:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/nested-proxy-calls-65bdc70624a0b21a087da639743c710d.png"},2997:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/polkadot_view_proxies-5c65a3f24dc6902f1734de8887dd5696.png"},16809:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/polkadot_view_proxies_dev-c7f33e592f2c37cade0cc3d37e356aef.png"},25225:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/time-delayed-proxies-8b85523c3caac25b32d1d884af71c048.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/f0ff685a.4247cb3e.js b/assets/js/f0ff685a.4247cb3e.js deleted file mode 100644 index 3f4f4a67014a..000000000000 --- a/assets/js/f0ff685a.4247cb3e.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[2393],{63362:(e,t,o)=>{"use strict";o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>c,toc:()=>d});var n=o(74848),a=o(28453),s=(o(47379),o(67141));const r={id:"learn-guides-accounts-proxy",title:"Polkadot-JS Guides about Proxy Accounts",sidebar_label:"Proxy Guides",description:"Polkadot-JS Guides about Proxy Accounts",keyword:["guides","polkadot-js","accounts","proxy"],slug:"../learn-guides-accounts-proxy"},i=void 0,c={id:"learn/learn-guides-accounts-proxy",title:"Polkadot-JS Guides about Proxy Accounts",description:"Polkadot-JS Guides about Proxy Accounts",source:"@site/../docs/learn/learn-guides-accounts-proxy.md",sourceDirName:"learn",slug:"/learn-guides-accounts-proxy",permalink:"/docs/learn-guides-accounts-proxy",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-accounts-proxy.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1726760224e3,frontMatter:{id:"learn-guides-accounts-proxy",title:"Polkadot-JS Guides about Proxy Accounts",sidebar_label:"Proxy Guides",description:"Polkadot-JS Guides about Proxy Accounts",keyword:["guides","polkadot-js","accounts","proxy"],slug:"../learn-guides-accounts-proxy"},sidebar:"docs",previous:{title:"Multisig Guides",permalink:"/docs/learn-guides-accounts-multisig"},next:{title:"Pure Proxy Guides",permalink:"/docs/learn-guides-accounts-proxy-pure"}},l={},d=[{value:"Creating Proxy with Polkadot-JS",id:"creating-proxy-with-polkadot-js",level:2},{value:"Removing Proxy with Polkadot-JS",id:"removing-proxy-with-polkadot-js",level:2},{value:"View your Proxy on Polkadot-JS",id:"view-your-proxy-on-polkadot-js",level:2},{value:"Set-up and Use of Time-delayed Proxies with Polkadot-JS",id:"set-up-and-use-of-time-delayed-proxies-with-polkadot-js",level:2},{value:"Proxy calls",id:"proxy-calls",level:2},{value:"Nested Proxy Calls",id:"nested-proxy-calls",level:3}];function p(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",p:"p",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsxs)(t.p,{children:["Proxies allow users to use an account (it can be in cold storage or a hot wallet) less frequently\nbut actively participate in the network with the weight of the tokens in that account. Proxies are\nallowed to perform a limited amount of actions related to specific\n",(0,n.jsx)(t.a,{href:"https://docs.substrate.io/reference/frame-pallets/",children:"substrate pallets"})," on behalf of another\naccount. The videos below contain more information about using proxies."]}),"\n",(0,n.jsxs)("div",{className:"row",children:[(0,n.jsxs)("div",{className:"col text--center",children:[(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=1tcygkq52tU",children:(0,n.jsx)("img",{src:"https://img.youtube.com/vi/1tcygkq52tU/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=1tcygkq52tU",children:"Proxy Accounts Tutorial"})})]}),(0,n.jsxs)("div",{className:"col text--center",children:[(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=4437s",children:(0,n.jsx)("img",{src:"https://img.youtube.com/vi/Qv_nJVcvQr8/0.jpg",width:"350",style:{borderRadius:10,border:"1px solid slategrey"}})}),(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:"https://www.youtube.com/watch?v=Qv_nJVcvQr8&t=4437s",children:"Proxy Accounts Advanced Tutorial"})})]})]}),"\n",(0,n.jsx)(t.admonition,{title:"Know how to check the calls and pallets accessible by proxies",type:"tip",children:(0,n.jsxs)(t.p,{children:["For the latest information on the calls and pallets that can be fully accessed by proxies, check the\n",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk/blob/153543b0c8c582e73f520e5c08cbe33bddfb5f69/runtime/polkadot/src/lib.rs#L1158",children:"source code in the runtime folder"}),"\non the ",(0,n.jsx)(t.a,{href:"https://github.com/paritytech/polkadot-sdk",children:"Polkadot repository"})]})}),"\n",(0,n.jsx)(t.h2,{id:"creating-proxy-with-polkadot-js",children:"Creating Proxy with Polkadot-JS"}),"\n",(0,n.jsxs)(t.p,{children:["To create a proxy account with Polkadot-JS read\n",(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182179-how-to-create-a-proxy-account",children:"this support article"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"removing-proxy-with-polkadot-js",children:"Removing Proxy with Polkadot-JS"}),"\n",(0,n.jsxs)(t.p,{children:['Read the section "Removing Proxies" on\n',(0,n.jsx)(t.a,{href:"https://support.polkadot.network/support/solutions/articles/65000182179-how-to-create-a-proxy-account",children:"this support page"}),"\nto learn how to remove proxies."]}),"\n",(0,n.jsx)(t.h2,{id:"view-your-proxy-on-polkadot-js",children:"View your Proxy on Polkadot-JS"}),"\n",(0,n.jsxs)(t.p,{children:["To view your proxy, just go on the ",(0,n.jsx)(t.em,{children:"Accounts"})," menu in the Polkadot-JS UI, next to the proxied\naccount you will notice a blue icon. Hover on it, and you will see ",(0,n.jsx)(t.em,{children:"Proxy overview"}),". Click on it and\nyou will be presented with a list of all proxies for that account."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"polkadot_view_proxies",src:o(2997).A+"",width:"1842",height:"120"})}),"\n",(0,n.jsxs)(t.p,{children:["Additionally, you can head over to the ",(0,n.jsx)(t.em,{children:"Chain State"})," tab (underneath the ",(0,n.jsx)(t.em,{children:"Developer"})," menu) on\n",(0,n.jsx)(t.a,{href:"https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/chainstate",children:"Polkadot-JS Apps"}),". If\nyou've created your proxy on a Polkadot account, it is required to change your network accordingly\nusing the top left navigation button. On this page, the proxy pallet should be selected, returning\nthe announcements and proxies functions. The proxies function will allow you to see your created\nproxies for either one account or for all accounts (using the toggle will enable this). Proxy\nannouncements are what time lock proxies do to announce they are going to conduct an action."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"polkadot_view_proxies_dev",src:o(16809).A+"",width:"1871",height:"820"})}),"\n",(0,n.jsx)(t.h2,{id:"set-up-and-use-of-time-delayed-proxies-with-polkadot-js",children:"Set-up and Use of Time-delayed Proxies with Polkadot-JS"}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["See ",(0,n.jsx)(t.a,{href:"https://youtu.be/3L7Vu2SX0PE",children:"this video tutorial"})," to learn how you can setup and use\ntime-delayed proxies. The video goes through the example below."]})}),"\n",(0,n.jsxs)(t.p,{children:["Initially the time time-delayed proxy announces its intended action using the ",(0,n.jsx)(t.code,{children:"proxy.announce"}),"\nextrinsic and will wait for the number of blocks defined in the delay time before executing it. The\nproxy will include the hash of the intended function call in the announcement. Within this time\nwindow, the intended action may be canceled by accounts that control the proxy. This can be done by\nthe proxy itself using the ",(0,n.jsx)(t.code,{children:"proxy.removeAnnouncement"})," extrinsic or by the proxied account using the\nthe ",(0,n.jsx)(t.code,{children:"proxy.rejectAnnouncement"})," extrinsic. Now we can use proxies knowing that any malicious actions\ncan be noticed and reverted within a delay period. After the time-delay, the proxy can use the\n",(0,n.jsx)(t.code,{children:"proxy.proxyAnnounced"})," extrinsic to execute the announced call."]}),"\n",(0,n.jsx)(t.p,{children:"Let's take for example the stash account Eleanor setting Bob as a time-delayed staking proxy. In\nthis way, if Bob submits an extrinsic to change the reward destination, such extrinsic can be\nrejected by Eleanor. This implies that Eleanor monitors Bob, and that within the time-delay she can\nspot the announced extrinsic. Eleanor can check all the proxy call announcements made by her\naccount's proxies on-chain. On Polkadot-JS UI, go to Developer > Storage > Proxy > Announcements to\ncheck the hashes for the calls made by the proxy accounts and the block height at which they are\nenabled for execution."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"time-delayed proxies",src:o(25225).A+"",width:"1920",height:"800"})}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["If you try to use ",(0,n.jsx)(t.code,{children:"proxy.proxyAnnounced"}),' to execute the call within the time-delay window you will\nget an error "Proxy unannounced" since the announcement will be done after the time delay. Also note\nthat regular ',(0,n.jsx)(t.code,{children:"proxy.proxy"})," calls do not work with time-delayed proxies, you need to announce the\ncall first and then execute the announced call on a separate transaction."]})}),"\n",(0,n.jsx)(t.h2,{id:"proxy-calls",children:"Proxy calls"}),"\n",(0,n.jsxs)(t.p,{children:["Proxy calls are used by proxies to call proxied accounts. These calls are important for example in\nthe case of ",(0,n.jsx)(t.em,{children:"pure"})," proxies, as any attempt to sign transactions with a ",(0,n.jsx)(t.em,{children:"pure"})," proxy will fail. For\nmore details see the ",(0,n.jsx)(t.a,{href:"/docs/learn-proxies-pure",children:"dedicated section about pure proxies"}),"."]}),"\n",(0,n.jsx)(t.h3,{id:"nested-proxy-calls",children:"Nested Proxy Calls"}),"\n",(0,n.jsxs)(t.p,{children:["As the term suggests, nested proxy calls are proxy calls within proxy calls. Such calls are needed\nif there are proxied accounts that are proxies themselves. In the example diagram below, Alice has a\nstash account that has a ",(0,n.jsx)(t.em,{children:"staking"})," proxy account, P-C. P-C is a ",(0,n.jsx)(t.em,{children:"pure"})," proxy, a proxied account\noriginally spawned by Charly that is now an ",(0,n.jsx)(t.em,{children:"any"})," proxy of P-C and signs everything on its behalf."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"nested proxy calls",src:o(42030).A+"",width:"1920",height:"800"})}),"\n",(0,n.jsxs)(t.p,{children:["For example, to bond more funds, Charly needs to submit a ",(0,n.jsx)(t.code,{children:"prox.proxy"})," extrinsic to P-C, which in\nturn submits a ",(0,n.jsx)(t.code,{children:"proxy.proxy"})," extrinsic to Alice including for example a ",(0,n.jsx)(t.code,{children:"staking.bondExtra"}),"\nextrinsic, specifying the number of extra tokens that need to be bounded. If Charly wants to leave,\na new account can take his place as any proxy (before Charly leaves!). There is no need to change\nthe staking proxy account. Also, Alice is the only one who can remove P-C as a staking proxy, and\nP-C can only perform staking-related tasks. For example, P-C cannot send funds out from Alice's\naccount."]}),"\n",(0,n.jsxs)(t.p,{children:["Proxy calls can be done using the Extrinsic Tab in the Polkadot-JS UI. Nested proxy calls can be\ndone by calling each ",(0,n.jsx)(t.code,{children:"proxy.proxy"})," extrinsic separately, or in some cases by just calling the last\n",(0,n.jsx)(t.code,{children:"proxy.proxy"})," extrinsic. In the diagram above, submitting the proxy call from P-C to Alice will\nautomatically ask for Charly's signature. Thus one proxy call will trigger the second one because\nCharly's is the only ",(0,n.jsx)(t.em,{children:"any"})," proxy of P-C, and P-C cannot sign anything. While if we want to use Bob's\naccount we will need to submit all three proxy calls."]})]})}function u(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},67141:(e,t,o)=>{"use strict";o.d(t,{A:()=>s});var n=o(96540),a=o(74848);const s=function(e){var t,o=e.message,s=(0,n.useState)(!0),r=s[0],i=s[1];return(0,a.jsx)(a.Fragment,{children:r&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){i(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(t=o,t.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},47379:(e,t,o)=>{"use strict";o.d(t,{A:()=>u});var n=o(90675),a=o(10467),s=o(96540),r=o(19588),i=o(2026),c=o(11135);function l(e,t,o){return d.apply(this,arguments)}function d(){return(d=(0,a.A)((0,n.A)().mark((function e(t,o,a){var s,c,l,d,p;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=void 0,c=void 0,e.t0=t,e.next="polkadot"===e.t0?5:"kusama"===e.t0?7:"statemine"===e.t0?9:"statemint"===e.t0?11:"polkadotpeople"===e.t0?13:"kusamapeople"===e.t0?15:17;break;case 5:return s="wss://rpc.polkadot.io",e.abrupt("break",18);case 7:return s="wss://kusama-rpc.polkadot.io/",e.abrupt("break",18);case 9:return s="wss://statemine-rpc.polkadot.io/",e.abrupt("break",18);case 11:return s="wss://statemint-rpc.polkadot.io/",e.abrupt("break",18);case 13:return s="wss://polkadot-people-rpc.polkadot.io/",e.abrupt("break",18);case 15:return s="wss://kusama-people-rpc.polkadot.io/",e.abrupt("break",18);case 17:console.log("Unknown socket url provided, no connection made.");case 18:if(void 0!==s){e.next=22;break}return e.abrupt("return");case 22:return l=new r.E(s),e.next=25,i.G.create({provider:l});case 25:d=e.sent,(p=o.split(".")).forEach((function(e){e in d&&(d=d[e])})),e.t1=p[0],e.next="consts"===e.t1?31:"query"===e.t1?33:38;break;case 31:return c=d.toString(),e.abrupt("break",39);case 33:return e.next=35,d();case 35:return c=(c=e.sent).toString(),e.abrupt("break",39);case 38:console.log("Unknown path prefix ("+p[0]+") in "+o);case 39:return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e,t,o,n){switch(t){case"humanReadable":(0,c.HumanReadable)(e,o,n);break;case"precise":(0,c.Precise)(e,o,n);break;case"blocksToDays":(0,c.BlocksToDays)(e,n);break;case"erasToDays":(0,c.ErasToDays)(e,n,o);break;case"percentage":(0,c.Percentage)(e,n);break;case"permillToPercent":(0,c.PermillToPercent)(e,n);break;case"arrayLength":(0,c.ArrayLength)(e,n);break;default:return void console.log("Ignoring unknown filter type")}}const u=function(e){var t=e.network,o=e.path,r=e.defaultValue,i=e.filter,c=void 0===i?void 0:i,d=(0,s.useState)(""),u=d[0],h=d[1];return t=t.toLowerCase(),(0,s.useEffect)((function(){void 0!==c?p(r.toString(),c,t,h):h(r.toString());var e=void 0;switch(t){case"polkadot":e="wss://rpc.polkadot.io";break;case"kusama":e="wss://kusama-rpc.polkadot.io/";break;case"statemine":e="wss://kusama-asset-hub-rpc.polkadot.io/";break;case"statemint":e="wss://polkadot-asset-hub-rpc.polkadot.io/";break;case"kusamapeople":e="wss://kusama-people-rpc.polkadot.io";break;case"polkadotpeople":e="wss://polkadot-people-rpc.polkadot.io";break;default:console.log("Unknown network provided, "+t)}if(void 0===e)console.log("Failed to connect to a valid websocket, applying default");else{var s=function(){var e=(0,a.A)((0,n.A)().mark((function e(){var a;return(0,n.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(t,o,h);case 2:if(void 0!==(a=e.sent)){e.next=7;break}return e.abrupt("return");case 7:void 0!==c?p(a,c,t,h):h(a);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();try{s()}catch(i){console.log(i)}}}),[]),u}},11135:e=>{var t="polkadot",o="kusama",n="statemine",a="statemint",s="polkadotpeople",r="kusamapeople",i={polkadot:{precision:1e10,symbol:"DOT"},kusama:{precision:1e12,symbol:"KSM"},statemint:{precision:1e10,symbol:"DOT"},statemine:{precision:1e12,symbol:"KSM"},polkadotpeople:{precision:1e10,symbol:"DOT"},kusamapeople:{precision:1e12,symbol:"KSM"}};e.exports={HumanReadable:function(e,c,l){var d=void 0;if(c===t||c===a)d=3;else if(c===o||c===n||c===s)d=6;else{if(c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");d=8}e=parseFloat(e),l((e=Number.isInteger(e/i[c].precision)?e/i[c].precision+" "+i[c].symbol:(e/i[c].precision).toFixed(d)+" "+i[c].symbol).toString())},Precise:function(e,t,o){o(e=(e=parseFloat(e))/i[t].precision+" "+i[t].symbol)},BlocksToDays:function(e,t){t((e=6*e/86400).toString())},ErasToDays:function(e,i,c){var l=void 0;if(c===t||c===a||c==s)l=1;else{if(c!==o&&c!==n&&c!=r)return void console.log("Unknown network type found when attempting to apply 'Human Readable' filter");l=4}i((e/=l).toString())},Percentage:function(e,t){t((e/=1e7).toString())},PermillToPercent:function(e,t){t((e/=1e4).toString())},ArrayLength:function(e,t){t((e=e.split(",").length).toString())}}},42030:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/nested-proxy-calls-65bdc70624a0b21a087da639743c710d.png"},2997:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/polkadot_view_proxies-5c65a3f24dc6902f1734de8887dd5696.png"},16809:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/polkadot_view_proxies_dev-c7f33e592f2c37cade0cc3d37e356aef.png"},25225:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=o.p+"assets/images/time-delayed-proxies-8b85523c3caac25b32d1d884af71c048.png"},47790:()=>{}}]); \ No newline at end of file diff --git a/assets/js/f3027c84.39fc640c.js b/assets/js/f3027c84.39fc640c.js deleted file mode 100644 index 133f50a16c55..000000000000 --- a/assets/js/f3027c84.39fc640c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1906],{2588:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var o=s(74848),t=s(28453),a=s(67141);const i={id:"polkadotjs-ui",title:"Polkadot-JS UI (Wallet)",sidebar_label:"Polkadot-JS UI",description:"A Wallet for Power-users and Developers.",keywords:["polkadotjs","polkadotjs apps","apps UI","extension"],slug:"../polkadotjs-ui"},r=void 0,l={id:"general/polkadotjs-ui",title:"Polkadot-JS UI (Wallet)",description:"A Wallet for Power-users and Developers.",source:"@site/../docs/general/polkadotjs-ui.md",sourceDirName:"general",slug:"/polkadotjs-ui",permalink:"/docs/polkadotjs-ui",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/polkadotjs-ui.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727943421e3,frontMatter:{id:"polkadotjs-ui",title:"Polkadot-JS UI (Wallet)",sidebar_label:"Polkadot-JS UI",description:"A Wallet for Power-users and Developers.",keywords:["polkadotjs","polkadotjs apps","apps UI","extension"],slug:"../polkadotjs-ui"},sidebar:"docs",previous:{title:"Polkadot-JS Tooling",permalink:"/docs/polkadotjs"},next:{title:"Polkadot-JS Guides",permalink:"/docs/learn-polkadot-js-guides"}},d={},c=[{value:"Main Functionalities",id:"main-functionalities",level:2},{value:"Accounts",id:"accounts",level:3},{value:"Network (Staking)",id:"network-staking",level:3},{value:"Settings",id:"settings",level:3},{value:"Other Functionalities",id:"other-functionalities",level:2},{value:"Network",id:"network",level:3},{value:"Governance",id:"governance",level:3},{value:"Developer",id:"developer",level:3},{value:"Beginner's Guide to Polkadot-JS",id:"beginners-guide-to-polkadot-js",level:2}];function h(e){const n={a:"a",blockquote:"blockquote",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/explorer",children:(0,o.jsx)(n.strong,{children:"Polkadot-JS UI"})})," is the native application for\naccessing all features available on Substrate chains as Polkadot and Kusama. The UI is one of the\nmoving parts of ",(0,o.jsx)(n.a,{href:"/docs/polkadotjs",children:(0,o.jsx)(n.strong,{children:"Polkadot-JS tool collection"})}),", and its functionalities go\nbeyond normal wallet functionalities such as transfers."]}),"\n",(0,o.jsxs)(n.blockquote,{children:["\n",(0,o.jsxs)(n.p,{children:["Note that the UI may not precisely align with the functionality of individual parachains. For more\ninformation see the ",(0,o.jsx)(n.a,{href:"/docs/polkadotjs#polkadot-js-api",children:(0,o.jsx)(n.strong,{children:"Polkadot-JS Page"})}),"."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"main-functionalities",children:"Main Functionalities"}),"\n",(0,o.jsx)(n.p,{children:"Here we describe those functionalities that will likely be useful to most users. Those\nfunctionalities include account generation, balance transfers, and staking."}),"\n",(0,o.jsx)(n.h3,{id:"accounts",children:"Accounts"}),"\n",(0,o.jsxs)(n.p,{children:["In this section of the UI, you can see accounts injected from a browser extension, such as the\n",(0,o.jsx)(n.a,{href:"/docs/polkadotjs#polkadot-js-extension",children:(0,o.jsx)(n.strong,{children:"Polkadot-JS Extension"})})," or\n",(0,o.jsx)(n.a,{href:"/docs/wallets-and-extensions#browser-extensions",children:(0,o.jsx)(n.strong,{children:"other in-browser wallets"})}),". It is also possible\nto expand balance details and see different\n",(0,o.jsx)(n.a,{href:"/docs/learn-account-balances#balance-types-on-polkadot-js",children:(0,o.jsx)(n.strong,{children:"account balance types"})}),". You\ncan also:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Add an account (this option must be enabled under ",(0,o.jsx)(n.a,{href:"#settings",children:"Settings"}),"). Note that if you clear\nthe cache of your browser, you will lose it, and you will need to recover it through seed phrase\nor JSON file."]}),"\n",(0,o.jsx)(n.li,{children:"Recover and account from JSON file."}),"\n",(0,o.jsx)(n.li,{children:"Add an account from QR code."}),"\n",(0,o.jsxs)(n.li,{children:["Add an account from a ",(0,o.jsx)(n.a,{href:"/docs/ledger",children:(0,o.jsx)(n.strong,{children:"Ledger"})})," device (this option must be enabled under\n",(0,o.jsx)(n.a,{href:"#settings",children:"Settings"}),")."]}),"\n",(0,o.jsxs)(n.li,{children:["Create a ",(0,o.jsx)(n.a,{href:"/docs/learn-account-multisig",children:(0,o.jsx)(n.strong,{children:"multi-signature account"})}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Add a proxied account (see\n",(0,o.jsx)(n.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:(0,o.jsx)(n.strong,{children:"Pure Proxies"})})," for more\ninformation)."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["For each account visible in the UI, you can perform different actions, including\n",(0,o.jsx)(n.a,{href:"/docs/learn-proxies",children:(0,o.jsx)(n.strong,{children:"adding a proxy"})}),",\n",(0,o.jsx)(n.a,{href:"/docs/learn-identity",children:(0,o.jsx)(n.strong,{children:"setting an identity"})}),", and\n",(0,o.jsx)(n.a,{href:"/docs/learn-transactions#balance-transfers",children:(0,o.jsx)(n.strong,{children:"sending tokens"})}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["For more information about adding and recovering accounts, see the\n",(0,o.jsx)(n.a,{href:"/docs/learn-accounts#account-generation",children:(0,o.jsx)(n.strong,{children:"Account Generation"})})," page."]}),"\n",(0,o.jsx)(n.h3,{id:"network-staking",children:"Network (Staking)"}),"\n",(0,o.jsxs)(n.p,{children:["In this section of the UI, you can participate in ",(0,o.jsx)(n.a,{href:"/docs/learn-staking",children:(0,o.jsx)(n.strong,{children:"staking"})}),". In the\nStaking menu you can access:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Overview"})," tab showing active or waiting validators."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Accounts"})," tab (visible only if you added an account) showing accounts that are currently\nused for staking\n(",(0,o.jsx)(n.a,{href:"/docs/learn-staking#stash-account-and-staking-proxy",children:(0,o.jsx)(n.strong,{children:"stash and staking proxy"})}),"), bonded\namount, and nominations. In this tab, you can do staking-related transactions such as bonding more\nfunds or changing nominations. If you have\n",(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced#staking-proxies",children:(0,o.jsx)(n.strong,{children:"staking proxies"})})," here, you can use them\nwhile signing for staking-related transactions."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Payouts"})," tab (visible only if you added an account) showing any pending rewards that still\nneed to be paid out to you."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Pool"})," tab showing all registered ",(0,o.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:(0,o.jsx)(n.strong,{children:"nomination pool"})}),"\nwith the respective state (open, blocked, or destroying). This tab can also be used to create and\njoin a pool."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Targets"})," tab showing detailed information about validators such as commission and return.\nMore information can be found in the ",(0,o.jsx)(n.a,{href:"/docs/learn-nominator",children:(0,o.jsx)(n.strong,{children:"Nominator Page"})}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Bags"}),' tab (visible only if you added an account) showing the bag you are in ("My bags") and\nall bags within the ',(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:(0,o.jsx)(n.strong,{children:"bags list"})}),". Here (if\napplicable), you can rebag accounts that do not belong to the bag you are in, and you can move\nyour account in front of the account having less stake than you."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Slashes"})," tab showing if there are any global ",(0,o.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashes"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Validator stats"})," tab showing statistics for a chosen validator."]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"settings",children:"Settings"}),"\n",(0,o.jsx)(n.p,{children:"In this UI section, you can change general settings such as appearance and language. You can also:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Allow local in-browser account storage. This is used to add accounts directly in the UI (which\ndiffers from having an account injected from a browser extension)."}),"\n",(0,o.jsx)(n.li,{children:"Choose to attach Ledger devices. This adds an account directly in the UI from a Ledger device."}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Under Settings you can also do the metadata update. Usually, if there is an update, this will be\nshown as a notification. For more information about metadata updates, see the\n",(0,o.jsx)(n.a,{href:"/docs/learn-guides-accounts#metadata-updates-with-the-polkadot-js-browser-extension",children:(0,o.jsx)(n.strong,{children:"dedicated section"})}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"other-functionalities",children:"Other Functionalities"}),"\n",(0,o.jsx)(n.p,{children:"In this section, we describe those functionalities that will less likely interest the average user."}),"\n",(0,o.jsx)(n.h3,{id:"network",children:"Network"}),"\n",(0,o.jsx)(n.p,{children:"In addition to staking, in the Network section, you can also:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"See the Explorer with the most recent blocks and events."}),"\n",(0,o.jsxs)(n.li,{children:["Inspect ",(0,o.jsx)(n.a,{href:"/docs/learn-parachains",children:(0,o.jsx)(n.strong,{children:"parachains"})}),"."]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"governance",children:"Governance"}),"\n",(0,o.jsxs)(n.p,{children:["In this section of the UI, you can participate in\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:(0,o.jsx)(n.strong,{children:"governance"})}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"developer",children:"Developer"}),"\n",(0,o.jsx)(n.p,{children:"In this section of the UI, you can access advanced features such as:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"Query on-chain data"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/rpc",children:"Query the node using RPC calls"})}),"\n",(0,o.jsxs)(n.li,{children:["Call ",(0,o.jsx)(n.a,{href:"/docs/learn-transactions",children:(0,o.jsx)(n.strong,{children:"extrinsics"})})," using your account (you are able to see this\noption only if you have an account in the UI)"]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsic tab"})," provides the use to access more\ngranular functions such as\n",(0,o.jsx)(n.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:(0,o.jsx)(n.strong,{children:"pure proxies"})})," and\n",(0,o.jsx)(n.a,{href:"/docs/learn-proxies#time-delayed-proxy",children:(0,o.jsx)(n.strong,{children:"time-delayed proxies"})}),", change\n",(0,o.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:(0,o.jsx)(n.strong,{children:"nomination pool"})})," settings (nomination and roles) and use\n",(0,o.jsx)(n.a,{href:"/docs/learn-proxies#non-transfer-proxy",children:(0,o.jsx)(n.strong,{children:"non-transfer proxies"})}),",\n",(0,o.jsx)(n.a,{href:"/docs/learn-assets#destroying-an-asset",children:(0,o.jsx)(n.strong,{children:"destroy assets"})}),", and much more."]}),"\n",(0,o.jsx)(n.h2,{id:"beginners-guide-to-polkadot-js",children:"Beginner's Guide to Polkadot-JS"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=4EQqwGFV1D8",children:"Introduction to Polkadot-JS"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=sy7lvAqyzkY",children:"Create an account using Polkadot-JS"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=g4b4IWR6OrE",children:"Network Explorer on Polkadot-JS UI"})}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,n,s)=>{s.d(n,{A:()=>a});var o=s(96540),t=s(74848);const a=function(e){var n,s=e.message,a=(0,o.useState)(!0),i=a[0],r=a[1];return(0,t.jsx)(t.Fragment,{children:i&&(0,t.jsxs)("div",{className:"message-box",children:[(0,t.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,t.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=s,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>r});var o=s(96540);const t={},a=o.createContext(t);function i(e){const n=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),o.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f3027c84.40db5984.js b/assets/js/f3027c84.40db5984.js new file mode 100644 index 000000000000..462e12ee709e --- /dev/null +++ b/assets/js/f3027c84.40db5984.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1906],{2588:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var o=s(74848),t=s(28453),a=s(67141);const i={id:"polkadotjs-ui",title:"Polkadot-JS UI (Wallet)",sidebar_label:"Polkadot-JS UI",description:"A Wallet for Power-users and Developers.",keywords:["polkadotjs","polkadotjs apps","apps UI","extension"],slug:"../polkadotjs-ui"},r=void 0,l={id:"general/polkadotjs-ui",title:"Polkadot-JS UI (Wallet)",description:"A Wallet for Power-users and Developers.",source:"@site/../docs/general/polkadotjs-ui.md",sourceDirName:"general",slug:"/polkadotjs-ui",permalink:"/docs/polkadotjs-ui",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/general/polkadotjs-ui.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"polkadotjs-ui",title:"Polkadot-JS UI (Wallet)",sidebar_label:"Polkadot-JS UI",description:"A Wallet for Power-users and Developers.",keywords:["polkadotjs","polkadotjs apps","apps UI","extension"],slug:"../polkadotjs-ui"},sidebar:"docs",previous:{title:"Polkadot-JS Tooling",permalink:"/docs/polkadotjs"},next:{title:"Polkadot-JS Guides",permalink:"/docs/learn-polkadot-js-guides"}},c={},d=[{value:"Main Functionalities",id:"main-functionalities",level:2},{value:"Accounts",id:"accounts",level:3},{value:"Network (Staking)",id:"network-staking",level:3},{value:"Settings",id:"settings",level:3},{value:"Other Functionalities",id:"other-functionalities",level:2},{value:"Network",id:"network",level:3},{value:"Governance",id:"governance",level:3},{value:"Developer",id:"developer",level:3},{value:"Beginner's Guide to Polkadot-JS",id:"beginners-guide-to-polkadot-js",level:2}];function h(e){const n={a:"a",blockquote:"blockquote",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/explorer",children:(0,o.jsx)(n.strong,{children:"Polkadot-JS UI"})})," is the native application for\naccessing all features available on Substrate chains as Polkadot and Kusama. The UI is one of the\nmoving parts of ",(0,o.jsx)(n.a,{href:"/docs/polkadotjs",children:(0,o.jsx)(n.strong,{children:"Polkadot-JS tool collection"})}),", and its functionalities go\nbeyond normal wallet functionalities such as transfers."]}),"\n",(0,o.jsxs)(n.blockquote,{children:["\n",(0,o.jsxs)(n.p,{children:["Note that the UI may not precisely align with the functionality of individual parachains. For more\ninformation see the ",(0,o.jsx)(n.a,{href:"/docs/polkadotjs#polkadot-js-api",children:(0,o.jsx)(n.strong,{children:"Polkadot-JS Page"})}),"."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"main-functionalities",children:"Main Functionalities"}),"\n",(0,o.jsx)(n.p,{children:"Here we describe those functionalities that will likely be useful to most users. Those\nfunctionalities include account generation, balance transfers, and staking."}),"\n",(0,o.jsx)(n.h3,{id:"accounts",children:"Accounts"}),"\n",(0,o.jsxs)(n.p,{children:["In this section of the UI, you can see accounts injected from a browser extension, such as the\n",(0,o.jsx)(n.a,{href:"/docs/polkadotjs#polkadot-js-extension",children:(0,o.jsx)(n.strong,{children:"Polkadot-JS Extension"})})," or\n",(0,o.jsx)(n.a,{href:"/docs/wallets-and-extensions#browser-extensions",children:(0,o.jsx)(n.strong,{children:"other in-browser wallets"})}),". It is also possible\nto expand balance details and see different\n",(0,o.jsx)(n.a,{href:"/docs/learn-account-balances#balance-types-on-polkadot-js",children:(0,o.jsx)(n.strong,{children:"account balance types"})}),". You\ncan also:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Add an account (this option must be enabled under ",(0,o.jsx)(n.a,{href:"#settings",children:"Settings"}),"). Note that if you clear\nthe cache of your browser, you will lose it, and you will need to recover it through seed phrase\nor JSON file."]}),"\n",(0,o.jsx)(n.li,{children:"Recover and account from JSON file."}),"\n",(0,o.jsx)(n.li,{children:"Add an account from QR code."}),"\n",(0,o.jsxs)(n.li,{children:["Add an account from a ",(0,o.jsx)(n.a,{href:"/docs/ledger",children:(0,o.jsx)(n.strong,{children:"Ledger"})})," device (this option must be enabled under\n",(0,o.jsx)(n.a,{href:"#settings",children:"Settings"}),")."]}),"\n",(0,o.jsxs)(n.li,{children:["Create a ",(0,o.jsx)(n.a,{href:"/docs/learn-account-multisig",children:(0,o.jsx)(n.strong,{children:"multi-signature account"})}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Add a proxied account (see\n",(0,o.jsx)(n.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:(0,o.jsx)(n.strong,{children:"Pure Proxies"})})," for more\ninformation)."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["For each account visible in the UI, you can perform different actions, including\n",(0,o.jsx)(n.a,{href:"/docs/learn-proxies",children:(0,o.jsx)(n.strong,{children:"adding a proxy"})}),",\n",(0,o.jsx)(n.a,{href:"/docs/learn-identity",children:(0,o.jsx)(n.strong,{children:"setting an identity"})}),", and\n",(0,o.jsx)(n.a,{href:"/docs/learn-transactions#balance-transfers",children:(0,o.jsx)(n.strong,{children:"sending tokens"})}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["For more information about adding and recovering accounts, see the\n",(0,o.jsx)(n.a,{href:"/docs/learn-accounts#account-generation",children:(0,o.jsx)(n.strong,{children:"Account Generation"})})," page."]}),"\n",(0,o.jsx)(n.h3,{id:"network-staking",children:"Network (Staking)"}),"\n",(0,o.jsxs)(n.p,{children:["In this section of the UI, you can participate in ",(0,o.jsx)(n.a,{href:"/docs/learn-staking",children:(0,o.jsx)(n.strong,{children:"staking"})}),". In the\nStaking menu you can access:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Overview"})," tab showing active or waiting validators."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Accounts"})," tab (visible only if you added an account) showing accounts that are currently\nused for staking\n(",(0,o.jsx)(n.a,{href:"/docs/learn-staking#stash-account-and-staking-proxy",children:(0,o.jsx)(n.strong,{children:"stash and staking proxy"})}),"), bonded\namount, and nominations. In this tab, you can do staking-related transactions such as bonding more\nfunds or changing nominations. If you have\n",(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced#staking-proxies",children:(0,o.jsx)(n.strong,{children:"staking proxies"})})," here, you can use them\nwhile signing for staking-related transactions."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Payouts"})," tab (visible only if you added an account) showing any pending rewards that still\nneed to be paid out to you."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Pool"})," tab showing all registered ",(0,o.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:(0,o.jsx)(n.strong,{children:"nomination pool"})}),"\nwith the respective state (open, blocked, or destroying). This tab can also be used to create and\njoin a pool."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Targets"})," tab showing detailed information about validators such as commission and return.\nMore information can be found in the ",(0,o.jsx)(n.a,{href:"/docs/learn-nominator",children:(0,o.jsx)(n.strong,{children:"Nominator Page"})}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Bags"}),' tab (visible only if you added an account) showing the bag you are in ("My bags") and\nall bags within the ',(0,o.jsx)(n.a,{href:"/docs/learn-staking-advanced#bags-list",children:(0,o.jsx)(n.strong,{children:"bags list"})}),". Here (if\napplicable), you can rebag accounts that do not belong to the bag you are in, and you can move\nyour account in front of the account having less stake than you."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Slashes"})," tab showing if there are any global ",(0,o.jsx)(n.a,{href:"/docs/learn-offenses",children:"slashes"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Validator stats"})," tab showing statistics for a chosen validator."]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"settings",children:"Settings"}),"\n",(0,o.jsx)(n.p,{children:"In this UI section, you can change general settings such as appearance and language. You can also:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Allow local in-browser account storage. This is used to add accounts directly in the UI (which\ndiffers from having an account injected from a browser extension)."}),"\n",(0,o.jsx)(n.li,{children:"Choose to attach Ledger devices. This adds an account directly in the UI from a Ledger device."}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Under Settings you can also do the metadata update. Usually, if there is an update, this will be\nshown as a notification. For more information about metadata updates, see the\n",(0,o.jsx)(n.a,{href:"/docs/learn-guides-accounts#metadata-updates-with-the-polkadot-js-browser-extension",children:(0,o.jsx)(n.strong,{children:"dedicated section"})}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"other-functionalities",children:"Other Functionalities"}),"\n",(0,o.jsx)(n.p,{children:"In this section, we describe those functionalities that will less likely interest the average user."}),"\n",(0,o.jsx)(n.h3,{id:"network",children:"Network"}),"\n",(0,o.jsx)(n.p,{children:"In addition to staking, in the Network section, you can also:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"See the Explorer with the most recent blocks and events."}),"\n",(0,o.jsxs)(n.li,{children:["Inspect ",(0,o.jsx)(n.a,{href:"/docs/learn-parachains",children:(0,o.jsx)(n.strong,{children:"parachains"})}),"."]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"governance",children:"Governance"}),"\n",(0,o.jsxs)(n.p,{children:["In this section of the UI, you can participate in\n",(0,o.jsx)(n.a,{href:"/docs/learn-polkadot-opengov",children:(0,o.jsx)(n.strong,{children:"governance"})}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"developer",children:"Developer"}),"\n",(0,o.jsx)(n.p,{children:"In this section of the UI, you can access advanced features such as:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/chainstate",children:"Query on-chain data"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/rpc",children:"Query the node using RPC calls"})}),"\n",(0,o.jsxs)(n.li,{children:["Call ",(0,o.jsx)(n.a,{href:"/docs/learn-transactions",children:(0,o.jsx)(n.strong,{children:"extrinsics"})})," using your account (you are able to see this\noption only if you have an account in the UI)"]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"https://polkadot.js.org/apps/#/extrinsics",children:"Extrinsic tab"})," provides the use to access more\ngranular functions such as\n",(0,o.jsx)(n.a,{href:"/docs/learn-proxies-pure#anonymous-proxy-pure-proxy",children:(0,o.jsx)(n.strong,{children:"pure proxies"})})," and\n",(0,o.jsx)(n.a,{href:"/docs/learn-proxies#time-delayed-proxy",children:(0,o.jsx)(n.strong,{children:"time-delayed proxies"})}),", change\n",(0,o.jsx)(n.a,{href:"/docs/learn-nomination-pools",children:(0,o.jsx)(n.strong,{children:"nomination pool"})})," settings (nomination and roles) and use\n",(0,o.jsx)(n.a,{href:"/docs/learn-proxies#non-transfer-proxy",children:(0,o.jsx)(n.strong,{children:"non-transfer proxies"})}),",\n",(0,o.jsx)(n.a,{href:"/docs/learn-assets#destroying-an-asset",children:(0,o.jsx)(n.strong,{children:"destroy assets"})}),", and much more."]}),"\n",(0,o.jsx)(n.h2,{id:"beginners-guide-to-polkadot-js",children:"Beginner's Guide to Polkadot-JS"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=4EQqwGFV1D8",children:"Introduction to Polkadot-JS"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=sy7lvAqyzkY",children:"Create an account using Polkadot-JS"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=g4b4IWR6OrE",children:"Network Explorer on Polkadot-JS UI"})}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},67141:(e,n,s)=>{s.d(n,{A:()=>a});var o=s(96540),t=s(74848);const a=function(e){var n,s=e.message,a=(0,o.useState)(!0),i=a[0],r=a[1];return(0,t.jsx)(t.Fragment,{children:i&&(0,t.jsxs)("div",{className:"message-box",children:[(0,t.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,t.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(n=s,n.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},28453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>r});var o=s(96540);const t={},a=o.createContext(t);function i(e){const n=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),o.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f7acb151.2b827000.js b/assets/js/f7acb151.2b827000.js deleted file mode 100644 index 2d1122249918..000000000000 --- a/assets/js/f7acb151.2b827000.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2783],{43143:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>d,toc:()=>c});var n=t(74848),a=t(28453),o=t(67141);const i={id:"learn-guides-assets-create",title:"Polkadot-JS Guides about Creating Assets",sidebar_label:"Create Asset Guides",description:"Polkadot-JS Guides about Creating Assets.",keywords:["asset hub","assets","statemine","statemint","polkadot-js"],slug:"../learn-guides-assets-create"},r=void 0,d={id:"learn/learn-guides-assets-create",title:"Polkadot-JS Guides about Creating Assets",description:"Polkadot-JS Guides about Creating Assets.",source:"@site/../docs/learn/learn-guides-assets-create.md",sourceDirName:"learn",slug:"/learn-guides-assets-create",permalink:"/docs/learn-guides-assets-create",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-assets-create.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1727991122e3,frontMatter:{id:"learn-guides-assets-create",title:"Polkadot-JS Guides about Creating Assets",sidebar_label:"Create Asset Guides",description:"Polkadot-JS Guides about Creating Assets.",keywords:["asset hub","assets","statemine","statemint","polkadot-js"],slug:"../learn-guides-assets-create"},sidebar:"docs",previous:{title:"Asset Hub Guides",permalink:"/docs/learn-guides-assets"},next:{title:"Asset Conversion Tutorials",permalink:"/docs/learn-guides-asset-conversion"}},l={},c=[{value:"Creating Assets on the Asset Hub with Polkadot-JS",id:"creating-assets-on-the-asset-hub-with-polkadot-js",level:2}];function h(e){const s={a:"a",admonition:"admonition",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsxs)(s.p,{children:["The Asset Hub is a generic assets system parachain which provides functionality for deploying and\ntransferring assets \u2014 both Fungible and Non-Fungible Tokens (NFTs). The native token of the Asset\nhub is the same as the relay chain's native asset (DOT or KSM). The Existential Deposit (ED),\ntransaction fees, and the deposits for proxy/multisig operations are about\n",(0,n.jsx)(s.a,{href:"/docs/chain-state-values#existential-deposit-2",children:"1/10th of the values on the relay chains"}),".\nApart from the native token, the assets held on the Asset Hub can be broadly categorized as"]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Assets backed by an on-chain protocol\u2019s utility"}),"\n",(0,n.jsx)(s.li,{children:"Assets with off-chain backing"}),"\n",(0,n.jsx)(s.li,{children:"Assets without any backing"}),"\n"]}),"\n",(0,n.jsxs)(s.p,{children:["For additional background on the Asset Hub check out\n",(0,n.jsx)(s.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181800-what-is-statemint-and-statemine-and-how-do-i-use-them-",children:"this support article"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"creating-assets-on-the-asset-hub-with-polkadot-js",children:"Creating Assets on the Asset Hub with Polkadot-JS"}),"\n",(0,n.jsxs)(s.admonition,{type:"info",children:[(0,n.jsxs)(s.p,{children:["Before minting assets on the Asset Hub, we recommend that you try out this tutorial on Westend Asset\nHub, which is a system parachain on Westend test network. The WND tokens (Westies) can be teleported\nfrom Westend to Westend Asset Hub, are available for free through a\n",(0,n.jsx)(s.a,{href:"/docs/learn-DOT#getting-tokens-on-the-westend-testnet",children:"faucet"}),"."]}),(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"The images in the guides below are for Polkadot, but they also apply to Kusama."})})]}),"\n",(0,n.jsxs)(s.p,{children:["To create an asset on the Asset Hub, you would need to\n",(0,n.jsx)(s.a,{href:"/docs/chain-state-values#asset-deposit",children:"deposit some funds"}),". Before you create an asset on\nthe Asset Hub, ensure that your Asset Hub account balance is a bit more than the sum of those two\ndeposits, which should seamlessly account for the required deposits and transaction fees. You can\nsend the native token from a relay chain account to a the Asset Hub account using the teleport\nfunctionality. For instructions on teleporting tokens, check this\n",(0,n.jsx)(s.a,{href:"/docs/learn-teleport",children:"page on Teleports"}),"."]}),"\n",(0,n.jsx)(s.p,{children:"Assuming you have the required balance on your Asset Hub account, the following instructions should\nlet you successfully create an asset on the Asset Hub"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["Access the Asset Hub through ",(0,n.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS UI"}),"."]}),"\n",(0,n.jsx)(s.li,{children:"Navigate to Network > Assets."}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Navigate to Assets page",src:t(99776).A+"",width:"1710",height:"554"})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Click on the create button and you will be presented with a pop-up window. Choose the creator\naccount, name of the asset to be displayed on the Asset Hub, the asset's symbol, number of\ndecimals for the asset, the minimum balance required to hold this asset on an Asset Hub account\nand the most important field of your asset - the unique asset ID. The UI would not let you enter\nan ID that has already been taken. After all the details are entered, click on the next button."}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Add Asset Metadata",src:t(23977).A+"",width:"1510",height:"798"})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Choose the admin, issuer and the freezer accounts for your asset and click on the create button."}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Asset managing accounts",src:t(59442).A+"",width:"1518",height:"510"})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Sign and submit the transaction (If you like to verify the transaction details before signing, you\ncan click on the dropdown button pointed by the arrow in the snapshot below)."}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Sign asset creating transaction",src:t(80987).A+"",width:"1520",height:"610"})}),"\n",(0,n.jsx)(s.p,{children:"If the transaction is successful, you should see the asset and its details displayed in the\nNetwork > Assets page on the Asset Hub."})]})}function u(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},67141:(e,s,t)=>{t.d(s,{A:()=>o});var n=t(96540),a=t(74848);const o=function(e){var s,t=e.message,o=(0,n.useState)(!0),i=o[0],r=o[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=t,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},99776:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-0-71cbceb69c712729d7920b4575ab8f46.png"},23977:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-1-6f406281abdca9f5c2941ebd4d9479fd.png"},59442:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-2-2fd6118841d0c4e037d5f51c6b1010e1.png"},80987:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-3-3952e84a1b7c80239e8fb1f907af2583.png"},28453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>r});var n=t(96540);const a={},o=n.createContext(a);function i(e){const s=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),n.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f7acb151.ca2168e5.js b/assets/js/f7acb151.ca2168e5.js new file mode 100644 index 000000000000..b1bfd7b6d9e4 --- /dev/null +++ b/assets/js/f7acb151.ca2168e5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2783],{43143:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>d,toc:()=>c});var n=t(74848),a=t(28453),o=t(67141);const i={id:"learn-guides-assets-create",title:"Polkadot-JS Guides about Creating Assets",sidebar_label:"Create Asset Guides",description:"Polkadot-JS Guides about Creating Assets.",keywords:["asset hub","assets","statemine","statemint","polkadot-js"],slug:"../learn-guides-assets-create"},r=void 0,d={id:"learn/learn-guides-assets-create",title:"Polkadot-JS Guides about Creating Assets",description:"Polkadot-JS Guides about Creating Assets.",source:"@site/../docs/learn/learn-guides-assets-create.md",sourceDirName:"learn",slug:"/learn-guides-assets-create",permalink:"/docs/learn-guides-assets-create",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-assets-create.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-assets-create",title:"Polkadot-JS Guides about Creating Assets",sidebar_label:"Create Asset Guides",description:"Polkadot-JS Guides about Creating Assets.",keywords:["asset hub","assets","statemine","statemint","polkadot-js"],slug:"../learn-guides-assets-create"},sidebar:"docs",previous:{title:"Asset Hub Guides",permalink:"/docs/learn-guides-assets"},next:{title:"Asset Conversion Tutorials",permalink:"/docs/learn-guides-asset-conversion"}},l={},c=[{value:"Creating Assets on the Asset Hub with Polkadot-JS",id:"creating-assets-on-the-asset-hub-with-polkadot-js",level:2}];function h(e){const s={a:"a",admonition:"admonition",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsxs)(s.p,{children:["The Asset Hub is a generic assets system parachain which provides functionality for deploying and\ntransferring assets \u2014 both Fungible and Non-Fungible Tokens (NFTs). The native token of the Asset\nhub is the same as the relay chain's native asset (DOT or KSM). The Existential Deposit (ED),\ntransaction fees, and the deposits for proxy/multisig operations are about\n",(0,n.jsx)(s.a,{href:"/docs/chain-state-values#existential-deposit-2",children:"1/10th of the values on the relay chains"}),".\nApart from the native token, the assets held on the Asset Hub can be broadly categorized as"]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Assets backed by an on-chain protocol\u2019s utility"}),"\n",(0,n.jsx)(s.li,{children:"Assets with off-chain backing"}),"\n",(0,n.jsx)(s.li,{children:"Assets without any backing"}),"\n"]}),"\n",(0,n.jsxs)(s.p,{children:["For additional background on the Asset Hub check out\n",(0,n.jsx)(s.a,{href:"https://support.polkadot.network/support/solutions/articles/65000181800-what-is-statemint-and-statemine-and-how-do-i-use-them-",children:"this support article"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"creating-assets-on-the-asset-hub-with-polkadot-js",children:"Creating Assets on the Asset Hub with Polkadot-JS"}),"\n",(0,n.jsxs)(s.admonition,{type:"info",children:[(0,n.jsxs)(s.p,{children:["Before minting assets on the Asset Hub, we recommend that you try out this tutorial on Westend Asset\nHub, which is a system parachain on Westend test network. The WND tokens (Westies) can be teleported\nfrom Westend to Westend Asset Hub, are available for free through a\n",(0,n.jsx)(s.a,{href:"/docs/learn-DOT#getting-tokens-on-the-westend-testnet",children:"faucet"}),"."]}),(0,n.jsx)(s.p,{children:(0,n.jsx)(s.strong,{children:"The images in the guides below are for Polkadot, but they also apply to Kusama."})})]}),"\n",(0,n.jsxs)(s.p,{children:["To create an asset on the Asset Hub, you would need to\n",(0,n.jsx)(s.a,{href:"/docs/chain-state-values#asset-deposit",children:"deposit some funds"}),". Before you create an asset on\nthe Asset Hub, ensure that your Asset Hub account balance is a bit more than the sum of those two\ndeposits, which should seamlessly account for the required deposits and transaction fees. You can\nsend the native token from a relay chain account to a the Asset Hub account using the teleport\nfunctionality. For instructions on teleporting tokens, check this\n",(0,n.jsx)(s.a,{href:"/docs/learn-teleport",children:"page on Teleports"}),"."]}),"\n",(0,n.jsx)(s.p,{children:"Assuming you have the required balance on your Asset Hub account, the following instructions should\nlet you successfully create an asset on the Asset Hub"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["Access the Asset Hub through ",(0,n.jsx)(s.a,{href:"https://polkadot.js.org/apps/#/explorer",children:"Polkadot-JS UI"}),"."]}),"\n",(0,n.jsx)(s.li,{children:"Navigate to Network > Assets."}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Navigate to Assets page",src:t(99776).A+"",width:"1710",height:"554"})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Click on the create button and you will be presented with a pop-up window. Choose the creator\naccount, name of the asset to be displayed on the Asset Hub, the asset's symbol, number of\ndecimals for the asset, the minimum balance required to hold this asset on an Asset Hub account\nand the most important field of your asset - the unique asset ID. The UI would not let you enter\nan ID that has already been taken. After all the details are entered, click on the next button."}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Add Asset Metadata",src:t(23977).A+"",width:"1510",height:"798"})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Choose the admin, issuer and the freezer accounts for your asset and click on the create button."}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Asset managing accounts",src:t(59442).A+"",width:"1518",height:"510"})}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Sign and submit the transaction (If you like to verify the transaction details before signing, you\ncan click on the dropdown button pointed by the arrow in the snapshot below)."}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Sign asset creating transaction",src:t(80987).A+"",width:"1520",height:"610"})}),"\n",(0,n.jsx)(s.p,{children:"If the transaction is successful, you should see the asset and its details displayed in the\nNetwork > Assets page on the Asset Hub."})]})}function u(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},67141:(e,s,t)=>{t.d(s,{A:()=>o});var n=t(96540),a=t(74848);const o=function(e){var s,t=e.message,o=(0,n.useState)(!0),i=o[0],r=o[1];return(0,a.jsx)(a.Fragment,{children:i&&(0,a.jsxs)("div",{className:"message-box",children:[(0,a.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,a.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=t,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},99776:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-0-71cbceb69c712729d7920b4575ab8f46.png"},23977:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-1-6f406281abdca9f5c2941ebd4d9479fd.png"},59442:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-2-2fd6118841d0c4e037d5f51c6b1010e1.png"},80987:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/hub-asset-3-3952e84a1b7c80239e8fb1f907af2583.png"},28453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>r});var n=t(96540);const a={},o=n.createContext(a);function i(e){const s=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),n.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fda65b2b.96d1df5f.js b/assets/js/fda65b2b.96d1df5f.js deleted file mode 100644 index 0bbc5204c95a..000000000000 --- a/assets/js/fda65b2b.96d1df5f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6225],{54276:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>a,metadata:()=>d,toc:()=>l});var n=t(74848),o=t(28453),i=t(67141);const a={id:"learn-guides-asset-conversion",title:"Asset Conversion Tutorials",sidebar_label:"Asset Conversion Tutorials",description:"Asset Conversion implementation details on AssetHub.",keywords:["Assets","DEX","Exchange","Pools","Tokens"],slug:"../learn-guides-asset-conversion"},r=void 0,d={id:"learn/learn-guides-asset-conversion",title:"Asset Conversion Tutorials",description:"Asset Conversion implementation details on AssetHub.",source:"@site/../docs/learn/learn-guides-asset-conversion.md",sourceDirName:"learn",slug:"/learn-guides-asset-conversion",permalink:"/docs/learn-guides-asset-conversion",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-asset-conversion.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729152709e3,frontMatter:{id:"learn-guides-asset-conversion",title:"Asset Conversion Tutorials",sidebar_label:"Asset Conversion Tutorials",description:"Asset Conversion implementation details on AssetHub.",keywords:["Assets","DEX","Exchange","Pools","Tokens"],slug:"../learn-guides-asset-conversion"},sidebar:"docs",previous:{title:"Create Asset Guides",permalink:"/docs/learn-guides-assets-create"},next:{title:"Bridge Hub Guides",permalink:"/docs/learn-guides-bridges"}},c={},l=[{value:"Create a Liquidity Pool",id:"create-a-liquidity-pool",level:2},{value:"Liquidity Provision",id:"liquidity-provision",level:2},{value:"Swap Assets",id:"swap-assets",level:2},{value:"Swap from an exact amount of Tokens",id:"swap-from-an-exact-amount-of-tokens",level:3},{value:"Swap to an exact amount of Tokens",id:"swap-to-an-exact-amount-of-tokens",level:3},{value:"Withdraw Provided Liquidity",id:"withdraw-provided-liquidity",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the\n[Polkadot-JS UI](../general/polkadotjs-ui.md), you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsx)(s.admonition,{title:"Wallet and UI Developers",type:"info",children:(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI"})," project is part of Polkadot initiative\nfor building front-end and UI for Asset Conversion Pallet on Polkadot's Asset Hub. Currently, the\napp is deployed on Westend and Kusama ",(0,n.jsx)(s.a,{href:"https://app.dotacp.mvpworkshop.co/swap",children:"here"}),"."]})}),"\n",(0,n.jsx)(s.p,{children:"The tutorial below demonstrates the complete journey from creating a liquidity pool on Paseo test\nnet and exploring all of the key functionalities of Asset Conversion pallet."}),"\n",(0,n.jsx)(s.h2,{id:"create-a-liquidity-pool",children:"Create a Liquidity Pool"}),"\n",(0,n.jsxs)(s.p,{children:["If there is no existing liquidity pool for an asset on Asset Hub, the first step is to create a\nliquidity pool. If you are looking for a guide on how to create an asset on Asset Hub, it is\navailable ",(0,n.jsx)(s.a,{href:"/docs/learn-guides-assets-create",children:"here."})]}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"create_pool"})," function is used to create an empty liquidity pool along with a new ",(0,n.jsx)(s.code,{children:"lp_token"}),"\nasset. This asset's ID is announced in the ",(0,n.jsx)(s.code,{children:"Event::PoolCreated"})," event. After creating a pool,\nliquidity can be added to it via the ",(0,n.jsx)(s.code,{children:"Pallet::add_liquidity"})," function."]}),"\n",(0,n.jsxs)(s.p,{children:["For example, the snapshot below shows how to create liquidity pool with ",(0,n.jsx)(s.code,{children:"PAS"})," tokens and ",(0,n.jsx)(s.code,{children:"EDU"}),"\ntokens with the asset ID ",(0,n.jsx)(s.code,{children:"149"})," on Paseo Asset Hub. Creating this extrinsic requires knowledge of\n",(0,n.jsx)(s.a,{href:"/docs/learn/xcm/fundamentals/multilocation-summary",children:"XCM Multilocations"}),". From the perspective of AssetHub,\nan Asset Hub, the asset with an ",(0,n.jsx)(s.code,{children:"AssetId"})," of ",(0,n.jsx)(s.code,{children:"149"})," has a MultiLocation of"]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{children:"{\n parents: 0,\n interior: {\n X2: [{PalletInstance: 50}, {GeneralIndex: 149}]\n }\n}\n"})}),"\n",(0,n.jsxs)(s.p,{children:["The PalletInstance of ",(0,n.jsx)(s.code,{children:"50"})," represents the Assets pallet on Asset Hub and the ",(0,n.jsx)(s.code,{children:"GeneralIndex"})," is the\n",(0,n.jsx)(s.code,{children:"AssetId"})," of the asset."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Create Liquidity Pool",src:t(67780).A+"",width:"2870",height:"2186"})}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"lp_token"})," ID created for this pool is ",(0,n.jsx)(s.code,{children:"24"}),", and\n",(0,n.jsx)(s.a,{href:"https://assethub-rococo.subscan.io/extrinsic/4604922-2?event=4604922-8",children:"here"})," is the event for\nreference."]}),"\n",(0,n.jsx)(s.h2,{id:"liquidity-provision",children:"Liquidity Provision"}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"add_liquidity"})," function allows users to provide liquidity to a pool composed of two assets. It\nrequires specifying the desired amounts for both assets and minimum acceptable amounts. The function\ncalculates an optimal contribution of assets, which may differ from the desired amounts but will not\nbe less than the specified minimums. Liquidity providers receive liquidity tokens representing their\nshare of the pool."]}),"\n",(0,n.jsxs)(s.p,{children:["For example, the snapshot below shows how to provide liquidity to the pool with ",(0,n.jsx)(s.code,{children:"PAS"})," tokens and\n",(0,n.jsx)(s.code,{children:"EDU"})," tokens with the asset ID ",(0,n.jsx)(s.code,{children:"149"})," on Paseo Asset Hub. The intention is to provide liquidity of 1\n",(0,n.jsx)(s.code,{children:"PAS"})," token (",(0,n.jsx)(s.code,{children:"u128"})," value of ",(0,n.jsx)(s.code,{children:"1000000000000"})," as it has 12 decimals) and 100 ",(0,n.jsx)(s.code,{children:"EDU"})," tokens (",(0,n.jsx)(s.code,{children:"u128"}),"\nvalue of ",(0,n.jsx)(s.code,{children:"1000000000000"})," as it has 10 decimals)."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Provide Liquidity",src:t(17097).A+"",width:"2860",height:"2992"})}),"\n",(0,n.jsxs)(s.p,{children:["After successful submission of the extrinsic above, LP tokens are minted to the specified account.\nBelow is the snapshot of the liquidity pool on the\n",(0,n.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Liquidity Pool Example",src:t(76705).A+"",width:"2595",height:"1296"})}),"\n",(0,n.jsx)(s.h2,{id:"swap-assets",children:"Swap Assets"}),"\n",(0,n.jsx)(s.h3,{id:"swap-from-an-exact-amount-of-tokens",children:"Swap from an exact amount of Tokens"}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"swap_exact_tokens_for_tokens"})," function allows users to swap a precise amount of one asset for\nanother within a specified liquidity pool, ensuring the user receives at least a minimum expected\namount of the second asset in return. This function aims to provide predictability in trading\noutcomes, allowing users to manage their asset exchanges with confidence regarding the minimum\nreturn."]}),"\n",(0,n.jsxs)(s.p,{children:["For example, the snapshot below shows how to swap ",(0,n.jsx)(s.code,{children:"PAS"})," tokens to ",(0,n.jsx)(s.code,{children:"EDU"})," tokens with the asset ID\n",(0,n.jsx)(s.code,{children:"149"})," on Paseo Asset Hub. The intention is to swap 0.1 ",(0,n.jsx)(s.code,{children:"PAS"})," tokens (",(0,n.jsx)(s.code,{children:"u128"})," value of ",(0,n.jsx)(s.code,{children:"100000000000"}),"\nas it has 12 decimals) to at least 9 ",(0,n.jsx)(s.code,{children:"EDU"})," tokens (",(0,n.jsx)(s.code,{children:"u128"})," value of ",(0,n.jsx)(s.code,{children:"90000000000"})," as it has 10\ndecimals)."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Swap Exact Amount",src:t(38224).A+"",width:"2844",height:"3016"})}),"\n",(0,n.jsxs)(s.p,{children:["Below is the snapshot of the liquidity pool on the\n",(0,n.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})," after successful submission of the\nextrinsic above. It can be observed that the pool now has 1.1 ",(0,n.jsx)(s.code,{children:"ROC"})," tokens and around 9.06 ",(0,n.jsx)(s.code,{children:"EDU"}),"\ntokens are transferred out of it."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Swap Exact Amount Example",src:t(3412).A+"",width:"2746",height:"1140"})}),"\n",(0,n.jsx)(s.h3,{id:"swap-to-an-exact-amount-of-tokens",children:"Swap to an exact amount of Tokens"}),"\n",(0,n.jsxs)(s.p,{children:["On the other hand, the ",(0,n.jsx)(s.code,{children:"swap_tokens_for_exact_tokens"})," function allows users to trade a flexible\namount of one asset to precisely obtain a specified amount of another asset. It ensures that users\ndo not spend more than a predetermined maximum amount of the initial asset to acquire the exact\ntarget amount of the second asset, providing a way to control the cost of the transaction while\nachieving the desired outcome."]}),"\n",(0,n.jsxs)(s.p,{children:["For example, the snapshot below shows how to swap ",(0,n.jsx)(s.code,{children:"EDU"})," tokens with the asset ID ",(0,n.jsx)(s.code,{children:"149"})," on Paseo\nAsset Hub to ",(0,n.jsx)(s.code,{children:"PAS"})," Tokens. The intention is to swap for obtaining 0.1 ",(0,n.jsx)(s.code,{children:"PAS"})," tokens (",(0,n.jsx)(s.code,{children:"u128"})," value of\n",(0,n.jsx)(s.code,{children:"100000000000"})," as it has 12 decimals) for a maximum of 10 ",(0,n.jsx)(s.code,{children:"EDU"})," tokens (",(0,n.jsx)(s.code,{children:"u128"})," value of\n",(0,n.jsx)(s.code,{children:"100000000000"})," as it has 10 decimals)."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Swap Exact Amount",src:t(48109).A+"",width:"2860",height:"3006"})}),"\n",(0,n.jsxs)(s.p,{children:["Below is the snapshot of the liquidity pool on the\n",(0,n.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})," after successful submission of the\nextrinsic above."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Swap to Exact Amount Example",src:t(82545).A+"",width:"2627",height:"1294"})}),"\n",(0,n.jsx)(s.h2,{id:"withdraw-provided-liquidity",children:"Withdraw Provided Liquidity"}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"remove_liquidity"})," function allows users to withdraw their provided liquidity from a pool,\nreceiving back the original assets. When calling this function, users specify the amount of\nliquidity tokens (representing their share in the pool) they wish to burn. They also set minimum\nacceptable amounts for the assets they expect to receive back. This mechanism ensures users can\ncontrol the minimum value they receive, protecting against unfavourable price movements during the\nwithdrawal process\u200b."]}),"\n",(0,n.jsxs)(s.p,{children:["For example, the snapshot below shows how to remove liquidity by specifying the number of LP tokens.\nIn exchange of removing around half of the liquidity of the pool, the expecation is that we receive\nat least 0.4 ",(0,n.jsx)(s.code,{children:"ROC"})," tokens (",(0,n.jsx)(s.code,{children:"u128"})," value of",(0,n.jsx)(s.code,{children:"400000000000"})," as it has 12 decimals) and 40 ",(0,n.jsx)(s.code,{children:"EDU"})," tokens\n(",(0,n.jsx)(s.code,{children:"u128"})," value of ",(0,n.jsx)(s.code,{children:"400000000000"})," as it has 10 decimals)."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Remove Liquidity",src:t(37340).A+"",width:"2832",height:"2870"})}),"\n",(0,n.jsxs)(s.p,{children:["Below is the snapshot of the liquidity pool on the\n",(0,n.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})," after successful submission of the\nextrinsic above."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Remove Liquidity Example",src:t(43745).A+"",width:"2585",height:"1309"})})]})}function u(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},67141:(e,s,t)=>{t.d(s,{A:()=>i});var n=t(96540),o=t(74848);const i=function(e){var s,t=e.message,i=(0,n.useState)(!0),a=i[0],r=i[1];return(0,o.jsx)(o.Fragment,{children:a&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=t,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},17097:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Add-Liquidity-e880d907645db19dc0ee4b8b9fdb9ad3.png"},67780:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Create-Pool-8945e1790f183ac14a4f1185763ea5a0.png"},76705:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Liquidity-Pool-Example-ae441ec1a55827fd488ecef3b8510681.png"},43745:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Remove-Liquidity-Example-bfdc3a0b327bd592c2abcf4cfb9b1755.png"},37340:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Remove-Liquidity-7fc348a12802b40bf643683bd14c5a3b.png"},38224:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-Exact-Token-a56d6a02ba2bf1a2620bc7f3955aa658.png"},3412:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-Exact-Tokens-Example-60790c60e4a0315e59834c0c5421b0f9.png"},82545:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-To-Exact-Example-9be51ed786d418f553b1eeb0ae866cb0.png"},48109:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-To-Exact-Tokens-ae5e1b66b2a80208b329a48af5ab8472.png"},28453:(e,s,t)=>{t.d(s,{R:()=>a,x:()=>r});var n=t(96540);const o={},i=n.createContext(o);function a(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fda65b2b.da8be3da.js b/assets/js/fda65b2b.da8be3da.js new file mode 100644 index 000000000000..00a112198e13 --- /dev/null +++ b/assets/js/fda65b2b.da8be3da.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6225],{54276:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>a,metadata:()=>d,toc:()=>l});var n=t(74848),o=t(28453),i=t(67141);const a={id:"learn-guides-asset-conversion",title:"Asset Conversion Tutorials",sidebar_label:"Asset Conversion Tutorials",description:"Asset Conversion implementation details on AssetHub.",keywords:["Assets","DEX","Exchange","Pools","Tokens"],slug:"../learn-guides-asset-conversion"},r=void 0,d={id:"learn/learn-guides-asset-conversion",title:"Asset Conversion Tutorials",description:"Asset Conversion implementation details on AssetHub.",source:"@site/../docs/learn/learn-guides-asset-conversion.md",sourceDirName:"learn",slug:"/learn-guides-asset-conversion",permalink:"/docs/learn-guides-asset-conversion",draft:!1,unlisted:!1,editUrl:"https://github.com/w3f/polkadot-wiki/edit/master/docs/learn/learn-guides-asset-conversion.md",tags:[],version:"current",lastUpdatedBy:"Filippo",lastUpdatedAt:1729847256e3,frontMatter:{id:"learn-guides-asset-conversion",title:"Asset Conversion Tutorials",sidebar_label:"Asset Conversion Tutorials",description:"Asset Conversion implementation details on AssetHub.",keywords:["Assets","DEX","Exchange","Pools","Tokens"],slug:"../learn-guides-asset-conversion"},sidebar:"docs",previous:{title:"Create Asset Guides",permalink:"/docs/learn-guides-assets-create"},next:{title:"Bridge Hub Guides",permalink:"/docs/learn-guides-bridges"}},c={},l=[{value:"Create a Liquidity Pool",id:"create-a-liquidity-pool",level:2},{value:"Liquidity Provision",id:"liquidity-provision",level:2},{value:"Swap Assets",id:"swap-assets",level:2},{value:"Swap from an exact amount of Tokens",id:"swap-from-an-exact-amount-of-tokens",level:3},{value:"Swap to an exact amount of Tokens",id:"swap-to-an-exact-amount-of-tokens",level:3},{value:"Withdraw Provided Liquidity",id:"withdraw-provided-liquidity",level:2}];function h(e){const s={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.A,{message:"Polkadot-JS is for developers and power users only. If you need help using the Polkadot-JS UI, you can contact the\n[Polkadot Support Team](https://support.polkadot.network/support/home). For more user-friendly tools\nsee the [wallets](./wallets-index), [apps](./apps-index) and [dashboard](./dashboards-index) pages."}),"\n",(0,n.jsx)(s.admonition,{title:"Wallet and UI Developers",type:"info",children:(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI"})," project is part of Polkadot initiative\nfor building front-end and UI for Asset Conversion Pallet on Polkadot's Asset Hub. Currently, the\napp is deployed on Westend and Kusama ",(0,n.jsx)(s.a,{href:"https://app.dotacp.mvpworkshop.co/swap",children:"here"}),"."]})}),"\n",(0,n.jsx)(s.p,{children:"The tutorial below demonstrates the complete journey from creating a liquidity pool on Paseo test\nnet and exploring all of the key functionalities of Asset Conversion pallet."}),"\n",(0,n.jsx)(s.h2,{id:"create-a-liquidity-pool",children:"Create a Liquidity Pool"}),"\n",(0,n.jsxs)(s.p,{children:["If there is no existing liquidity pool for an asset on Asset Hub, the first step is to create a\nliquidity pool. If you are looking for a guide on how to create an asset on Asset Hub, it is\navailable ",(0,n.jsx)(s.a,{href:"/docs/learn-guides-assets-create",children:"here."})]}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"create_pool"})," function is used to create an empty liquidity pool along with a new ",(0,n.jsx)(s.code,{children:"lp_token"}),"\nasset. This asset's ID is announced in the ",(0,n.jsx)(s.code,{children:"Event::PoolCreated"})," event. After creating a pool,\nliquidity can be added to it via the ",(0,n.jsx)(s.code,{children:"Pallet::add_liquidity"})," function."]}),"\n",(0,n.jsxs)(s.p,{children:["For example, the snapshot below shows how to create liquidity pool with ",(0,n.jsx)(s.code,{children:"PAS"})," tokens and ",(0,n.jsx)(s.code,{children:"EDU"}),"\ntokens with the asset ID ",(0,n.jsx)(s.code,{children:"149"})," on Paseo Asset Hub. Creating this extrinsic requires knowledge of\n",(0,n.jsx)(s.a,{href:"/docs/learn/xcm/fundamentals/multilocation-summary",children:"XCM Multilocations"}),". From the perspective of AssetHub,\nan Asset Hub, the asset with an ",(0,n.jsx)(s.code,{children:"AssetId"})," of ",(0,n.jsx)(s.code,{children:"149"})," has a MultiLocation of"]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{children:"{\n parents: 0,\n interior: {\n X2: [{PalletInstance: 50}, {GeneralIndex: 149}]\n }\n}\n"})}),"\n",(0,n.jsxs)(s.p,{children:["The PalletInstance of ",(0,n.jsx)(s.code,{children:"50"})," represents the Assets pallet on Asset Hub and the ",(0,n.jsx)(s.code,{children:"GeneralIndex"})," is the\n",(0,n.jsx)(s.code,{children:"AssetId"})," of the asset."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Create Liquidity Pool",src:t(67780).A+"",width:"2870",height:"2186"})}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"lp_token"})," ID created for this pool is ",(0,n.jsx)(s.code,{children:"24"}),", and\n",(0,n.jsx)(s.a,{href:"https://assethub-rococo.subscan.io/extrinsic/4604922-2?event=4604922-8",children:"here"})," is the event for\nreference."]}),"\n",(0,n.jsx)(s.h2,{id:"liquidity-provision",children:"Liquidity Provision"}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"add_liquidity"})," function allows users to provide liquidity to a pool composed of two assets. It\nrequires specifying the desired amounts for both assets and minimum acceptable amounts. The function\ncalculates an optimal contribution of assets, which may differ from the desired amounts but will not\nbe less than the specified minimums. Liquidity providers receive liquidity tokens representing their\nshare of the pool."]}),"\n",(0,n.jsxs)(s.p,{children:["For example, the snapshot below shows how to provide liquidity to the pool with ",(0,n.jsx)(s.code,{children:"PAS"})," tokens and\n",(0,n.jsx)(s.code,{children:"EDU"})," tokens with the asset ID ",(0,n.jsx)(s.code,{children:"149"})," on Paseo Asset Hub. The intention is to provide liquidity of 1\n",(0,n.jsx)(s.code,{children:"PAS"})," token (",(0,n.jsx)(s.code,{children:"u128"})," value of ",(0,n.jsx)(s.code,{children:"1000000000000"})," as it has 12 decimals) and 100 ",(0,n.jsx)(s.code,{children:"EDU"})," tokens (",(0,n.jsx)(s.code,{children:"u128"}),"\nvalue of ",(0,n.jsx)(s.code,{children:"1000000000000"})," as it has 10 decimals)."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Provide Liquidity",src:t(17097).A+"",width:"2860",height:"2992"})}),"\n",(0,n.jsxs)(s.p,{children:["After successful submission of the extrinsic above, LP tokens are minted to the specified account.\nBelow is the snapshot of the liquidity pool on the\n",(0,n.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Liquidity Pool Example",src:t(76705).A+"",width:"2595",height:"1296"})}),"\n",(0,n.jsx)(s.h2,{id:"swap-assets",children:"Swap Assets"}),"\n",(0,n.jsx)(s.h3,{id:"swap-from-an-exact-amount-of-tokens",children:"Swap from an exact amount of Tokens"}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"swap_exact_tokens_for_tokens"})," function allows users to swap a precise amount of one asset for\nanother within a specified liquidity pool, ensuring the user receives at least a minimum expected\namount of the second asset in return. This function aims to provide predictability in trading\noutcomes, allowing users to manage their asset exchanges with confidence regarding the minimum\nreturn."]}),"\n",(0,n.jsxs)(s.p,{children:["For example, the snapshot below shows how to swap ",(0,n.jsx)(s.code,{children:"PAS"})," tokens to ",(0,n.jsx)(s.code,{children:"EDU"})," tokens with the asset ID\n",(0,n.jsx)(s.code,{children:"149"})," on Paseo Asset Hub. The intention is to swap 0.1 ",(0,n.jsx)(s.code,{children:"PAS"})," tokens (",(0,n.jsx)(s.code,{children:"u128"})," value of ",(0,n.jsx)(s.code,{children:"100000000000"}),"\nas it has 12 decimals) to at least 9 ",(0,n.jsx)(s.code,{children:"EDU"})," tokens (",(0,n.jsx)(s.code,{children:"u128"})," value of ",(0,n.jsx)(s.code,{children:"90000000000"})," as it has 10\ndecimals)."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Swap Exact Amount",src:t(38224).A+"",width:"2844",height:"3016"})}),"\n",(0,n.jsxs)(s.p,{children:["Below is the snapshot of the liquidity pool on the\n",(0,n.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})," after successful submission of the\nextrinsic above. It can be observed that the pool now has 1.1 ",(0,n.jsx)(s.code,{children:"ROC"})," tokens and around 9.06 ",(0,n.jsx)(s.code,{children:"EDU"}),"\ntokens are transferred out of it."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Swap Exact Amount Example",src:t(3412).A+"",width:"2746",height:"1140"})}),"\n",(0,n.jsx)(s.h3,{id:"swap-to-an-exact-amount-of-tokens",children:"Swap to an exact amount of Tokens"}),"\n",(0,n.jsxs)(s.p,{children:["On the other hand, the ",(0,n.jsx)(s.code,{children:"swap_tokens_for_exact_tokens"})," function allows users to trade a flexible\namount of one asset to precisely obtain a specified amount of another asset. It ensures that users\ndo not spend more than a predetermined maximum amount of the initial asset to acquire the exact\ntarget amount of the second asset, providing a way to control the cost of the transaction while\nachieving the desired outcome."]}),"\n",(0,n.jsxs)(s.p,{children:["For example, the snapshot below shows how to swap ",(0,n.jsx)(s.code,{children:"EDU"})," tokens with the asset ID ",(0,n.jsx)(s.code,{children:"149"})," on Paseo\nAsset Hub to ",(0,n.jsx)(s.code,{children:"PAS"})," Tokens. The intention is to swap for obtaining 0.1 ",(0,n.jsx)(s.code,{children:"PAS"})," tokens (",(0,n.jsx)(s.code,{children:"u128"})," value of\n",(0,n.jsx)(s.code,{children:"100000000000"})," as it has 12 decimals) for a maximum of 10 ",(0,n.jsx)(s.code,{children:"EDU"})," tokens (",(0,n.jsx)(s.code,{children:"u128"})," value of\n",(0,n.jsx)(s.code,{children:"100000000000"})," as it has 10 decimals)."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Swap Exact Amount",src:t(48109).A+"",width:"2860",height:"3006"})}),"\n",(0,n.jsxs)(s.p,{children:["Below is the snapshot of the liquidity pool on the\n",(0,n.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})," after successful submission of the\nextrinsic above."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Swap to Exact Amount Example",src:t(82545).A+"",width:"2627",height:"1294"})}),"\n",(0,n.jsx)(s.h2,{id:"withdraw-provided-liquidity",children:"Withdraw Provided Liquidity"}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"remove_liquidity"})," function allows users to withdraw their provided liquidity from a pool,\nreceiving back the original assets. When calling this function, users specify the amount of\nliquidity tokens (representing their share in the pool) they wish to burn. They also set minimum\nacceptable amounts for the assets they expect to receive back. This mechanism ensures users can\ncontrol the minimum value they receive, protecting against unfavourable price movements during the\nwithdrawal process\u200b."]}),"\n",(0,n.jsxs)(s.p,{children:["For example, the snapshot below shows how to remove liquidity by specifying the number of LP tokens.\nIn exchange of removing around half of the liquidity of the pool, the expecation is that we receive\nat least 0.4 ",(0,n.jsx)(s.code,{children:"ROC"})," tokens (",(0,n.jsx)(s.code,{children:"u128"})," value of",(0,n.jsx)(s.code,{children:"400000000000"})," as it has 12 decimals) and 40 ",(0,n.jsx)(s.code,{children:"EDU"})," tokens\n(",(0,n.jsx)(s.code,{children:"u128"})," value of ",(0,n.jsx)(s.code,{children:"400000000000"})," as it has 10 decimals)."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Remove Liquidity",src:t(37340).A+"",width:"2832",height:"2870"})}),"\n",(0,n.jsxs)(s.p,{children:["Below is the snapshot of the liquidity pool on the\n",(0,n.jsx)(s.a,{href:"https://github.com/MVPWorkshop/dot-acp-ui",children:"DOT ACP UI."})," after successful submission of the\nextrinsic above."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Remove Liquidity Example",src:t(43745).A+"",width:"2585",height:"1309"})})]})}function u(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},67141:(e,s,t)=>{t.d(s,{A:()=>i});var n=t(96540),o=t(74848);const i=function(e){var s,t=e.message,i=(0,n.useState)(!0),a=i[0],r=i[1];return(0,o.jsx)(o.Fragment,{children:a&&(0,o.jsxs)("div",{className:"message-box",children:[(0,o.jsx)("button",{className:"close-button",onClick:function(){r(!1)},children:"\u2716 "}),(0,o.jsx)("div",{className:"message-content",dangerouslySetInnerHTML:{__html:(s=t,s.replace(/\[(.*?)\]\((.*?)\)/g,'$1'))}})]})})}},17097:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Add-Liquidity-e880d907645db19dc0ee4b8b9fdb9ad3.png"},67780:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Create-Pool-8945e1790f183ac14a4f1185763ea5a0.png"},76705:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Liquidity-Pool-Example-ae441ec1a55827fd488ecef3b8510681.png"},43745:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Remove-Liquidity-Example-bfdc3a0b327bd592c2abcf4cfb9b1755.png"},37340:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Remove-Liquidity-7fc348a12802b40bf643683bd14c5a3b.png"},38224:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-Exact-Token-a56d6a02ba2bf1a2620bc7f3955aa658.png"},3412:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-Exact-Tokens-Example-60790c60e4a0315e59834c0c5421b0f9.png"},82545:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-To-Exact-Example-9be51ed786d418f553b1eeb0ae866cb0.png"},48109:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Asset-Conversion-Swap-To-Exact-Tokens-ae5e1b66b2a80208b329a48af5ab8472.png"},28453:(e,s,t)=>{t.d(s,{R:()=>a,x:()=>r});var n=t(96540);const o={},i=n.createContext(o);function a(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/main.aab4296e.js b/assets/js/main.a0fae12a.js similarity index 99% rename from assets/js/main.aab4296e.js rename to assets/js/main.a0fae12a.js index 9131ebc901ab..fde690a5bc27 100644 --- a/assets/js/main.aab4296e.js +++ b/assets/js/main.a0fae12a.js @@ -1,2 +1,2 @@ -/*! For license information please see main.aab4296e.js.LICENSE.txt */ -(self.webpackChunk=self.webpackChunk||[]).push([[8792],{55600:(e,t,n)=>{"use strict";n.d(t,{Bc:()=>b,E8:()=>Un,a1:()=>zn});var r=n(96540);n(40961);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(s)throw a}}return o}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t=3||2===n&&r>=4||1===n&&r>=10);function o(t,n,r){if(a&&void 0!==r){var o=r[0].__autocomplete_algoliaCredentials,i={"X-Algolia-Application-Id":o.appId,"X-Algolia-API-Key":o.apiKey};e.apply(void 0,[t].concat(T(n),[{headers:i}]))}else e.apply(void 0,[t].concat(T(n)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o("clickedObjectIDsAfterSearch",M(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o("clickedObjectIDs",M(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o("convertedObjectIDsAfterSearch",M(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o("convertedObjectIDs",M(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&t.reduce((function(e,t){var n=t.items,r=N(t,C);return[].concat(T(e),T(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function B(e){var t=e.items.reduce((function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function z(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function $(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&G({onItemsChange:r,items:n,insights:s,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive;i("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:s}}),n((function(e){var t=e.item,n=e.state,r=e.event;z(t)&&a({state:n,event:r,insights:s,item:t,insightsEvents:[V({eventName:"Item Selected"},j({item:t,items:c.current}))]})})),r((function(e){var t=e.item,n=e.state,r=e.event;z(t)&&o({state:n,event:r,insights:s,item:t,insightsEvents:[V({eventName:"Item Active"},j({item:t,items:c.current}))]})}))},onStateChange:function(e){var t=e.state;l({state:t})},__autocomplete_pluginOptions:e}}function Y(e,t){var n=t;return{then:function(t,r){return Y(e.then(X(t,n,e),X(r,n,e)),n)},catch:function(t){return Y(e.catch(X(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),Y(e.finally(X(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach((function(e){e()}))},isCanceled:function(){return!0===n.isCanceled}}}function Z(e){return Y(e,{isCanceled:!1,onCancelList:[]})}function X(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}function J(e,t,n,r){if(!n)return null;if(e<0&&(null===t||null!==r&&0===t))return n+e;var a=(null===t?-1:t)+e;return a<=-1||a>=n?null===r?null:0:a}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:"autocomplete-".concat(x++),plugins:a,initialState:be({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)}))},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)}))},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)}))},getSources:function(n){return Promise.all([].concat(function(e){return function(e){if(Array.isArray(e))return me(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?me(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then((function(e){return Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:S,onResolve:S};Object.keys(t).forEach((function(e){t[e].__default=!0}));var r=te(te({},t),e);return Promise.resolve(r)})))}))}(e,n)}))).then((function(e){return v(e)})).then((function(e){return e.map((function(e){return be(be({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)}))},onActive:function(n){e.onActive(n),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)}))},onResolve:function(n){e.onResolve(n),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)}))}})}))}))},navigator:be({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function ve(e){return ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ve(e)}function xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function we(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,Ie);Be&&a.environment.clearTimeout(Be);var l=c.setCollections,u=c.setIsOpen,d=c.setQuery,p=c.setActiveItemId,f=c.setStatus;if(d(o),p(a.defaultActiveItemId),!o&&!1===a.openOnFocus){var m,h=s.getState().collections.map((function(e){return Re(Re({},e),{},{items:[]})}));f("idle"),l(h),u(null!==(m=r.isOpen)&&void 0!==m?m:a.shouldPanelOpen({state:s.getState()}));var b=Z(ze(h).then((function(){return Promise.resolve()})));return s.pendingRequests.add(b)}f("loading"),Be=a.environment.setTimeout((function(){f("stalled")}),a.stallThreshold);var g=Z(ze(a.getSources(Re({query:o,refresh:i,state:s.getState()},c)).then((function(e){return Promise.all(e.map((function(e){return Promise.resolve(e.getItems(Re({query:o,refresh:i,state:s.getState()},c))).then((function(t){return function(e,t,n){if(a=e,Boolean(null==a?void 0:a.execute)){var r="algolia"===e.requesterId?Object.assign.apply(Object,[{}].concat(Oe(Object.keys(n.context).map((function(e){var t;return null===(t=n.context[e])||void 0===t?void 0:t.__algoliaSearchParameters}))))):{};return Ee(Ee({},e),{},{requests:e.queries.map((function(n){return{query:"algolia"===e.requesterId?Ee(Ee({},n),{},{params:Ee(Ee({},r),n.params)}):n,sourceId:t,transformResponse:e.transformResponse}}))})}var a;return{items:e,sourceId:t}}(t,e.sourceId,s.getState())}))}))).then(Pe).then((function(t){return function(e,t,n){return t.map((function(t){var r,a=e.filter((function(e){return e.sourceId===t.sourceId})),o=a.map((function(e){return e.items})),i=a[0].transformResponse,s=i?i({results:r=o,hits:r.map((function(e){return e.hits})).filter(Boolean),facetHits:r.map((function(e){var t;return null===(t=e.facetHits)||void 0===t?void 0:t.map((function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}}))})).filter(Boolean)}):o;return t.onResolve({source:t,results:o,items:s,state:n.getState()}),s.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:t,items:s}}))}(t,e,s)})).then((function(e){return function(e){var t=e.props,n=e.state,r=e.collections.reduce((function(e,t){return we(we({},e),{},ke({},t.source.sourceId,we(we({},t.source),{},{getItems:function(){return v(t.items)}})))}),{}),a=t.plugins.reduce((function(e,t){return t.reshape?t.reshape(e):e}),{sourcesBySourceId:r,state:n}).sourcesBySourceId;return v(t.reshape({sourcesBySourceId:a,sources:Object.values(a),state:n})).filter(Boolean).map((function(e){return{source:e,items:e.getItems()}}))}({collections:e,props:a,state:s.getState()})}))})))).then((function(e){var n;f("idle"),l(e);var d=a.shouldPanelOpen({state:s.getState()});u(null!==(n=r.isOpen)&&void 0!==n?n:a.openOnFocus&&!o&&d||d);var p=ae(s.getState());if(null!==s.getState().activeItemId&&p){var m=p.item,h=p.itemInputValue,b=p.itemUrl,g=p.source;g.onActive(Re({event:t,item:m,itemInputValue:h,itemUrl:b,refresh:i,source:g,state:s.getState()},c))}})).finally((function(){f("idle"),Be&&a.environment.clearTimeout(Be)}));return s.pendingRequests.add(g)}function $e(e){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$e(e)}var qe=["event","props","refresh","store"];function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ve(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function ot(e){var t=e.props,n=e.refresh,r=e.store,a=at(e,Ge),o=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var n=e.inputElement,a=e.formElement,o=e.panelElement;function i(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[a,o].some((function(t){return(n=t)===(r=e.target)||n.contains(r);var n,r}))&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return nt({onTouchStart:i,onMouseDown:i,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},at(e,Qe))},getRootProps:function(e){return nt({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-owns":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){return e.inputElement,nt({action:"",noValidate:!0,role:"search",onSubmit:function(o){var i;o.preventDefault(),t.onSubmit(nt({event:o,refresh:n,state:r.getState()},a)),r.dispatch("submit",null),null===(i=e.inputElement)||void 0===i||i.blur()},onReset:function(o){var i;o.preventDefault(),t.onReset(nt({event:o,refresh:n,state:r.getState()},a)),r.dispatch("reset",null),null===(i=e.inputElement)||void 0===i||i.focus()}},at(e,Ye))},getLabelProps:function(e){var n=e||{},r=n.sourceIndex,a=at(n,Xe);return nt({htmlFor:"".concat(o(t.id,r),"-input"),id:"".concat(o(t.id,r),"-label")},a)},getInputProps:function(e){var o;function i(e){(t.openOnFocus||Boolean(r.getState().query))&&Ue(nt({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},a)),r.dispatch("focus",null)}var s=e||{},c=(s.inputElement,s.maxLength),l=void 0===c?512:c,u=at(s,Ze),d=ae(r.getState()),p=function(e){return Boolean(e&&e.match(oe))}((null===(o=t.environment.navigator)||void 0===o?void 0:o.userAgent)||""),f=null!=d&&d.itemUrl&&!p?"go":"search";return nt({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?"".concat(t.id,"-item-").concat(r.getState().activeItemId):void 0,"aria-controls":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:r.getState().completion||r.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:f,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:l,type:"search",onChange:function(e){Ue(nt({event:e,props:t,query:e.currentTarget.value.slice(0,l),refresh:n,store:r},a))},onKeyDown:function(e){!function(e){var t=e.event,n=e.props,r=e.refresh,a=e.store,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,qe);if("ArrowUp"===t.key||"ArrowDown"===t.key){var i=function(){var e=n.environment.document.getElementById("".concat(n.id,"-item-").concat(a.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},s=function(){var e=ae(a.getState());if(null!==a.getState().activeItemId&&e){var n=e.item,i=e.itemInputValue,s=e.itemUrl,c=e.source;c.onActive(Ve({event:t,item:n,itemInputValue:i,itemUrl:s,refresh:r,source:c,state:a.getState()},o))}};t.preventDefault(),!1===a.getState().isOpen&&(n.openOnFocus||Boolean(a.getState().query))?Ue(Ve({event:t,props:n,query:a.getState().query,refresh:r,store:a},o)).then((function(){a.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),s(),setTimeout(i,0)})):(a.dispatch(t.key,{}),s(),i())}else if("Escape"===t.key)t.preventDefault(),a.dispatch(t.key,null),a.pendingRequests.cancelAll();else if("Tab"===t.key)a.dispatch("blur",null),a.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===a.getState().activeItemId||a.getState().collections.every((function(e){return 0===e.items.length})))return void(n.debug||a.pendingRequests.cancelAll());t.preventDefault();var c=ae(a.getState()),l=c.item,u=c.itemInputValue,d=c.itemUrl,p=c.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(p.onSelect(Ve({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:a.getState()},o)),n.navigator.navigateNewTab({itemUrl:d,item:l,state:a.getState()}));else if(t.shiftKey)void 0!==d&&(p.onSelect(Ve({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:a.getState()},o)),n.navigator.navigateNewWindow({itemUrl:d,item:l,state:a.getState()}));else if(t.altKey);else{if(void 0!==d)return p.onSelect(Ve({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:a.getState()},o)),void n.navigator.navigate({itemUrl:d,item:l,state:a.getState()});Ue(Ve({event:t,nextState:{isOpen:!1},props:n,query:u,refresh:r,store:a},o)).then((function(){p.onSelect(Ve({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:p,state:a.getState()},o))}))}}}(nt({event:e,props:t,refresh:n,store:r},a))},onFocus:i,onBlur:S,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(n)}},u)},getPanelProps:function(e){return nt({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.sourceIndex,a=at(n,Je);return nt({role:"listbox","aria-labelledby":"".concat(o(t.id,r),"-label"),id:"".concat(o(t.id,r),"-list")},a)},getItemProps:function(e){var i=e.item,s=e.source,c=e.sourceIndex,l=at(e,et);return nt({id:"".concat(o(t.id,c),"-item-").concat(i.__autocomplete_id),role:"option","aria-selected":r.getState().activeItemId===i.__autocomplete_id,onMouseMove:function(e){if(i.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",i.__autocomplete_id);var t=ae(r.getState());if(null!==r.getState().activeItemId&&t){var o=t.item,s=t.itemInputValue,c=t.itemUrl,l=t.source;l.onActive(nt({event:e,item:o,itemInputValue:s,itemUrl:c,refresh:n,source:l,state:r.getState()},a))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var o=s.getItemInputValue({item:i,state:r.getState()}),c=s.getItemUrl({item:i,state:r.getState()});(c?Promise.resolve():Ue(nt({event:e,nextState:{isOpen:!1},props:t,query:o,refresh:n,store:r},a))).then((function(){s.onSelect(nt({event:e,item:i,itemInputValue:o,itemUrl:c,refresh:n,source:s,state:r.getState()},a))}))}},l)}}}function it(e){return it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},it(e)}function st(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ct(e){for(var t=1;t0&&r.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},r.createElement("p",{className:"DocSearch-Help"},l,":"),r.createElement("ul",null,h.slice(0,3).reduce((function(e,t){return[].concat(u(e),[r.createElement("li",{key:t},r.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){a.setQuery(t.toLowerCase()+" "),a.refresh(),a.inputRef.current.focus()}},t))])}),[]))),a.getMissingResultsUrl&&r.createElement("p",{className:"DocSearch-Help"},"".concat(p," "),r.createElement("a",{href:a.getMissingResultsUrl({query:a.state.query}),target:"_blank",rel:"noopener noreferrer"},m)))}var zt=["hit","attribute","tagName"];function Ut(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function $t(e){var t=e.hit,n=e.attribute,a=e.tagName,i=void 0===a?"span":a,s=c(e,zt);return(0,r.createElement)(i,o(o({},s),{},{dangerouslySetInnerHTML:{__html:Ut(t,"_snippetResult.".concat(n,".value"))||Ut(t,n)}}))}function qt(e){return e.collection&&0!==e.collection.items.length?r.createElement("section",{className:"DocSearch-Hits"},r.createElement("div",{className:"DocSearch-Hit-source"},e.title),r.createElement("ul",e.getListProps(),e.collection.items.map((function(t,n){return r.createElement(Ht,s({key:[e.title,t.objectID].join(":"),item:t,index:n},e))})))):null}function Ht(e){var t=e.item,n=e.index,a=e.renderIcon,o=e.renderAction,i=e.getItemProps,c=e.onItemClick,u=e.collection,d=e.hitComponent,p=l(r.useState(!1),2),f=p[0],m=p[1],h=l(r.useState(!1),2),b=h[0],g=h[1],y=r.useRef(null),v=d;return r.createElement("li",s({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child",f&&"DocSearch-Hit--deleting",b&&"DocSearch-Hit--favoriting"].filter(Boolean).join(" "),onTransitionEnd:function(){y.current&&y.current()}},i({item:t,source:u.source,onClick:function(e){c(t,e)}})),r.createElement(v,{hit:t},r.createElement("div",{className:"DocSearch-Hit-Container"},a({item:t,index:n}),t.hierarchy[t.type]&&"lvl1"===t.type&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement($t,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&r.createElement($t,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),t.hierarchy[t.type]&&("lvl2"===t.type||"lvl3"===t.type||"lvl4"===t.type||"lvl5"===t.type||"lvl6"===t.type)&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement($t,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),r.createElement($t,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),"content"===t.type&&r.createElement("div",{className:"DocSearch-Hit-content-wrapper"},r.createElement($t,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),r.createElement($t,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),o({item:t,runDeleteTransition:function(e){m(!0),y.current=e},runFavoriteTransition:function(e){g(!0),y.current=e}}))))}function Vt(e,t,n){return e.reduce((function(e,r){var a=t(r);return e.hasOwnProperty(a)||(e[a]=[]),e[a].length<(n||5)&&e[a].push(r),e}),{})}function Wt(e){return e}function Kt(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function Gt(){}var Qt=/(|<\/mark>)/g,Yt=RegExp(Qt.source);function Zt(e){var t,n,r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var a=((r.__docsearch_parent?null===(t=r.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(n=e._highlightResult)||void 0===n||null===(n=n.hierarchy)||void 0===n?void 0:n.lvl0)||{}).value;return a&&Yt.test(a)?a.replace(Qt,""):a}function Xt(e){return r.createElement("div",{className:"DocSearch-Dropdown-Container"},e.state.collections.map((function(t){if(0===t.items.length)return null;var n=Zt(t.items[0]);return r.createElement(qt,s({},e,{key:t.source.sourceId,title:n,collection:t,renderIcon:function(e){var n,a=e.item,o=e.index;return r.createElement(r.Fragment,null,a.__docsearch_parent&&r.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},r.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},a.__docsearch_parent!==(null===(n=t.items[o+1])||void 0===n?void 0:n.__docsearch_parent)?r.createElement("path",{d:"M8 6v21M20 27H8.3"}):r.createElement("path",{d:"M8 6v42M20 27H8.3"}))),r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Tt,{type:a.type})))},renderAction:function(){return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement(Ct,null))}}))})),e.resultsFooterComponent&&r.createElement("section",{className:"DocSearch-HitsFooter"},r.createElement(e.resultsFooterComponent,{state:e.state})))}var Jt=["translations"];function en(e){var t=e.translations,n=void 0===t?{}:t,a=c(e,Jt),o=n.recentSearchesTitle,i=void 0===o?"Recent":o,l=n.noRecentSearchesText,u=void 0===l?"No recent searches":l,d=n.saveRecentSearchButtonTitle,p=void 0===d?"Save this search":d,f=n.removeRecentSearchButtonTitle,m=void 0===f?"Remove this search from history":f,h=n.favoriteSearchesTitle,b=void 0===h?"Favorite":h,g=n.removeFavoriteSearchButtonTitle,y=void 0===g?"Remove this search from favorites":g;return"idle"===a.state.status&&!1===a.hasCollections?a.disableUserPersonalization?null:r.createElement("div",{className:"DocSearch-StartScreen"},r.createElement("p",{className:"DocSearch-Help"},u)):!1===a.hasCollections?null:r.createElement("div",{className:"DocSearch-Dropdown-Container"},r.createElement(qt,s({},a,{title:i,collection:a.state.collections[0],renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Ot,null))},renderAction:function(e){var t=e.item,n=e.runFavoriteTransition,o=e.runDeleteTransition;return r.createElement(r.Fragment,null,r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:p,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){a.favoriteSearches.add(t),a.recentSearches.remove(t),a.refresh()}))}},r.createElement(Rt,null))),r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:m,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),o((function(){a.recentSearches.remove(t),a.refresh()}))}},r.createElement(At,null))))}})),r.createElement(qt,s({},a,{title:b,collection:a.state.collections[1],renderIcon:function(){return r.createElement("div",{className:"DocSearch-Hit-icon"},r.createElement(Rt,null))},renderAction:function(e){var t=e.item,n=e.runDeleteTransition;return r.createElement("div",{className:"DocSearch-Hit-action"},r.createElement("button",{className:"DocSearch-Hit-action-button",title:y,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){a.favoriteSearches.remove(t),a.refresh()}))}},r.createElement(At,null)))}})))}var tn=["translations"],nn=r.memo((function(e){var t=e.translations,n=void 0===t?{}:t,a=c(e,tn);if("error"===a.state.status)return r.createElement(Mt,{translations:null==n?void 0:n.errorScreen});var o=a.state.collections.some((function(e){return e.items.length>0}));return a.state.query?!1===o?r.createElement(Bt,s({},a,{translations:null==n?void 0:n.noResultsScreen})):r.createElement(Xt,a):r.createElement(en,s({},a,{hasCollections:o,translations:null==n?void 0:n.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status})),rn=["translations"];function an(e){var t=e.translations,n=void 0===t?{}:t,a=c(e,rn),o=n.resetButtonTitle,i=void 0===o?"Clear the query":o,l=n.resetButtonAriaLabel,u=void 0===l?"Clear the query":l,d=n.cancelButtonText,p=void 0===d?"Cancel":d,f=n.cancelButtonAriaLabel,h=void 0===f?"Cancel":f,b=n.searchInputLabel,g=void 0===b?"Search":b,y=a.getFormProps({inputElement:a.inputRef.current}).onReset;return r.useEffect((function(){a.autoFocus&&a.inputRef.current&&a.inputRef.current.focus()}),[a.autoFocus,a.inputRef]),r.useEffect((function(){a.isFromSelection&&a.inputRef.current&&a.inputRef.current.select()}),[a.isFromSelection,a.inputRef]),r.createElement(r.Fragment,null,r.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:y},r.createElement("label",s({className:"DocSearch-MagnifierLabel"},a.getLabelProps()),r.createElement(m,null),r.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},g)),r.createElement("div",{className:"DocSearch-LoadingIndicator"},r.createElement(jt,null)),r.createElement("input",s({className:"DocSearch-Input",ref:a.inputRef},a.getInputProps({inputElement:a.inputRef.current,autoFocus:a.autoFocus,maxLength:64}))),r.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":u,hidden:!a.state.query},r.createElement(At,null))),r.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":h,onClick:a.onClose},p))}var on=["_highlightResult","_snippetResult"];function sn(e){var t=e.key,n=e.limit,r=void 0===n?5:n,a=function(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(e){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}(t),o=a.getItem().slice(0,r);return{add:function(e){var t=e,n=(t._highlightResult,t._snippetResult,c(t,on)),i=o.findIndex((function(e){return e.objectID===n.objectID}));i>-1&&o.splice(i,1),o.unshift(n),o=o.slice(0,r),a.setItem(o)},remove:function(e){o=o.filter((function(t){return t.objectID!==e.objectID})),a.setItem(o)},getAll:function(){return o}}}function cn(e){const t=`algoliasearch-client-js-${e.key}`;let n;const r=()=>(void 0===n&&(n=e.localStorage||window.localStorage),n),a=()=>JSON.parse(r().getItem(t)||"{}"),o=e=>{r().setItem(t,JSON.stringify(e))};return{get:(t,n,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{(()=>{const t=e.timeToLive?1e3*e.timeToLive:null,n=a(),r=Object.fromEntries(Object.entries(n).filter((([,e])=>void 0!==e.timestamp)));if(o(r),!t)return;const i=Object.fromEntries(Object.entries(r).filter((([,e])=>{const n=(new Date).getTime();return!(e.timestamp+tPromise.all([e?e.value:n(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,n)=>Promise.resolve().then((()=>{const o=a();return o[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:n},r().setItem(t,JSON.stringify(o)),n})),delete:e=>Promise.resolve().then((()=>{const n=a();delete n[JSON.stringify(e)],r().setItem(t,JSON.stringify(n))})),clear:()=>Promise.resolve().then((()=>{r().removeItem(t)}))}}function ln(e){const t=[...e.caches],n=t.shift();return void 0===n?{get:(e,t,n={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,n.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,r,a={miss:()=>Promise.resolve()})=>n.get(e,r,a).catch((()=>ln({caches:t}).get(e,r,a))),set:(e,r)=>n.set(e,r).catch((()=>ln({caches:t}).set(e,r))),delete:e=>n.delete(e).catch((()=>ln({caches:t}).delete(e))),clear:()=>n.clear().catch((()=>ln({caches:t}).clear()))}}function un(e={serializable:!0}){let t={};return{get(n,r,a={miss:()=>Promise.resolve()}){const o=JSON.stringify(n);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);const i=r(),s=a&&a.miss||(()=>Promise.resolve());return i.then((e=>s(e))).then((()=>i))},set:(n,r)=>(t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function dn(e){let t=e.length-1;for(;t>0;t--){const n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}function pn(e,t){return t?(Object.keys(t).forEach((n=>{e[n]=t[n](e)})),e):e}function fn(e,...t){let n=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[n++])))}const mn={WithinQueryParameters:0,WithinHeaders:1};function hn(e,t){const n=e||{},r=n.data||{};return Object.keys(n).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(r[e]=n[e])})),{data:Object.entries(r).length>0?r:void 0,timeout:n.timeout||t,headers:n.headers||{},queryParameters:n.queryParameters||{},cacheable:n.cacheable}}const bn={Read:1,Write:2,Any:3};function gn(e,t=1){return{...e,status:t,lastUpdate:Date.now()}}function yn(e){return"string"==typeof e?{protocol:"https",url:e,accept:bn.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||bn.Any}}const vn="GET",xn="POST";function wn(e,t,n,r){const a=[],o=function(e,t){if(e.method===vn||void 0===e.data&&void 0===t.data)return;const n=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(n)}(n,r),i=function(e,t){const n={...e.headers,...t.headers},r={};return Object.keys(n).forEach((e=>{const t=n[e];r[e.toLowerCase()]=t})),r}(e,r),s=n.method,c=n.method!==vn?{}:{...n.data,...r.data},l={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...c,...r.queryParameters};let u=0;const d=(t,c)=>{const p=t.pop();if(void 0===p)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:En(a)};const f={data:o,headers:i,method:s,url:_n(p,n.path,l),connectTimeout:c(u,e.timeouts.connect),responseTimeout:c(u,r.timeout)},m=e=>{const n={request:f,response:e,host:p,triesLeft:t.length};return a.push(n),n},h={onSuccess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(n){const r=m(n);return n.isTimedOut&&u++,Promise.all([e.logger.info("Retryable failure",jn(r)),e.hostsCache.set(p,gn(p,n.isTimedOut?3:2))]).then((()=>d(t,c)))},onFail(e){throw m(e),function({content:e,status:t},n){let r=e;try{r=JSON.parse(e).message}catch(e){}return function(e,t,n){return{name:"ApiError",message:e,status:t,transporterStackTrace:n}}(r,t,n)}(e,En(a))}};return e.requester.send(f).then((e=>((e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&!~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSuccess(e):t.onFail(e))(e,h)))};return function(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(gn(t))))))).then((e=>{const n=e.filter((e=>function(e){return 1===e.status||Date.now()-e.lastUpdate>12e4}(e))),r=e.filter((e=>function(e){return 3===e.status&&Date.now()-e.lastUpdate<=12e4}(e))),a=[...n,...r];return{getTimeout:(e,t)=>(0===r.length&&0===e?1:r.length+3+e)*t,statelessHosts:a.length>0?a.map((e=>yn(e))):t}}))}(e.hostsCache,t).then((e=>d([...e.statelessHosts].reverse(),e.getTimeout)))}function kn(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const n=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(n)&&(t.value=`${t.value}${n}`),t}};return t}function _n(e,t,n){const r=Sn(n);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return r.length&&(a+=`?${r}`),a}function Sn(e){return Object.keys(e).map((t=>{return fn("%s=%s",t,(n=e[t],"[object Object]"===Object.prototype.toString.call(n)||"[object Array]"===Object.prototype.toString.call(n)?JSON.stringify(e[t]):e[t]));var n})).join("&")}function En(e){return e.map((e=>jn(e)))}function jn(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const On=e=>{const t=e.appId,n=function(e,t,n){const r={"x-algolia-api-key":n,"x-algolia-application-id":t};return{headers:()=>e===mn.WithinHeaders?r:{},queryParameters:()=>e===mn.WithinQueryParameters?r:{}}}(void 0!==e.authMode?e.authMode:mn.WithinHeaders,t,e.apiKey),r=function(e){const{hostsCache:t,logger:n,requester:r,requestsCache:a,responsesCache:o,timeouts:i,userAgent:s,hosts:c,queryParameters:l,headers:u}=e,d={hostsCache:t,logger:n,requester:r,requestsCache:a,responsesCache:o,timeouts:i,userAgent:s,headers:u,queryParameters:l,hosts:c.map((e=>yn(e))),read(e,t){const n=hn(t,d.timeouts.read),r=()=>wn(d,d.hosts.filter((e=>!!(e.accept&bn.Read))),e,n);if(!0!==(void 0!==n.cacheable?n.cacheable:e.cacheable))return r();const a={request:e,mappedRequestOptions:n,transporter:{queryParameters:d.queryParameters,headers:d.headers}};return d.responsesCache.get(a,(()=>d.requestsCache.get(a,(()=>d.requestsCache.set(a,r()).then((e=>Promise.all([d.requestsCache.delete(a),e])),(e=>Promise.all([d.requestsCache.delete(a),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>d.responsesCache.set(a,e)})},write:(e,t)=>wn(d,d.hosts.filter((e=>!!(e.accept&bn.Write))),e,hn(t,d.timeouts.write))};return d}({hosts:[{url:`${t}-dsn.algolia.net`,accept:bn.Read},{url:`${t}.algolia.net`,accept:bn.Write}].concat(dn([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...n.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...n.queryParameters(),...e.queryParameters}}),a={transporter:r,appId:t,addAlgoliaAgent(e,t){r.userAgent.add({segment:e,version:t})},clearCache:()=>Promise.all([r.requestsCache.clear(),r.responsesCache.clear()]).then((()=>{}))};return pn(a,e.methods)},An=e=>(t,n)=>t.method===vn?e.transporter.read(t,n):e.transporter.write(t,n),Cn=e=>(t,n={})=>pn({transporter:e.transporter,appId:e.appId,indexName:t},n.methods),Pn=e=>(t,n)=>{const r=t.map((e=>({...e,params:Sn(e.params||{})})));return e.transporter.read({method:xn,path:"1/indexes/*/queries",data:{requests:r},cacheable:!0},n)},Tn=e=>(t,n)=>Promise.all(t.map((t=>{const{facetName:r,facetQuery:a,...o}=t.params;return Cn(e)(t.indexName,{methods:{searchForFacetValues:Rn}}).searchForFacetValues(r,a,{...n,...o})}))),In=e=>(t,n,r)=>e.transporter.read({method:xn,path:fn("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:n},cacheable:!0},r),Nn=e=>(t,n)=>e.transporter.read({method:xn,path:fn("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},n),Rn=e=>(t,n,r)=>e.transporter.read({method:xn,path:fn("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:n},cacheable:!0},r),Ln=1,Dn=2,Mn=3;function Fn(e,t,n){const r={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:e=>new Promise((t=>{const n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>n.setRequestHeader(t,e.headers[t])));const r=(e,r)=>setTimeout((()=>{n.abort(),t({status:0,content:r,isTimedOut:!0})}),1e3*e),a=r(e.connectTimeout,"Connection timeout");let o;n.onreadystatechange=()=>{n.readyState>n.OPENED&&void 0===o&&(clearTimeout(a),o=r(e.responseTimeout,"Socket timeout"))},n.onerror=()=>{0===n.status&&(clearTimeout(a),clearTimeout(o),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=()=>{clearTimeout(a),clearTimeout(o),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))},logger:(a=Mn,{debug:(e,t)=>(Ln>=a&&console.debug(e,t),Promise.resolve()),info:(e,t)=>(Dn>=a&&console.info(e,t),Promise.resolve()),error:(e,t)=>(console.error(e,t),Promise.resolve())}),responsesCache:un(),requestsCache:un({serializable:!1}),hostsCache:ln({caches:[cn({key:`4.19.1-${e}`}),un()]}),userAgent:kn("4.19.1").add({segment:"Browser",version:"lite"}),authMode:mn.WithinQueryParameters};var a;return On({...r,...n,methods:{search:Pn,searchForFacetValues:Tn,multipleQueries:Pn,multipleSearchForFacetValues:Tn,customRequest:An,initIndex:e=>t=>Cn(e)(t,{methods:{search:Nn,searchForFacetValues:Rn,findAnswers:In}})}})}Fn.version="4.19.1";var Bn=["footer","searchBox"];function zn(e){var t=e.appId,n=e.apiKey,a=e.indexName,i=e.placeholder,u=void 0===i?"Search docs":i,d=e.searchParameters,p=e.maxResultsPerGroup,f=e.onClose,m=void 0===f?Gt:f,h=e.transformItems,b=void 0===h?Wt:h,g=e.hitComponent,y=void 0===g?Et:g,v=e.resultsFooterComponent,x=void 0===v?function(){return null}:v,w=e.navigator,k=e.initialScrollY,_=void 0===k?0:k,S=e.transformSearchClient,E=void 0===S?Wt:S,j=e.disableUserPersonalization,O=void 0!==j&&j,A=e.initialQuery,C=void 0===A?"":A,P=e.translations,T=void 0===P?{}:P,I=e.getMissingResultsUrl,N=e.insights,R=void 0!==N&&N,L=T.footer,D=T.searchBox,M=c(T,Bn),F=l(r.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),B=F[0],z=F[1],U=r.useRef(null),$=r.useRef(null),q=r.useRef(null),H=r.useRef(null),V=r.useRef(null),W=r.useRef(10),K=r.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,64):"").current,G=r.useRef(C||K).current,Q=function(e,t,n){return r.useMemo((function(){var r=Fn(e,t);return r.addAlgoliaAgent("docsearch","3.6.1"),!1===/docsearch.js \(.*\)/.test(r.transporter.userAgent.value)&&r.addAlgoliaAgent("docsearch-react","3.6.1"),n(r)}),[e,t,n])}(t,n,E),Y=r.useRef(sn({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(a),limit:10})).current,Z=r.useRef(sn({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(a),limit:0===Y.getAll().length?7:4})).current,X=r.useCallback((function(e){if(!O){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===Y.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&Z.add(t)}}),[Y,Z,O]),J=r.useCallback((function(e){if(B.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,n={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};B.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(n)}}),[B.context.algoliaInsightsPlugin]),ee=r.useMemo((function(){return wt({id:"docsearch",defaultActiveItemId:0,placeholder:u,openOnFocus:!0,initialState:{query:G,context:{searchSuggestions:[]}},insights:R,navigator:w,onStateChange:function(e){z(e.state)},getSources:function(e){var r=e.query,i=e.state,s=e.setContext,c=e.setStatus;if(!r)return O?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,n=e.event;X(t),Kt(n)||m()},getItemUrl:function(e){return e.item.url},getItems:function(){return Z.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,n=e.event;X(t),Kt(n)||m()},getItemUrl:function(e){return e.item.url},getItems:function(){return Y.getAll()}}];var l=Boolean(R);return Q.search([{query:r,indexName:a,params:o({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(W.current),"hierarchy.lvl2:".concat(W.current),"hierarchy.lvl3:".concat(W.current),"hierarchy.lvl4:".concat(W.current),"hierarchy.lvl5:".concat(W.current),"hierarchy.lvl6:".concat(W.current),"content:".concat(W.current)],snippetEllipsisText:"\u2026",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:l},d)}]).catch((function(e){throw"RetryError"===e.name&&c("error"),e})).then((function(e){var r=e.results[0],c=r.hits,u=r.nbHits,d=Vt(c,(function(e){return Zt(e)}),p);i.context.searchSuggestions.length0&&(re(),V.current&&V.current.focus())}),[G,re]),r.useEffect((function(){function e(){if($.current){var e=.01*window.innerHeight;$.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),r.createElement("div",s({ref:U},ne({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===B.status&&"DocSearch-Container--Stalled","error"===B.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&m()}}),r.createElement("div",{className:"DocSearch-Modal",ref:$},r.createElement("header",{className:"DocSearch-SearchBar",ref:q},r.createElement(an,s({},ee,{state:B,autoFocus:0===G.length,inputRef:V,isFromSelection:Boolean(G)&&G===K,translations:D,onClose:m}))),r.createElement("div",{className:"DocSearch-Dropdown",ref:H},r.createElement(nn,s({},ee,{indexName:a,state:B,hitComponent:y,resultsFooterComponent:x,disableUserPersonalization:O,recentSearches:Z,favoriteSearches:Y,inputRef:V,translations:M,getMissingResultsUrl:I,onItemClick:function(e,t){J(e),X(e),Kt(t)||m()}}))),r.createElement("footer",{className:"DocSearch-Footer"},r.createElement(St,{translations:L}))))}function Un(e){var t=e.isOpen,n=e.onOpen,a=e.onClose,o=e.onInput,i=e.searchButtonRef;r.useEffect((function(){function e(e){var r;(27===e.keyCode&&t||"k"===(null===(r=e.key)||void 0===r?void 0:r.toLowerCase())&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&"/"===e.key&&!t)&&(e.preventDefault(),t?a():document.body.classList.contains("DocSearch--active")||document.body.classList.contains("DocSearch--active")||n()),i&&i.current===document.activeElement&&o&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&o(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,a,o,i])}},6125:(e,t,n)=>{"use strict";n.d(t,{o:()=>o,x:()=>i});var r=n(96540),a=n(74848),o=r.createContext(!1);function i(e){var t=e.children,n=(0,r.useState)(!1),i=n[0],s=n[1];return(0,r.useEffect)((function(){s(!0)}),[]),(0,a.jsx)(o.Provider,{value:i,children:t})}},81316:(e,t,n)=>{"use strict";var r=n(96540),a=n(5338),o=n(80545),i=n(54625),s=n(85290),c=n(38193);const l=[n(10119),n(26134),n(76294),n(35697),n(74100),n(95728)];var u=n(97671),d=n(56347),p=n(22831),f=n(74848);function m(e){var t=e.children;return(0,f.jsx)(f.Fragment,{children:t})}var h=n(5260),b=n(44586),g=n(86025),y=n(6342),v=n(69024),x=n(32131),w=n(14090),k=n(2967),_=n(70440),S=n(41463);function E(){var e=(0,b.A)().i18n,t=e.currentLocale,n=e.defaultLocale,r=e.localeConfigs,a=(0,x.o)(),o=r[t].htmlLang,i=function(e){return e.replace("-","_")};return(0,f.jsxs)(h.A,{children:[Object.entries(r).map((function(e){var t=e[0],n=e[1].htmlLang;return(0,f.jsx)("link",{rel:"alternate",href:a.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,f.jsx)("link",{rel:"alternate",href:a.createUrl({locale:n,fullyQualified:!0}),hrefLang:"x-default"}),(0,f.jsx)("meta",{property:"og:locale",content:i(o)}),Object.values(r).filter((function(e){return o!==e.htmlLang})).map((function(e){return(0,f.jsx)("meta",{property:"og:locale:alternate",content:i(e.htmlLang)},"meta-og-"+e.htmlLang)}))]})}function j(e){var t=e.permalink,n=(0,b.A)().siteConfig.url,r=function(){var e=(0,b.A)().siteConfig,t=e.url,n=e.baseUrl,r=e.trailingSlash,a=(0,d.zy)().pathname;return t+(0,_.Ks)((0,g.Ay)(a),{trailingSlash:r,baseUrl:n})}(),a=t?""+n+t:r;return(0,f.jsxs)(h.A,{children:[(0,f.jsx)("meta",{property:"og:url",content:a}),(0,f.jsx)("link",{rel:"canonical",href:a})]})}function O(){var e=(0,b.A)().i18n.currentLocale,t=(0,y.p)(),n=t.metadata,r=t.image;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(h.A,{children:[(0,f.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,f.jsx)("body",{className:w.w})]}),r&&(0,f.jsx)(v.be,{image:r}),(0,f.jsx)(j,{}),(0,f.jsx)(E,{}),(0,f.jsx)(S.A,{tag:k.C,locale:e}),(0,f.jsx)(h.A,{children:n.map((function(e,t){return(0,f.jsx)("meta",Object.assign({},e),t)}))})]})}var A=new Map;var C=n(6125),P=n(73348),T=n(77387),I=n(205);function N(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

\n

We suggest trying baseUrl =

\n\n'}(e)).replace(/{"use strict";n.d(t,{o:()=>d,l:()=>p});var r=n(96540),a=n(85290);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/docs","mainDocId":"general/getting-started","docs":[{"id":"build/build-client-side","path":"/docs/build-client-side","sidebar":"docs"},{"id":"build/build-dapp","path":"/docs/build-dapp"},{"id":"build/build-data","path":"/docs/build-data","sidebar":"docs"},{"id":"build/build-guide","path":"/docs/build-guide","sidebar":"docs"},{"id":"build/build-guides-coretime-start","path":"/docs/build-guides-coretime-start","sidebar":"docs"},{"id":"build/build-guides-coretime-troubleshoot","path":"/docs/build-guides-coretime-troubleshoot","sidebar":"docs"},{"id":"build/build-guides-install-deps","path":"/docs/build-guides-install-deps","sidebar":"docs"},{"id":"build/build-guides-template-basic","path":"/docs/build-guides-template-basic","sidebar":"docs"},{"id":"build/build-hackathon","path":"/docs/build-hackathon","sidebar":"docs"},{"id":"build/build-hrmp-channels","path":"/docs/build-hrmp-channels","sidebar":"docs"},{"id":"build/build-index","path":"/docs/build-index"},{"id":"build/build-integrate-assets","path":"/docs/build-integrate-assets","sidebar":"docs"},{"id":"build/build-integration","path":"/docs/build-integration","sidebar":"docs"},{"id":"build/build-light-clients","path":"/docs/build-light-clients","sidebar":"docs"},{"id":"build/build-network-overview","path":"/docs/build-network-overview","sidebar":"docs"},{"id":"build/build-node-interaction","path":"/docs/build-node-interaction","sidebar":"docs"},{"id":"build/build-node-management","path":"/docs/build-node-management","sidebar":"docs"},{"id":"build/build-open-source","path":"/docs/build-open-source","sidebar":"docs"},{"id":"build/build-oracle","path":"/docs/build-oracle"},{"id":"build/build-parachains","path":"/docs/build-pdk","sidebar":"docs"},{"id":"build/build-protocol-info","path":"/docs/build-protocol-info","sidebar":"docs"},{"id":"build/build-smart-contracts","path":"/docs/build-smart-contracts","sidebar":"docs"},{"id":"build/build-storage","path":"/docs/build-storage"},{"id":"build/build-tools-index","path":"/docs/build-tools-index","sidebar":"docs"},{"id":"build/build-transaction-construction","path":"/docs/build-transaction-construction","sidebar":"docs"},{"id":"general/alpha-program","path":"/docs/alpha-program","sidebar":"docs"},{"id":"general/ambassadors","path":"/docs/ambassadors","sidebar":"docs"},{"id":"general/bug-bounty","path":"/docs/bug-bounty","sidebar":"docs"},{"id":"general/chain-state-values","path":"/docs/chain-state-values","sidebar":"docs"},{"id":"general/community","path":"/docs/community","sidebar":"docs"},{"id":"general/contributing","path":"/docs/contributing","sidebar":"docs"},{"id":"general/contributors","path":"/docs/contributors","sidebar":"docs"},{"id":"general/decentralized-futures","path":"/docs/decentralized-futures","sidebar":"docs"},{"id":"general/decentralized-voices","path":"/docs/decentralized-voices","sidebar":"docs"},{"id":"general/dev-heroes","path":"/docs/dev-heroes","sidebar":"docs"},{"id":"general/doc-thousand-contributors","path":"/docs/thousand-contributors","sidebar":"docs"},{"id":"general/doc-thousand-validators","path":"/docs/thousand-validators","sidebar":"docs"},{"id":"general/dune-analytics/dunesql-cheatsheet","path":"/docs/general/dunesql-cheatsheet","sidebar":"docs"},{"id":"general/dune-analytics/onboarding-status-and-key-dashboards","path":"/docs/general/onboarding-status-and-key-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/acala-dashboards","path":"/docs/general/dune-analytics/acala-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/assethub-dashboards","path":"/docs/general/dune-analytics/assethub-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/astar-dashboards","path":"/docs/general/dune-analytics/astar-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/bifrost-dashboards","path":"/docs/general/dune-analytics/bifrost-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/bridgehub-dashboards","path":"/docs/general/dune-analytics/bridgehub-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/centrifuge-dashboards","path":"/docs/general/dune-analytics/centrifuge-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/collectives-dashboards","path":"/docs/general/dune-analytics/collectives-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/coretime-dashboards","path":"/docs/general/dune-analytics/coretime-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/energywebx-dashboards","path":"/docs/general/dune-analytics/energywebx-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/frequency-dashboards","path":"/docs/general/dune-analytics/frequency-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/hydration-dashboards","path":"/docs/general/dune-analytics/hydration-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/interlay-dashboards","path":"/docs/general/dune-analytics/interlay-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/invarch-dashboards","path":"/docs/general/dune-analytics/invarch-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/litentry-dashboards","path":"/docs/general/dune-analytics/litentry-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/manta-dashboards","path":"/docs/general/dune-analytics/manta-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/moonbeam-dashboards","path":"/docs/general/dune-analytics/moonbeam-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/neuroweb-dashboards","path":"/docs/general/dune-analytics/neuroweb-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/nodle-dashboards","path":"/docs/general/dune-analytics/nodle-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/pendulum-dashboards","path":"/docs/general/dune-analytics/pendulum-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/people-dashboards","path":"/docs/general/dune-analytics/people-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/phala-dashboards","path":"/docs/general/dune-analytics/phala-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/polimec-dashboards","path":"/docs/general/dune-analytics/polimec-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/polkadex-dashboards","path":"/docs/general/dune-analytics/polkadex-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/snowbridge-dashboards","path":"/docs/general/dune-analytics/snowbridge-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/stellaswap-dashboards","path":"/docs/general/dune-analytics/stellaswap-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards/unique-dashboards","path":"/docs/general/dune-analytics/unique-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-dot-ordinals","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-dot-ordinals"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-governance-dashboard","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-governance-dashboard"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referenda-home","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referenda-home"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referendum-voting-analysis","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referendum-voting-analysis"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nomination-pool","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nomination-pool"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nominators","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nominators"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-pool-member","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-pool-member"},{"id":"general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-validators","path":"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-validators"},{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-governance","path":"/docs/general/dune-analytics/polkadot-dashboards-governance","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-network","path":"/docs/general/dune-analytics/polkadot-dashboards-network","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-overview","path":"/docs/general/dune-analytics/polkadot-dashboards-overview","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-dashboards/polkadot-dashboards-staking","path":"/docs/general/dune-analytics/polkadot-dashboards-staking","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-ecosystem-overview","path":"/docs/general/polkadot-ecosystem-overview","sidebar":"docs"},{"id":"general/dune-analytics/project-dashboards","path":"/docs/general/project-dashboards","sidebar":"docs"},{"id":"general/ecosystem-funds","path":"/docs/ecosystem-funds","sidebar":"docs"},{"id":"general/faq","path":"/docs/faq","sidebar":"docs"},{"id":"general/funding","path":"/docs/funding","sidebar":"docs"},{"id":"general/getting-started","path":"/docs/getting-started","sidebar":"docs"},{"id":"general/glossary","path":"/docs/glossary","sidebar":"docs"},{"id":"general/governance-apps","path":"/docs/governance-apps","sidebar":"docs"},{"id":"general/grants","path":"/docs/grants","sidebar":"docs"},{"id":"general/how-to-dyor","path":"/docs/how-to-dyor","sidebar":"docs"},{"id":"general/kusama/kusama-adversarial-cheatsheet","path":"/docs/kusama-adversarial-cheatsheet","sidebar":"docs"},{"id":"general/kusama/kusama-bug-bounty","path":"/docs/kusama-bug-bounty","sidebar":"docs"},{"id":"general/kusama/kusama-coc","path":"/docs/kusama-coc","sidebar":"docs"},{"id":"general/kusama/kusama-getting-started","path":"/docs/kusama-getting-started","sidebar":"docs"},{"id":"general/kusama/kusama-social-recovery","path":"/docs/kusama-social-recovery","sidebar":"docs"},{"id":"general/kusama/kusama-timeline","path":"/docs/kusama-timeline","sidebar":"docs"},{"id":"general/ledger","path":"/docs/ledger","sidebar":"docs"},{"id":"general/metadata","path":"/docs/metadata","sidebar":"docs"},{"id":"general/multisig-apps","path":"/docs/multisig-apps","sidebar":"docs"},{"id":"general/parachains-apps","path":"/docs/parachains-apps","sidebar":"docs"},{"id":"general/parity-data-dashboards","path":"/docs/parity-data-dashboards","sidebar":"docs"},{"id":"general/polkadot-community-foundation","path":"/docs/polkadot-community-foundation","sidebar":"docs"},{"id":"general/polkadot-direction","path":"/docs/polkadot-direction","sidebar":"docs"},{"id":"general/polkadot-v1","path":"/docs/polkadot-v1","sidebar":"docs"},{"id":"general/polkadot-vault","path":"/docs/polkadot-vault","sidebar":"docs"},{"id":"general/polkadotjs","path":"/docs/polkadotjs","sidebar":"docs"},{"id":"general/polkadotjs-ui","path":"/docs/polkadotjs-ui","sidebar":"docs"},{"id":"general/scams","path":"/docs/learn-scams","sidebar":"docs"},{"id":"general/staking-apps","path":"/docs/staking-apps","sidebar":"docs"},{"id":"general/staking-dashboard","path":"/docs/staking-dashboard","sidebar":"docs"},{"id":"general/start-building","path":"/docs/start-building","sidebar":"docs"},{"id":"general/transaction-attacks","path":"/docs/transaction-attacks","sidebar":"docs"},{"id":"general/wallets-and-extensions","path":"/docs/wallets-and-extensions","sidebar":"docs"},{"id":"general/web3-and-polkadot","path":"/docs/web3-and-polkadot","sidebar":"docs"},{"id":"learn/archive/learn-auction","path":"/docs/learn/learn-auction","sidebar":"docs"},{"id":"learn/archive/learn-controller","path":"/docs/learn/learn-controller","sidebar":"docs"},{"id":"learn/archive/learn-crowdloans","path":"/docs/learn/learn-crowdloans","sidebar":"docs"},{"id":"learn/archive/learn-governance","path":"/docs/learn/learn-governance","sidebar":"docs"},{"id":"learn/archive/learn-launch","path":"/docs/learn/learn-launch","sidebar":"docs"},{"id":"learn/archive/learn-redenomination","path":"/docs/learn/learn-redenomination","sidebar":"docs"},{"id":"learn/archive/learn-treasury","path":"/docs/learn/learn-treasury","sidebar":"docs"},{"id":"learn/learn-account-abstraction","path":"/docs/learn-account-abstraction","sidebar":"docs"},{"id":"learn/learn-account-advanced","path":"/docs/learn-account-advanced","sidebar":"docs"},{"id":"learn/learn-account-balances","path":"/docs/learn-account-balances","sidebar":"docs"},{"id":"learn/learn-account-multisig","path":"/docs/learn-account-multisig","sidebar":"docs"},{"id":"learn/learn-accounts","path":"/docs/learn-accounts","sidebar":"docs"},{"id":"learn/learn-agile-coretime","path":"/docs/learn-agile-coretime","sidebar":"docs"},{"id":"learn/learn-architecture","path":"/docs/learn-architecture","sidebar":"docs"},{"id":"learn/learn-archive","path":"/docs/learn-archive","sidebar":"docs"},{"id":"learn/learn-asset-conversion-assethub","path":"/docs/learn-asset-conversion-assethub","sidebar":"docs"},{"id":"learn/learn-assets","path":"/docs/learn-assets","sidebar":"docs"},{"id":"learn/learn-async-backing","path":"/docs/learn-async-backing","sidebar":"docs"},{"id":"learn/learn-bridges","path":"/docs/learn-bridges","sidebar":"docs"},{"id":"learn/learn-collator","path":"/docs/learn-collator","sidebar":"docs"},{"id":"learn/learn-comparisons","path":"/docs/learn-comparisons","sidebar":"docs"},{"id":"learn/learn-comparisons-avalanche","path":"/docs/learn-comparisons-avalanche","sidebar":"docs"},{"id":"learn/learn-comparisons-cosmos","path":"/docs/learn-comparisons-cosmos","sidebar":"docs"},{"id":"learn/learn-comparisons-ethereum-2","path":"/docs/learn-comparisons-ethereum-2","sidebar":"docs"},{"id":"learn/learn-comparisons-kusama","path":"/docs/learn-comparisons-kusama","sidebar":"docs"},{"id":"learn/learn-comparisons-rollups","path":"/docs/learn-comparisons-rollups","sidebar":"docs"},{"id":"learn/learn-consensus","path":"/docs/learn-consensus","sidebar":"docs"},{"id":"learn/learn-cryptography","path":"/docs/learn-cryptography","sidebar":"docs"},{"id":"learn/learn-DOT","path":"/docs/learn-DOT","sidebar":"docs"},{"id":"learn/learn-dot-ksm-bridge","path":"/docs/learn-dot-ksm-bridge","sidebar":"docs"},{"id":"learn/learn-elastic-scaling","path":"/docs/learn-elastic-scaling","sidebar":"docs"},{"id":"learn/learn-guides-accounts","path":"/docs/learn-guides-accounts","sidebar":"docs"},{"id":"learn/learn-guides-accounts-multisig","path":"/docs/learn-guides-accounts-multisig","sidebar":"docs"},{"id":"learn/learn-guides-accounts-proxy","path":"/docs/learn-guides-accounts-proxy","sidebar":"docs"},{"id":"learn/learn-guides-accounts-proxy-pure","path":"/docs/learn-guides-accounts-proxy-pure","sidebar":"docs"},{"id":"learn/learn-guides-asset-conversion","path":"/docs/learn-guides-asset-conversion","sidebar":"docs"},{"id":"learn/learn-guides-assets","path":"/docs/learn-guides-assets","sidebar":"docs"},{"id":"learn/learn-guides-assets-create","path":"/docs/learn-guides-assets-create","sidebar":"docs"},{"id":"learn/learn-guides-bounties","path":"/docs/learn-guides-bounties","sidebar":"docs"},{"id":"learn/learn-guides-bridges","path":"/docs/learn-guides-bridges","sidebar":"docs"},{"id":"learn/learn-guides-claims","path":"/docs/learn-guides-claims","sidebar":"docs"},{"id":"learn/learn-guides-coretime-marketplaces","path":"/docs/learn-guides-coretime-marketplaces","sidebar":"docs"},{"id":"learn/learn-guides-coretime-parachains","path":"/docs/learn-guides-coretime-parachains","sidebar":"docs"},{"id":"learn/learn-guides-coretime-swap","path":"/docs/learn-guides-coretime-swap","sidebar":"docs"},{"id":"learn/learn-guides-dot-ksm-bridge","path":"/docs/learn-guides-dot-ksm-bridge","sidebar":"docs"},{"id":"learn/learn-guides-identity","path":"/docs/learn-guides-identity","sidebar":"docs"},{"id":"learn/learn-guides-ledger","path":"/docs/learn-guides-ledger","sidebar":"docs"},{"id":"learn/learn-guides-nominator","path":"/docs/learn-guides-nominator","sidebar":"docs"},{"id":"learn/learn-guides-polkadot-opengov","path":"/docs/learn-guides-polkadot-opengov","sidebar":"docs"},{"id":"learn/learn-guides-staking","path":"/docs/learn-guides-staking","sidebar":"docs"},{"id":"learn/learn-guides-staking-pools","path":"/docs/learn-guides-staking-pools","sidebar":"docs"},{"id":"learn/learn-guides-transfers","path":"/docs/learn-guides-transfers","sidebar":"docs"},{"id":"learn/learn-guides-treasury","path":"/docs/learn-guides-treasury","sidebar":"docs"},{"id":"learn/learn-guides-vault","path":"/docs/learn-guides-vault","sidebar":"docs"},{"id":"learn/learn-hyperbridge","path":"/docs/learn-hyperbridge","sidebar":"docs"},{"id":"learn/learn-identity","path":"/docs/learn-identity","sidebar":"docs"},{"id":"learn/learn-implementations","path":"/docs/learn-implementations"},{"id":"learn/learn-inflation","path":"/docs/learn-inflation","sidebar":"docs"},{"id":"learn/learn-jam-chain","path":"/docs/learn-jam-chain","sidebar":"docs"},{"id":"learn/learn-jam-faq","path":"/docs/learn-jam-faq","sidebar":"docs"},{"id":"learn/learn-nft","path":"/docs/learn-nft","sidebar":"docs"},{"id":"learn/learn-nft-pallets","path":"/docs/learn-nft-pallets","sidebar":"docs"},{"id":"learn/learn-nft-projects","path":"/docs/learn-nft-projects","sidebar":"docs"},{"id":"learn/learn-nomination-pools","path":"/docs/learn-nomination-pools","sidebar":"docs"},{"id":"learn/learn-nominator","path":"/docs/learn-nominator","sidebar":"docs"},{"id":"learn/learn-offenses","path":"/docs/learn-offenses","sidebar":"docs"},{"id":"learn/learn-parachains","path":"/docs/learn-parachains","sidebar":"docs"},{"id":"learn/learn-parachains-faq","path":"/docs/learn-parachains-faq","sidebar":"docs"},{"id":"learn/learn-parachains-protocol","path":"/docs/learn-parachains-protocol","sidebar":"docs"},{"id":"learn/learn-phragmen","path":"/docs/learn-phragmen","sidebar":"docs"},{"id":"learn/learn-polkadot-host","path":"/docs/learn-polkadot-host","sidebar":"docs"},{"id":"learn/learn-polkadot-js-guides","path":"/docs/learn-polkadot-js-guides","sidebar":"docs"},{"id":"learn/learn-polkadot-opengov","path":"/docs/learn-polkadot-opengov","sidebar":"docs"},{"id":"learn/learn-polkadot-opengov-origins","path":"/docs/learn-polkadot-opengov-origins","sidebar":"docs"},{"id":"learn/learn-polkadot-opengov-treasury","path":"/docs/learn-polkadot-opengov-treasury","sidebar":"docs"},{"id":"learn/learn-polkadot-technical-fellowship","path":"/docs/learn-polkadot-technical-fellowship","sidebar":"docs"},{"id":"learn/learn-polkadotjs","path":"/docs/learn-polkadotjs","sidebar":"docs"},{"id":"learn/learn-proxies","path":"/docs/learn-proxies","sidebar":"docs"},{"id":"learn/learn-proxies-pure","path":"/docs/learn-proxies-pure","sidebar":"docs"},{"id":"learn/learn-runtime-upgrades","path":"/docs/learn-runtime-upgrades","sidebar":"docs"},{"id":"learn/learn-safrole","path":"/docs/learn-safrole","sidebar":"docs"},{"id":"learn/learn-snowbridge","path":"/docs/learn-snowbridge","sidebar":"docs"},{"id":"learn/learn-spree","path":"/docs/learn-spree","sidebar":"docs"},{"id":"learn/learn-staking","path":"/docs/learn-staking","sidebar":"docs"},{"id":"learn/learn-staking-advanced","path":"/docs/learn-staking-advanced","sidebar":"docs"},{"id":"learn/learn-system-chains","path":"/docs/learn-system-chains","sidebar":"docs"},{"id":"learn/learn-teleport","path":"/docs/learn-teleport","sidebar":"docs"},{"id":"learn/learn-transactions","path":"/docs/learn-transactions","sidebar":"docs"},{"id":"learn/learn-validator","path":"/docs/learn-validator","sidebar":"docs"},{"id":"learn/learn-video-tutorials","path":"/docs/learn-video-tutorials","sidebar":"docs"},{"id":"learn/learn-wasm","path":"/docs/learn-wasm","sidebar":"docs"},{"id":"learn/learn-xcm","path":"/docs/learn-xcm","sidebar":"docs"},{"id":"learn/learn-xcm-instructions","path":"/docs/learn-xcm-instructions","sidebar":"docs"},{"id":"learn/learn-xcm-pallet","path":"/docs/learn-xcm-pallet","sidebar":"docs"},{"id":"learn/learn-xcm-transport","path":"/docs/learn-xcm-transport","sidebar":"docs"},{"id":"learn/learn-xcm-usecases","path":"/docs/learn-xcm-usecases","sidebar":"docs"},{"id":"learn/learn-xcvm","path":"/docs/learn-xcvm","sidebar":"docs"},{"id":"learn/xcm/executor_config/learn-xcm-docs-config-deep-dive","path":"/docs/learn/xcm/config-deep-dive","sidebar":"docs"},{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-fees","path":"/docs/learn/xcm/fundamentals-fees","sidebar":"docs"},{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-multiasset","path":"/docs/learn/xcm/fundamentals-multiasset","sidebar":"docs"},{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-summary","path":"/docs/learn/xcm/fundamentals-summary","sidebar":"docs"},{"id":"learn/xcm/fundamentals/learn-xcm-docs-fundamentals-xcvm","path":"/docs/learn/xcm/fundamentals-xcvm","sidebar":"docs"},{"id":"learn/xcm/fundamentals/multilocation/learn-xcm-docs-multilocation-example","path":"/docs/learn/xcm/fundamentals/multilocation-example","sidebar":"docs"},{"id":"learn/xcm/fundamentals/multilocation/learn-xcm-docs-multilocation-junctions","path":"/docs/learn/xcm/fundamentals/multilocation-junctions","sidebar":"docs"},{"id":"learn/xcm/fundamentals/multilocation/learn-xcm-docs-multilocation-summary","path":"/docs/learn/xcm/fundamentals/multilocation-summary","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-assets","path":"/docs/learn/xcm/journey-assets","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-channels","path":"/docs/learn/xcm/journey-channels","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-expectations","path":"/docs/learn/xcm/journey-expectations","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-fees","path":"/docs/learn/xcm/journey-fees","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-holding","path":"/docs/learn/xcm/journey-holding","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-origin","path":"/docs/learn/xcm/journey-origin","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-queries","path":"/docs/learn/xcm/journey-queries","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-register","path":"/docs/learn/xcm/journey-register","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-summary","path":"/docs/learn/xcm/journey-summary","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-transact","path":"/docs/learn/xcm/journey-transact","sidebar":"docs"},{"id":"learn/xcm/journey/learn-xcm-docs-journey-version","path":"/docs/learn/xcm/journey-version","sidebar":"docs"},{"id":"learn/xcm/journey/locks/learn-xcm-docs-journey-locks","path":"/docs/learn/xcm/journey-locks","sidebar":"docs"},{"id":"learn/xcm/journey/transfers/learn-xcm-docs-transfers-reserve","path":"/docs/learn/xcm/journey/transfers-reserve","sidebar":"docs"},{"id":"learn/xcm/journey/transfers/learn-xcm-docs-transfers-summary","path":"/docs/learn/xcm/journey/transfers-summary","sidebar":"docs"},{"id":"learn/xcm/journey/transfers/learn-xcm-docs-transfers-teleport","path":"/docs/learn/xcm/journey/transfers-teleport","sidebar":"docs"},{"id":"learn/xcm/learn-xcm-docs-intro","path":"/docs/learn/xcm/introduction","sidebar":"docs"},{"id":"learn/xcm/learn-xcm-docs-testing","path":"/docs/learn/xcm/testing","sidebar":"docs"},{"id":"learn/xcm/overview/learn-xcm-docs-overview-architecture","path":"/docs/learn/xcm/overview-architecture","sidebar":"docs"},{"id":"learn/xcm/overview/learn-xcm-docs-overview-format","path":"/docs/learn/xcm/overview-format","sidebar":"docs"},{"id":"learn/xcm/overview/learn-xcm-docs-overview-intro","path":"/docs/learn/xcm/overview-intro","sidebar":"docs"},{"id":"learn/xcm/overview/learn-xcm-docs-overview-summary","path":"/docs/learn/xcm/overview-summary","sidebar":"docs"},{"id":"learn/xcm/overview/learn-xcm-docs-overview-xcvm","path":"/docs/learn/xcm/overview-xcvm","sidebar":"docs"},{"id":"learn/xcm/quickstart/learn-xcm-docs-quickstart-first-look","path":"/docs/learn/xcm/quickstart-first-look","sidebar":"docs"},{"id":"learn/xcm/quickstart/learn-xcm-docs-quickstart-simulator","path":"/docs/learn/xcm/quickstart-simulator","sidebar":"docs"},{"id":"learn/xcm/quickstart/learn-xcm-docs-quickstart-summary","path":"/docs/learn/xcm/quickstart-summary","sidebar":"docs"},{"id":"learn/xcm/reference/learn-xcm-docs-reference-glossary","path":"/docs/learn/xcm/reference-glossary","sidebar":"docs"},{"id":"learn/xcm/reference/learn-xcm-docs-reference-xcvm-registers","path":"/docs/learn/xcm/reference-xcvm-registers","sidebar":"docs"},{"id":"maintain/archive/maintain-guides-democracy","path":"/docs/maintain/maintain-guides-democracy","sidebar":"docs"},{"id":"maintain/archive/maintain-guides-how-to-join-council","path":"/docs/maintain/maintain-guides-how-to-join-council","sidebar":"docs"},{"id":"maintain/archive/maintain-guides-how-to-vote-councillor","path":"/docs/maintain/maintain-guides-how-to-vote-councillor","sidebar":"docs"},{"id":"maintain/doc-maintain-guides-validator-community","path":"/docs/maintain-guides-validator-community","sidebar":"docs"},{"id":"maintain/kusama/maintain-guides-how-to-validate-kusama","path":"/docs/maintain-guides-how-to-validate-kusama","sidebar":"docs"},{"id":"maintain/kusama/maintain-guides-society-kusama","path":"/docs/maintain-guides-society-kusama","sidebar":"docs"},{"id":"maintain/maintain-archive","path":"/docs/maintain-archive","sidebar":"docs"},{"id":"maintain/maintain-bootnode","path":"/docs/maintain-bootnode","sidebar":"docs"},{"id":"maintain/maintain-endpoints","path":"/docs/maintain-endpoints","sidebar":"docs"},{"id":"maintain/maintain-errors","path":"/docs/maintain-errors","sidebar":"docs"},{"id":"maintain/maintain-guides-async-backing","path":"/docs/maintain-guides-async-backing","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-chill","path":"/docs/maintain-guides-how-to-chill","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-monitor-your-node","path":"/docs/maintain-guides-how-to-monitor-your-node","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-stop-validating","path":"/docs/maintain-guides-how-to-stop-validating","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-systemd","path":"/docs/maintain-guides-how-to-systemd","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-upgrade","path":"/docs/maintain-guides-how-to-upgrade","sidebar":"docs"},{"id":"maintain/maintain-guides-how-to-validate-polkadot","path":"/docs/maintain-guides-how-to-validate-polkadot","sidebar":"docs"},{"id":"maintain/maintain-guides-secure-validator","path":"/docs/maintain-guides-secure-validator","sidebar":"docs"},{"id":"maintain/maintain-guides-validator-payout","path":"/docs/maintain-guides-validator-payout","sidebar":"docs"},{"id":"maintain/maintain-index","path":"/docs/maintain-index","sidebar":"docs"},{"id":"maintain/maintain-networks","path":"/docs/maintain-networks","sidebar":"docs"},{"id":"maintain/maintain-polkadot-parameters","path":"/docs/maintain-polkadot-parameters","sidebar":"docs"},{"id":"maintain/maintain-rpc","path":"/docs/maintain-rpc","sidebar":"docs"},{"id":"maintain/maintain-sync","path":"/docs/maintain-sync","sidebar":"docs"},{"id":"maintain/maintain-wss","path":"/docs/maintain-wss","sidebar":"docs"},{"id":"/explore-index","path":"/docs/explore-index","sidebar":"docs"},{"id":"/wallets-index","path":"/docs/wallets-index","sidebar":"docs"},{"id":"/apps-index","path":"/docs/apps-index","sidebar":"docs"},{"id":"/dashboards-index","path":"/docs/dashboards-index","sidebar":"docs"},{"id":"general/dune-analytics","path":"/docs/general/dune-analytics","sidebar":"docs"},{"id":"general/dune-analytics/polkadot-dashboards","path":"/docs/general/dune-analytics/polkadot-dashboards","sidebar":"docs"},{"id":"general/dune-analytics/parachain-dashboards","path":"/docs/general/dune-analytics/parachain-dashboards","sidebar":"docs"},{"id":"/community-index","path":"/docs/community-index","sidebar":"docs"},{"id":"/programs-index","path":"/docs/programs-index","sidebar":"docs"},{"id":"/learn-index","path":"/docs/learn-index","sidebar":"docs"},{"id":"/general-index","path":"/docs/general-index","sidebar":"docs"},{"id":"/polkadot-vision-index","path":"/docs/polkadot-vision-index","sidebar":"docs"},{"id":"/stay-safe-index","path":"/docs/stay-safe-index","sidebar":"docs"},{"id":"/learn-basics-index","path":"/docs/learn-basics-index","sidebar":"docs"},{"id":"/learn-staking-index","path":"/docs/learn-staking-index","sidebar":"docs"},{"id":"/learn-polkadot-opengov-index","path":"/docs/learn-polkadot-opengov-index","sidebar":"docs"},{"id":"/learn-assets-index","path":"/docs/learn-assets-index","sidebar":"docs"},{"id":"/learn-participants-index","path":"/docs/learn-participants-index","sidebar":"docs"},{"id":"/learn-components-index","path":"/docs/learn-components-index","sidebar":"docs"},{"id":"/learn-advanced-index","path":"/docs/learn-advanced-index","sidebar":"docs"},{"id":"/learn-parachains-index","path":"/docs/learn-parachains-index","sidebar":"docs"},{"id":"/learn-agile-coretime-index","path":"/docs/learn-agile-coretime-index","sidebar":"docs"},{"id":"/learn-xcm-index","path":"/docs/learn-xcm-index","sidebar":"docs"},{"id":"learn/xcm","path":"/docs/learn/xcm","sidebar":"docs"},{"id":"/learn/xcm/overview","path":"/docs/learn/xcm/overview","sidebar":"docs"},{"id":"/learn/xcm/quickstart","path":"/docs/learn/xcm/quickstart","sidebar":"docs"},{"id":"/learn/xcm/fundamentals","path":"/docs/learn/xcm/fundamentals","sidebar":"docs"},{"id":"/learn/xcm/fundamentals/multilocation","path":"/docs/learn/xcm/fundamentals/multilocation","sidebar":"docs"},{"id":"/learn/xcm/journey","path":"/docs/learn/xcm/journey","sidebar":"docs"},{"id":"/learn/xcm/journey/transfers","path":"/docs/learn/xcm/journey/transfers","sidebar":"docs"},{"id":"/learn/xcm/references","path":"/docs/learn/xcm/references","sidebar":"docs"},{"id":"/learn-comparisons-index","path":"/docs/learn-comparisons-index","sidebar":"docs"},{"id":"/learn-future-implementations-index","path":"/docs/learn-future-implementations-index","sidebar":"docs"},{"id":"/learn-jam","path":"/docs/learn-jam","sidebar":"docs"},{"id":"/build-client-index","path":"/docs/build-client-index","sidebar":"docs"},{"id":"/build-protocol-index","path":"/docs/build-protocol-index","sidebar":"docs"},{"id":"/build-archive-index","path":"/docs/build-archive-index","sidebar":"docs"},{"id":"/maintain-node-index","path":"/docs/maintain-node-index","sidebar":"docs"},{"id":"/maintain-collator-index","path":"/docs/maintain-collator-index","sidebar":"docs"},{"id":"/maintain-validator-index","path":"/docs/maintain-validator-index","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/docs/explore-index","label":"Explore"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var s=n(59940);const c=JSON.parse('{"docusaurusVersion":"3.5.2","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.5.2"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.5.2"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.5.2"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.5.2"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.5.2"},"docusaurus-theme-search-algolia":{"type":"package","name":"@docusaurus/theme-search-algolia","version":"3.5.2"},"docusaurus-plugin-client-redirects":{"type":"package","name":"@docusaurus/plugin-client-redirects","version":"3.5.2"},"docusaurus-theme-mermaid":{"type":"package","name":"@docusaurus/theme-mermaid","version":"3.5.2"}}}');var l=n(74848),u={siteConfig:a.default,siteMetadata:c,globalData:o,i18n:i,codeTranslations:s},d=r.createContext(u);function p(e){var t=e.children;return(0,l.jsx)(d.Provider,{value:u,children:t})}},67489:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(77387),a=n(96540),o=n(38193),i=n(5260),s=n(70440),c=n(96300),l=n(53102),u=n(74848);function d(e){var t=e.error,n=e.tryAgain;return(0,u.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,u.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,u.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,u.jsx)(p,{error:t})]})}function p(e){var t=e.error,n=(0,s.rA)(t).map((function(e){return e.message})).join("\n\nCause:\n");return(0,u.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function f(e){var t=e.children;return(0,u.jsx)(l.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function m(e){var t=e.error,n=e.tryAgain;return(0,u.jsx)(f,{children:(0,u.jsxs)(b,{fallback:function(){return(0,u.jsx)(d,{error:t,tryAgain:n})},children:[(0,u.jsx)(i.A,{children:(0,u.jsx)("title",{children:"Page Error"})}),(0,u.jsx)(c.A,{children:(0,u.jsx)(d,{error:t,tryAgain:n})})]})})}var h=function(e){return(0,u.jsx)(m,Object.assign({},e))},b=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={error:null},n}(0,r.A)(t,e);var n=t.prototype;return n.componentDidCatch=function(e){o.A.canUseDOM&&this.setState({error:e})},n.render=function(){var e=this,t=this.props.children,n=this.state.error;if(n){var r,a={error:n,tryAgain:function(){return e.setState({error:null})}};return(null!=(r=this.props.fallback)?r:h)(a)}return null!=t?t:null},t}(a.Component)},38193:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document;const a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(96540);var r=n(80545),a=n(74848);function o(e){return(0,a.jsx)(r.mg,Object.assign({},e))}},28774:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(98587),a=n(96540),o=n(54625),i=n(70440),s=n(44586),c=n(16654),l=n(38193),u=n(63427),d=n(86025),p=n(74848),f=["isNavLink","to","href","activeClassName","isActive","data-noBrokenLinkCheck","autoAddBaseUrl"];function m(e,t){var n,m,h,b=e.isNavLink,g=e.to,y=e.href,v=e.activeClassName,x=e.isActive,w=e["data-noBrokenLinkCheck"],k=e.autoAddBaseUrl,_=void 0===k||k,S=(0,r.A)(e,f),E=(0,s.A)().siteConfig,j=E.trailingSlash,O=E.baseUrl,A=E.future.experimental_router,C=(0,d.hH)().withBaseUrl,P=(0,u.A)(),T=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,(function(){return T.current}));var I=g||y;var N,R,L=(0,c.A)(I),D=null==I?void 0:I.replace("pathname://",""),M=void 0!==D?(N=D,_&&function(e){return e.startsWith("/")}(N)?C(N):N):void 0;"hash"===A&&null!=(n=M)&&n.startsWith("./")&&(M=null==(R=M)?void 0:R.slice(1));M&&L&&(M=(0,i.Ks)(M,{trailingSlash:j,baseUrl:O}));var F=(0,a.useRef)(!1),B=b?o.k2:o.N_,z=l.A.canUseIntersectionObserver,U=(0,a.useRef)(),$=function(){F.current||null==M||(window.docusaurus.preload(M),F.current=!0)};(0,a.useEffect)((function(){return!z&&L&&l.A.canUseDOM&&null!=M&&window.docusaurus.prefetch(M),function(){z&&U.current&&U.current.disconnect()}}),[U,M,z,L]);var q=null!=(m=null==(h=M)?void 0:h.startsWith("#"))&&m,H=!S.target||"_self"===S.target,V=!M||!L||!H||q&&"hash"!==A;w||!q&&V||P.collectLink(M),S.id&&P.collectAnchor(S.id);var W={};return V?(0,p.jsx)("a",Object.assign({ref:T,href:M},I&&!L&&{target:"_blank",rel:"noopener noreferrer"},S,W)):(0,p.jsx)(B,Object.assign({},S,{onMouseEnter:$,onTouchStart:$,innerRef:function(e){T.current=e,z&&e&&L&&(U.current=new window.IntersectionObserver((function(t){t.forEach((function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(U.current.unobserve(e),U.current.disconnect(),null!=M&&window.docusaurus.prefetch(M))}))})),U.current.observe(e))},to:M},b&&{isActive:x,activeClassName:v},W))}const h=a.forwardRef(m)},21312:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,T:()=>c});var r=n(96540),a=n(74848);function o(e,t){var n=e.split(/(\{\w+\})/).map((function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e}));return n.some((function(e){return(0,r.isValidElement)(e)}))?n.map((function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e})).filter((function(e){return""!==e})):n.join("")}var i=n(59940);function s(e){var t,n,r=e.id,a=e.message;if(void 0===r&&void 0===a)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=i[null!=r?r:a])?n:a)?t:r}function c(e,t){return o(s({message:e.message,id:e.id}),t)}function l(e){var t=e.children,n=e.id,r=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var i=s({message:t,id:n});return(0,a.jsx)(a.Fragment,{children:o(i,r)})}},17065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});var r="default"},16654:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>a,z:()=>r})},86025:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,hH:()=>i});var r=n(96540),a=n(44586),o=n(16654);function i(){var e=(0,a.A)().siteConfig,t=e.baseUrl,n=e.url,i=e.future.experimental_router,s=(0,r.useCallback)((function(e,r){return function(e){var t=e.siteUrl,n=e.baseUrl,r=e.url,a=e.options,i=void 0===a?{}:a,s=i.forcePrependBaseUrl,c=void 0!==s&&s,l=i.absolute,u=void 0!==l&&l,d=e.router;if(!r||r.startsWith("#")||(0,o.z)(r))return r;if("hash"===d)return r.startsWith("/")?"."+r:"./"+r;if(c)return n+r.replace(/^\//,"");if(r===n.replace(/\/$/,""))return n;var p=r.startsWith(n)?r:n+r.replace(/^\//,"");return u?t+p:p}({siteUrl:n,baseUrl:t,url:e,options:r,router:i})}),[n,t,i]);return{withBaseUrl:s}}function s(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}},63427:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(96540),a=(n(74848),r.createContext({collectAnchor:function(){},collectLink:function(){}})),o=function(){return(0,r.useContext)(a)};function i(){return o()}},44586:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(96540),a=n(73348);function o(){return(0,r.useContext)(a.o)}},92303:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(96540),a=n(6125);function o(){return(0,r.useContext)(a.o)}},205:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540);const a=n(38193).A.canUseDOM?r.useLayoutEffect:r.useEffect},86921:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=function(e){return"object"==typeof e&&!!e&&Object.keys(e).length>0};function a(e){var t={};return function e(n,a){Object.entries(n).forEach((function(n){var o=n[0],i=n[1],s=a?a+"."+o:o;r(i)?e(i,s):t[s]=i}))}(e),t}},53102:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>o});var r=n(96540),a=n(74848),o=r.createContext(null);function i(e){var t=e.children,n=e.value,i=r.useContext(o),s=(0,r.useMemo)((function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:i,value:n})}),[i,n]);return(0,a.jsx)(o.Provider,{value:s,children:t})}},53886:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>b,XK:()=>v,g1:()=>y});var r=n(96540),a=n(44070),o=n(17065),i=n(6342),s=n(75376),c=n(43807),l=n(74848),u=function(e){return"docs-preferred-version-"+e},d={save:function(e,t,n){(0,s.Wf)(u(e),{persistence:t}).set(n)},read:function(e,t){return(0,s.Wf)(u(e),{persistence:t}).get()},clear:function(e,t){(0,s.Wf)(u(e),{persistence:t}).del()}},p=function(e){return Object.fromEntries(e.map((function(e){return[e,{preferredVersionName:null}]})))};var f=r.createContext(null);function m(){var e=(0,a.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((function(){return Object.keys(e)}),[e]),o=(0,r.useState)((function(){return p(n)})),s=o[0],c=o[1];return(0,r.useEffect)((function(){c(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map((function(e){return[e,(t=e,a=d.read(t,n),r[t].versions.some((function(e){return e.name===a}))?{preferredVersionName:a}:(d.clear(t,n),{preferredVersionName:null}))];var t,a})))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[s,(0,r.useMemo)((function(){return{savePreferredVersion:function(e,n){d.save(e,t,n),c((function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))}))}}}),[t])]}function h(e){var t=e.children,n=m();return(0,l.jsx)(f.Provider,{value:n,children:t})}function b(e){var t=e.children;return(0,l.jsx)(h,{children:t})}function g(){var e=(0,r.useContext)(f);if(!e)throw new c.dV("DocsPreferredVersionContextProvider");return e}function y(e){var t;void 0===e&&(e=o.W);var n=(0,a.ht)(e),i=g(),s=i[0],c=i[1],l=s[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find((function(e){return e.name===l})))?t:null,savePreferredVersionName:(0,r.useCallback)((function(t){c.savePreferredVersion(e,t)}),[c,e])}}function v(){var e=(0,a.Gy)(),t=g()[0];var n=Object.keys(e);return Object.fromEntries(n.map((function(n){return[n,(r=n,o=e[r],i=t[r].preferredVersionName,null!=(a=o.versions.find((function(e){return e.name===i})))?a:null)];var r,a,o,i})))}},82565:(e,t,n)=>{"use strict";n.d(t,{k:()=>o,v:()=>i});var r=n(44070),a=n(53886);function o(e,t){return"docs-"+e+"-"+t}function i(){var e=(0,r.Gy)(),t=(0,r.gk)(),n=(0,a.XK)();return[].concat(Object.keys(e).map((function(r){var a,i=(null==t?void 0:t.activePlugin.pluginId)===r?t.activeVersion:void 0,s=n[r],c=e[r].versions.find((function(e){return e.isLast}));return o(r,(null!=(a=null!=i?i:s)?a:c).name)})))}},60609:(e,t,n)=>{"use strict";n.d(t,{V:()=>c,t:()=>l});var r=n(96540),a=n(43807),o=n(74848),i=Symbol("EmptyContext"),s=r.createContext(i);function c(e){var t=e.children,n=e.name,a=e.items,i=(0,r.useMemo)((function(){return n&&a?{name:n,items:a}:null}),[n,a]);return(0,o.jsx)(s.Provider,{value:i,children:t})}function l(){var e=(0,r.useContext)(s);if(e===i)throw new a.dV("DocsSidebarProvider");return e}},26972:(e,t,n)=>{"use strict";n.d(t,{$S:()=>h,B5:()=>j,Nr:()=>m,OF:()=>k,QB:()=>E,Vd:()=>_,Y:()=>x,cC:()=>f,d1:()=>O,fW:()=>S,w8:()=>y});var r=n(43845),a=n(96540),o=n(56347),i=n(22831),s=n(44070),c=n(99169),l=n(31682),u=n(53886),d=n(23025),p=n(60609);function f(e){var t=(0,d.r)();if(e){var n=t.docs[e];if(!n)throw new Error("no version doc found by id="+e);return n}}function m(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(var t,n=(0,r.A)(e.items);!(t=n()).done;){var a=m(t.value);if(a)return a}}(e):void 0:e.href}function h(){var e=(0,o.zy)().pathname,t=(0,p.t)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");var n=w({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(e+" is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.");return n}var b=function(e,t){return void 0!==e&&(0,c.ys)(e,t)},g=function(e,t){return e.some((function(e){return y(e,t)}))};function y(e,t){return"link"===e.type?b(e.href,t):"category"===e.type&&(b(e.href,t)||g(e.items,t))}function v(e,t){switch(e.type){case"category":return y(e,t)||e.items.some((function(e){return v(e,t)}));case"link":return!e.unlisted||y(e,t);default:return!0}}function x(e,t){return(0,a.useMemo)((function(){return e.filter((function(e){return v(e,t)}))}),[e,t])}function w(e){var t=e.sidebarItems,n=e.pathname,a=e.onlyCategories,o=void 0!==a&&a,i=[];return function e(t){for(var a,s=(0,r.A)(t);!(a=s()).done;){var l=a.value;if("category"===l.type&&((0,c.ys)(l.href,n)||e(l.items))||"link"===l.type&&(0,c.ys)(l.href,n))return o&&"category"!==l.type||i.unshift(l),!0}return!1}(t),i}function k(){var e,t=(0,p.t)(),n=(0,o.zy)().pathname;return!1!==(null==(e=(0,s.vT)())?void 0:e.pluginData.breadcrumbs)&&t?w({sidebarItems:t.items,pathname:n}):null}function _(e){var t=(0,s.zK)(e).activeVersion,n=(0,u.g1)(e).preferredVersion,r=(0,s.r7)(e);return(0,a.useMemo)((function(){return(0,l.sb)([t,n,r].filter(Boolean))}),[t,n,r])}function S(e,t){var n=_(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.sidebars?Object.entries(e.sidebars):[]})),r=t.find((function(t){return t[0]===e}));if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\nAvailable sidebar ids are:\n- '+t.map((function(e){return e[0]})).join("\n- "));return r[1]}),[e,n])}function E(e,t){var n=_(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.docs})),r=t.find((function(t){return t.id===e}));if(!r){if(n.flatMap((function(e){return e.draftIds})).includes(e))return null;throw new Error("Couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+' "'+n.map((function(e){return e.name})).join(", ")+'".\nAvailable doc ids are:\n- '+(0,l.sb)(t.map((function(e){return e.id}))).join("\n- "))}return r}),[e,n])}function j(e){var t=e.route,n=(0,o.zy)(),r=(0,d.r)(),a=t.routes,s=a.find((function(e){return(0,o.B6)(n.pathname,e)}));if(!s)return null;var c=s.sidebar,l=c?r.docsSidebars[c]:void 0;return{docElement:(0,i.v)(a),sidebarName:c,sidebarItems:l}}function O(e){return e.filter((function(e){return!("category"===e.type||"link"===e.type)||!!m(e)}))}},23025:(e,t,n)=>{"use strict";n.d(t,{n:()=>s,r:()=>c});var r=n(96540),a=n(43807),o=n(74848),i=r.createContext(null);function s(e){var t=e.children,n=e.version;return(0,o.jsx)(i.Provider,{value:n,children:t})}function c(){var e=(0,r.useContext)(i);if(null===e)throw new a.dV("DocsVersionProvider");return e}},44070:(e,t,n)=>{"use strict";n.d(t,{zK:()=>g,vT:()=>f,gk:()=>m,Gy:()=>d,HW:()=>y,ht:()=>p,r7:()=>b,jh:()=>h});var r=n(56347),a=n(44586),o=n(17065);function i(e,t){void 0===t&&(t={});var n=(0,a.A)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}var s=function(e){return e.versions.find((function(e){return e.isLast}))};function c(e,t){return[].concat(e.versions).sort((function(e,t){return e.path===t.path?0:e.path.includes(t.path)?-1:t.path.includes(e.path)?1:0})).find((function(e){return!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})}))}function l(e,t){var n,a,o=c(e,t),i=null==o?void 0:o.docs.find((function(e){return!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:o,activeDoc:i,alternateDocVersions:i?(n=i.id,a={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===n&&(a[e.name]=t)}))})),a):{}}}var u={},d=function(){var e;return null!=(e=i("docusaurus-plugin-content-docs"))?e:u},p=function(e){try{return function(e,t,n){void 0===t&&(t=o.W),void 0===n&&(n={});var r=i(e),a=null==r?void 0:r[t];if(!a&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return a}("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":" (pluginId="+e),{cause:t})}};function f(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var a=Object.entries(e).sort((function(e,t){return t[1].path.localeCompare(e[1].path)})).find((function(e){var n=e[1];return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map((function(e){return e.path})).join(", "));return o}(d(),(0,r.zy)().pathname,e)}function m(e){void 0===e&&(e={});var t=f(e),n=(0,r.zy)().pathname;if(t)return{activePlugin:t,activeVersion:c(t.pluginData,n)}}function h(e){return p(e).versions}function b(e){var t=p(e);return s(t)}function g(e){return l(p(e),(0,r.zy)().pathname)}function y(e){return function(e,t){var n=s(e);return{latestDocSuggestion:l(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(p(e),(0,r.zy)().pathname)}},76294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5947),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout((function(){a().start()}),200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){a().done()}}},26134:(e,t,n)=>{"use strict";var r,a,o=n(71765),i=n(85290);r=o.My,a=i.default.themeConfig.prism.additionalLanguages,globalThis.Prism=r,a.forEach((function(e){"php"===e&&n(19700),n(91830)("./prism-"+e)})),delete globalThis.Prism},51107:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(98587),a=(n(96540),n(34164)),o=n(21312),i=n(6342),s=n(28774),c=n(63427);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var u=n(74848),d=["as","id"];function p(e){var t=e.as,n=e.id,p=(0,r.A)(e,d),f=(0,c.A)(),m=(0,i.p)().navbar.hideOnScroll;if("h1"===t||!n)return(0,u.jsx)(t,Object.assign({},p,{id:void 0}));f.collectAnchor(n);var h=(0,o.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof p.children?p.children:n});return(0,u.jsxs)(t,Object.assign({},p,{className:(0,a.A)("anchor",m?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,p.className),id:n,children:[p.children,(0,u.jsx)(s.A,{className:"hash-link",to:"#"+n,"aria-label":h,title:h,children:"\u200b"})]}))}},43186:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(96540);const r={iconExternalLink:"iconExternalLink_nPIU"};var a=n(74848);function o(e){var t=e.width,n=void 0===t?13.5:t,o=e.height,i=void 0===o?13.5:o;return(0,a.jsx)("svg",{width:n,height:i,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,a.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},96300:(e,t,n)=>{"use strict";n.d(t,{A:()=>Bt});var r=n(96540),a=n(34164),o=n(67489),i=n(69024),s=n(56347),c=n(21312),l=n(75062),u=n(74848),d="__docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){var e=(0,r.useRef)(null),t=(0,s.W6)().action,n=(0,r.useCallback)((function(e){e.preventDefault();var t,n=null!=(t=document.querySelector("main:first-of-type"))?t:document.getElementById(d);n&&p(n)}),[]);return(0,l.$)((function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,onClick:n}}var m=(0,c.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function h(e){var t,n=null!=(t=e.children)?t:m,r=f(),a=r.containerRef,o=r.onClick;return(0,u.jsx)("div",{ref:a,role:"region","aria-label":m,children:(0,u.jsx)("a",Object.assign({},e,{href:"#"+d,onClick:o,children:n}))})}var b=n(17559),g=n(14090);const y={skipToContent:"skipToContent_fXgn"};function v(){return(0,u.jsx)(h,{className:y.skipToContent})}var x=n(6342),w=n(65041),k=n(98587),_=["width","height","color","strokeWidth","className"];function S(e){var t=e.width,n=void 0===t?21:t,r=e.height,a=void 0===r?21:r,o=e.color,i=void 0===o?"currentColor":o,s=e.strokeWidth,c=void 0===s?1.2:s,l=(e.className,(0,k.A)(e,_));return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 15 15",width:n,height:a},l,{children:(0,u.jsx)("g",{stroke:i,strokeWidth:c,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})}))}const E={closeButton:"closeButton_CVFx"};function j(e){return(0,u.jsx)("button",Object.assign({type:"button","aria-label":(0,c.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,a.A)("clean-btn close",E.closeButton,e.className),children:(0,u.jsx)(S,{width:14,height:14,strokeWidth:3.1})}))}const O={content:"content_knG7"};function A(e){var t=(0,x.p)().announcementBar.content;return(0,u.jsx)("div",Object.assign({},e,{className:(0,a.A)(O.content,e.className),dangerouslySetInnerHTML:{__html:t}}))}const C={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function P(){var e=(0,x.p)().announcementBar,t=(0,w.M)(),n=t.isActive,r=t.close;if(!n)return null;var a=e.backgroundColor,o=e.textColor,i=e.isCloseable;return(0,u.jsxs)("div",{className:C.announcementBar,style:{backgroundColor:a,color:o},role:"banner",children:[i&&(0,u.jsx)("div",{className:C.announcementBarPlaceholder}),(0,u.jsx)(A,{className:C.announcementBarContent}),i&&(0,u.jsx)(j,{onClick:r,className:C.announcementBarClose})]})}var T=n(22069),I=n(23104);var N=n(43807),R=n(75600),L=r.createContext(null);function D(e){var t,n,a,o,i,s,c,l=e.children,d=(t=(0,T.M)(),n=(0,R.YL)(),a=(0,r.useState)(!1),o=a[0],i=a[1],s=null!==n.component,c=(0,N.ZC)(s),(0,r.useEffect)((function(){s&&!c&&i(!0)}),[s,c]),(0,r.useEffect)((function(){s?t.shown||i(!0):i(!1)}),[t.shown,s]),(0,r.useMemo)((function(){return[o,i]}),[o]));return(0,u.jsx)(L.Provider,{value:d,children:l})}function M(e){if(e.component){var t=e.component;return(0,u.jsx)(t,Object.assign({},e.props))}}function F(){var e=(0,r.useContext)(L);if(!e)throw new N.dV("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],a=(0,r.useCallback)((function(){return n(!1)}),[n]),o=(0,R.YL)();return(0,r.useMemo)((function(){return{shown:t,hide:a,content:M(o)}}),[a,o,t])}function B(e){var t=e.header,n=e.primaryMenu,r=e.secondaryMenu,o=F().shown;return(0,u.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,u.jsxs)("div",{className:(0,a.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":o}),children:[(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var z=n(95293),U=n(92303);function $(e){return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})}))}function q(e){return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})}))}const H={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function V(e){var t=e.className,n=e.buttonClassName,r=e.value,o=e.onChange,i=(0,U.A)(),s=(0,c.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,c.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,c.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,u.jsx)("div",{className:(0,a.A)(H.toggle,t),children:(0,u.jsxs)("button",{className:(0,a.A)("clean-btn",H.toggleButton,!i&&H.toggleButtonDisabled,n),type:"button",onClick:function(){return o("dark"===r?"light":"dark")},disabled:!i,title:s,"aria-label":s,"aria-live":"polite",children:[(0,u.jsx)($,{className:(0,a.A)(H.toggleIcon,H.lightToggleIcon)}),(0,u.jsx)(q,{className:(0,a.A)(H.toggleIcon,H.darkToggleIcon)})]})})}const W=r.memo(V),K={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function G(e){var t=e.className,n=(0,x.p)().navbar.style,r=(0,x.p)().colorMode.disableSwitch,a=(0,z.G)(),o=a.colorMode,i=a.setColorMode;return r?null:(0,u.jsx)(W,{className:t,buttonClassName:"dark"===n?K.darkNavbarColorModeToggle:void 0,value:o,onChange:i})}var Q=n(39529);function Y(){return(0,u.jsx)(Q.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function Z(){var e=(0,T.M)();return(0,u.jsx)("button",{type:"button","aria-label":(0,c.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()},children:(0,u.jsx)(S,{color:"var(--ifm-color-emphasis-600)"})})}function X(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(Y,{}),(0,u.jsx)(G,{className:"margin-right--md"}),(0,u.jsx)(Z,{})]})}var J=n(28774),ee=n(86025),te=n(16654),ne=n(91252),re=n(43186),ae=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function oe(e){var t=e.activeBasePath,n=e.activeBaseRegex,r=e.to,a=e.href,o=e.label,i=e.html,s=e.isDropdownLink,c=e.prependBaseUrlToHref,l=(0,k.A)(e,ae),d=(0,ee.Ay)(r),p=(0,ee.Ay)(t),f=(0,ee.Ay)(a,{forcePrependBaseUrl:!0}),m=o&&a&&!(0,te.A)(a),h=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,u.jsxs)(u.Fragment,{children:[o,m&&(0,u.jsx)(re.A,Object.assign({},s&&{width:12,height:12}))]})};return a?(0,u.jsx)(J.A,Object.assign({href:c?f:a},l,h)):(0,u.jsx)(J.A,Object.assign({to:d,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?(0,ne.G)(n,t.pathname):t.pathname.startsWith(p)}},l,h))}var ie=["className","isDropdownItem"],se=["className","isDropdownItem"],ce=["mobile","position"];function le(e){var t=e.className,n=e.isDropdownItem,r=void 0!==n&&n,o=(0,k.A)(e,ie),i=(0,u.jsx)(oe,Object.assign({className:(0,a.A)(r?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:r},o));return r?(0,u.jsx)("li",{children:i}):i}function ue(e){var t=e.className,n=(e.isDropdownItem,(0,k.A)(e,se));return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(oe,Object.assign({className:(0,a.A)("menu__link",t)},n))})}function de(e){var t,n=e.mobile,r=void 0!==n&&n,a=(e.position,(0,k.A)(e,ce)),o=r?ue:le;return(0,u.jsx)(o,Object.assign({},a,{activeClassName:null!=(t=a.activeClassName)?t:r?"menu__link--active":"navbar__link--active"}))}var pe=n(41422),fe=n(99169),me=n(44586);const he="dropdownNavbarItemMobile_S0Fm";var be=["items","position","className","onClick"],ge=["items","className","position","onClick"],ye=["mobile"];function ve(e,t){return e.some((function(e){return function(e,t){return!!(0,fe.ys)(e.to,t)||!!(0,ne.G)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)}))}function xe(e){var t,n=e.items,o=e.position,i=e.className,s=(e.onClick,(0,k.A)(e,be)),c=(0,r.useRef)(null),l=(0,r.useState)(!1),d=l[0],p=l[1];return(0,r.useEffect)((function(){var e=function(e){c.current&&!c.current.contains(e.target)&&p(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[c]),(0,u.jsxs)("div",{ref:c,className:(0,a.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===o,"dropdown--show":d}),children:[(0,u.jsx)(oe,Object.assign({"aria-haspopup":"true","aria-expanded":d,role:"button",href:s.to?void 0:"#",className:(0,a.A)("navbar__link",i)},s,{onClick:s.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),p(!d))},children:null!=(t=s.children)?t:s.label})),(0,u.jsx)("ul",{className:"dropdown__menu",children:n.map((function(e,t){return(0,r.createElement)(tt,Object.assign({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))}))})]})}function we(e){var t,n,o=e.items,i=e.className,c=(e.position,e.onClick),l=(0,k.A)(e,ge),d=(n=(0,me.A)().siteConfig.baseUrl,(0,s.zy)().pathname.replace(n,"/")),p=ve(o,d),f=(0,pe.u)({initialState:function(){return!p}}),m=f.collapsed,h=f.toggleCollapsed,b=f.setCollapsed;return(0,r.useEffect)((function(){p&&b(!p)}),[d,p,b]),(0,u.jsxs)("li",{className:(0,a.A)("menu__list-item",{"menu__list-item--collapsed":m}),children:[(0,u.jsx)(oe,Object.assign({role:"button",className:(0,a.A)(he,"menu__link menu__link--sublist menu__link--sublist-caret",i)},l,{onClick:function(e){e.preventDefault(),h()},children:null!=(t=l.children)?t:l.label})),(0,u.jsx)(pe.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:m,children:o.map((function(e,t){return(0,r.createElement)(tt,Object.assign({mobile:!0,isDropdownItem:!0,onClick:c,activeClassName:"menu__link--active"},e,{key:t}))}))})]})}function ke(e){var t=e.mobile,n=void 0!==t&&t,r=(0,k.A)(e,ye),a=n?we:xe;return(0,u.jsx)(a,Object.assign({},r))}var _e=n(32131),Se=["width","height"];function Ee(e){var t=e.width,n=void 0===t?20:t,r=e.height,a=void 0===r?20:r,o=(0,k.A)(e,Se);return(0,u.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:n,height:a,"aria-hidden":!0},o,{children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})}))}const je="iconLanguage_nlXk";var Oe=["mobile","dropdownItemsBefore","dropdownItemsAfter","queryString"];var Ae=n(40961),Ce=n(55600),Pe=n(5260),Te=n(24255),Ie=n(51062),Ne=n(2967),Re=n(82565);function Le(){var e;return["language:"+(0,me.A)().i18n.currentLocale,(e=(0,Re.v)(),[Ne.C].concat(e)).map((function(e){return"docusaurus_tag:"+e}))]}const De={button:{buttonText:(0,c.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,c.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,c.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,c.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,c.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,c.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,c.T)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,c.T)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,c.T)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,c.T)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,c.T)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,c.T)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,c.T)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,c.T)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen of search modal"})},footer:{selectText:(0,c.T)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,c.T)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,c.T)({id:"theme.SearchModal.footer.navigateText",message:"to navigate",description:"The explanatory text of the action for the Arrow up and Arrow down key"}),navigateUpKeyAriaLabel:(0,c.T)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for the Arrow up key button that makes the navigation"}),navigateDownKeyAriaLabel:(0,c.T)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for the Arrow down key button that makes the navigation"}),closeText:(0,c.T)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,c.T)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,c.T)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,c.T)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results for",description:"The text explains that there are no results for the following search"}),suggestedQueryText:(0,c.T)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for the suggested query when no results are found for the following search"}),reportMissingResultsText:(0,c.T)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for the question where the user thinks there are missing results"}),reportMissingResultsLinkText:(0,c.T)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,c.T)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})};var Me=["contextualSearch","externalUrlRegex"],Fe=null;function Be(e){var t=e.hit,n=e.children;return(0,u.jsx)(J.A,{to:t.url,children:n})}function ze(e){var t=e.state,n=e.onClose,r=(0,Te.w)();return(0,u.jsx)(J.A,{to:r(t.query),onClick:n,children:(0,u.jsx)(c.A,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits},children:"See all {count} results"})})}function Ue(e){var t,a,o,i,c=e.contextualSearch,l=e.externalUrlRegex,d=(0,k.A)(e,Me),p=(0,me.A)().siteMetadata,f=(0,Ie.C)(),m=Le(),h=null!=(t=null==(a=d.searchParameters)?void 0:a.facetFilters)?t:[],b=c?(o=h,[].concat((i=function(e){return"string"==typeof e?[e]:e})(m),i(o))):h,g=Object.assign({},d.searchParameters,{facetFilters:b}),y=(0,s.W6)(),v=(0,r.useRef)(null),x=(0,r.useRef)(null),w=(0,r.useState)(!1),_=w[0],S=w[1],E=(0,r.useState)(void 0),j=E[0],O=E[1],A=(0,r.useCallback)((function(){return Fe?Promise.resolve():Promise.all([n.e(8158).then(n.bind(n,48158)),Promise.all([n.e(1869),n.e(8913)]).then(n.bind(n,58913)),Promise.all([n.e(1869),n.e(416)]).then(n.bind(n,90416))]).then((function(e){var t=e[0].DocSearchModal;Fe=t}))}),[]),C=(0,r.useCallback)((function(){if(!v.current){var e=document.createElement("div");v.current=e,document.body.insertBefore(e,document.body.firstChild)}}),[]),P=(0,r.useCallback)((function(){C(),A().then((function(){return S(!0)}))}),[A,C]),T=(0,r.useCallback)((function(){var e;S(!1),null==(e=x.current)||e.focus()}),[]),I=(0,r.useCallback)((function(e){"f"===e.key&&(e.metaKey||e.ctrlKey)||(e.preventDefault(),O(e.key),P())}),[P]),N=(0,r.useRef)({navigate:function(e){var t=e.itemUrl;(0,ne.G)(l,t)?window.location.href=t:y.push(t)}}).current,R=(0,r.useRef)((function(e){return d.transformItems?d.transformItems(e):e.map((function(e){return Object.assign({},e,{url:f(e.url)})}))})).current,L=(0,r.useMemo)((function(){return function(e){return(0,u.jsx)(ze,Object.assign({},e,{onClose:T}))}}),[T]),D=(0,r.useCallback)((function(e){return e.addAlgoliaAgent("docusaurus",p.docusaurusVersion),e}),[p.docusaurusVersion]);return(0,Ce.E8)({isOpen:_,onOpen:P,onClose:T,onInput:I,searchButtonRef:x}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Pe.A,{children:(0,u.jsx)("link",{rel:"preconnect",href:"https://"+d.appId+"-dsn.algolia.net",crossOrigin:"anonymous"})}),(0,u.jsx)(Ce.Bc,{onTouchStart:A,onFocus:A,onMouseOver:A,onClick:P,ref:x,translations:De.button}),_&&Fe&&v.current&&(0,Ae.createPortal)((0,u.jsx)(Fe,Object.assign({onClose:T,initialScrollY:window.scrollY,initialQuery:j,navigator:N,transformItems:R,hitComponent:Be,transformSearchClient:D},d.searchPagePath&&{resultsFooterComponent:L},d,{searchParameters:g,placeholder:De.placeholder,translations:De.modal})),v.current)]})}function $e(){var e=(0,me.A)().siteConfig;return(0,u.jsx)(Ue,Object.assign({},e.themeConfig.algolia))}const qe={navbarSearchContainer:"navbarSearchContainer_Bca1"};function He(e){var t=e.children,n=e.className;return(0,u.jsx)("div",{className:(0,a.A)(n,qe.navbarSearchContainer),children:t})}var Ve=n(44070),We=n(26972),Ke=["docId","label","docsPluginId"];var Ge=["sidebarId","label","docsPluginId"];var Qe=["label","to","docsPluginId"];var Ye=n(53886),Ze=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"];function Xe(e,t){var n;return null!=(n=t.alternateDocVersions[e.name])?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(e)}const Je={default:de,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,r=e.dropdownItemsAfter,a=e.queryString,o=void 0===a?"":a,i=(0,k.A)(e,Oe),l=(0,me.A)().i18n,d=l.currentLocale,p=l.locales,f=l.localeConfigs,m=(0,_e.o)(),h=(0,s.zy)(),b=h.search,g=h.hash,y=p.map((function(e){var n=""+("pathname://"+m.createUrl({locale:e,fullyQualified:!1}))+b+g+o;return{label:f[e].label,lang:f[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===d?t?"menu__link--active":"dropdown__link--active":""}})),v=[].concat(n,y,r),x=t?(0,c.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):f[d].label;return(0,u.jsx)(ke,Object.assign({},i,{mobile:t,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Ee,{className:je}),x]}),items:v}))},search:function(e){var t=e.mobile,n=e.className;return t?null:(0,u.jsx)(He,{className:n,children:(0,u.jsx)($e,{})})},dropdown:ke,html:function(e){var t=e.value,n=e.className,r=e.mobile,o=void 0!==r&&r,i=e.isDropdownItem,s=void 0!==i&&i,c=s?"li":"div";return(0,u.jsx)(c,{className:(0,a.A)({navbar__item:!o&&!s,"menu__list-item":o},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,r=e.docsPluginId,a=(0,k.A)(e,Ke),o=(0,Ve.zK)(r).activeDoc,i=(0,We.QB)(t,r),s=(null==o?void 0:o.path)===(null==i?void 0:i.path);return null===i||i.unlisted&&!s?null:(0,u.jsx)(de,Object.assign({exact:!0},a,{isActive:function(){return s||!(null==o||!o.sidebar)&&o.sidebar===i.sidebar},label:null!=n?n:i.id,to:i.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,r=e.docsPluginId,a=(0,k.A)(e,Ge),o=(0,Ve.zK)(r).activeDoc,i=(0,We.fW)(t,r).link;if(!i)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return(0,u.jsx)(de,Object.assign({exact:!0},a,{isActive:function(){return(null==o?void 0:o.sidebar)===t},label:null!=n?n:i.label,to:i.path}))},docsVersion:function(e){var t=e.label,n=e.to,r=e.docsPluginId,a=(0,k.A)(e,Qe),o=(0,We.Vd)(r)[0],i=null!=t?t:o.label,s=null!=n?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(o).path;return(0,u.jsx)(de,Object.assign({},a,{label:i,to:s}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,r=e.dropdownActiveClassDisabled,a=e.dropdownItemsBefore,o=e.dropdownItemsAfter,i=(0,k.A)(e,Ze),l=(0,s.zy)(),d=l.search,p=l.hash,f=(0,Ve.zK)(n),m=(0,Ve.jh)(n),h=(0,Ye.g1)(n).savePreferredVersionName,b=[].concat(a,m.map((function(e){var t=Xe(e,f);return{label:e.label,to:""+t.path+d+p,isActive:function(){return e===f.activeVersion},onClick:function(){return h(e.name)}}})),o),g=(0,We.Vd)(n)[0],y=t&&b.length>1?(0,c.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):g.label,v=t&&b.length>1?void 0:Xe(g,f).path;return b.length<=1?(0,u.jsx)(de,Object.assign({},i,{mobile:t,label:y,to:v,isActive:r?function(){return!1}:void 0})):(0,u.jsx)(ke,Object.assign({},i,{mobile:t,label:y,to:v,items:b,isActive:r?function(){return!1}:void 0}))}};var et=["type"];function tt(e){var t=e.type,n=(0,k.A)(e,et),r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=Je[r];if(!a)throw new Error('No NavbarItem component found for type "'+t+'".');return(0,u.jsx)(a,Object.assign({},n))}function nt(){var e=(0,T.M)(),t=(0,x.p)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:t.map((function(t,n){return(0,r.createElement)(tt,Object.assign({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))}))})}function rt(e){return(0,u.jsx)("button",Object.assign({},e,{type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(c.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})}))}function at(){var e=0===(0,x.p)().navbar.items.length,t=F();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(rt,{onClick:function(){return t.hide()}}),t.content]})}function ot(){var e,t=(0,T.M)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e]),t.shouldRender?(0,u.jsx)(B,{header:(0,u.jsx)(X,{}),primaryMenu:(0,u.jsx)(nt,{}),secondaryMenu:(0,u.jsx)(at,{})}):null}const it={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function st(e){return(0,u.jsx)("div",Object.assign({role:"presentation"},e,{className:(0,a.A)("navbar-sidebar__backdrop",e.className)}))}function ct(e){var t=e.children,n=(0,x.p)().navbar,o=n.hideOnScroll,i=n.style,s=(0,T.M)(),d=function(e){var t=(0,r.useState)(e),n=t[0],a=t[1],o=(0,r.useRef)(!1),i=(0,r.useRef)(0),s=(0,r.useCallback)((function(e){null!==e&&(i.current=e.getBoundingClientRect().height)}),[]);return(0,I.Mq)((function(t,n){var r=t.scrollY;if(e)if(r=s?a(!1):r+l{"use strict";n.d(t,{A:()=>v});var r=n(98587),a=n(96540),o=n(28774),i=n(86025),s=n(44586),c=n(6342),l=n(34164),u=n(92303),d=n(95293);const p={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var f=n(74848);function m(e){var t=e.className,n=e.children,r=(0,u.A)(),o=(0,d.G)().colorMode;return(0,f.jsx)(f.Fragment,{children:(r?"dark"===o?["dark"]:["light"]:["light","dark"]).map((function(e){var r=n({theme:e,className:(0,l.A)(t,p.themedComponent,p["themedComponent--"+e])});return(0,f.jsx)(a.Fragment,{children:r},e)}))})}var h=["sources","className","alt"];function b(e){var t=e.sources,n=e.className,a=e.alt,o=(0,r.A)(e,h);return(0,f.jsx)(m,{className:n,children:function(e){var n=e.theme,r=e.className;return(0,f.jsx)("img",Object.assign({src:t[n],alt:a,className:r},o))}})}var g=["imageClassName","titleClassName"];function y(e){var t=e.logo,n=e.alt,r=e.imageClassName,a={light:(0,i.Ay)(t.src),dark:(0,i.Ay)(t.srcDark||t.src)},o=(0,f.jsx)(b,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,f.jsx)("div",{className:r,children:o}):o}function v(e){var t,n=(0,s.A)().siteConfig.title,a=(0,c.p)().navbar,l=a.title,u=a.logo,d=e.imageClassName,p=e.titleClassName,m=(0,r.A)(e,g),h=(0,i.Ay)((null==u?void 0:u.href)||"/"),b=l?"":n,v=null!=(t=null==u?void 0:u.alt)?t:b;return(0,f.jsxs)(o.A,Object.assign({to:h},m,(null==u?void 0:u.target)&&{target:u.target},{children:[u&&(0,f.jsx)(y,{logo:u,alt:v,imageClassName:d}),null!=l&&(0,f.jsx)("b",{className:p,children:l})]}))}},41463:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(96540);var r=n(5260),a=n(74848);function o(e){var t=e.locale,n=e.version,o=e.tag,i=t;return(0,a.jsxs)(r.A,{children:[t&&(0,a.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,a.jsx)("meta",{name:"docusaurus_version",content:n}),o&&(0,a.jsx)("meta",{name:"docusaurus_tag",content:o}),i&&(0,a.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,a.jsx)("meta",{name:"docsearch:version",content:n}),o&&(0,a.jsx)("meta",{name:"docsearch:docusaurus_tag",content:o})]})}},41422:(e,t,n)=>{"use strict";n.d(t,{N:()=>x,u:()=>p});var r=n(98587),a=n(96540),o=n(38193),i=n(205),s=n(53109),c=n(74848),l=["collapsed"],u=["lazy"],d="ease-in-out";function p(e){var t=e.initialState,n=(0,a.useState)(null!=t&&t),r=n[0],o=n[1],i=(0,a.useCallback)((function(){o((function(e){return!e}))}),[]);return{collapsed:r,setCollapsed:o,toggleCollapsed:i}}var f={display:"none",overflow:"hidden",height:"0px"},m={display:"block",overflow:"visible",height:"auto"};function h(e,t){var n=t?f:m;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function b(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,o=(0,a.useRef)(!1);(0,a.useEffect)((function(){var e,a=t.current;function i(){var e,t,n=a.scrollHeight,o=null!=(e=null==r?void 0:r.duration)?e:function(e){if((0,s.O)())return 1;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+o+"ms "+(null!=(t=null==r?void 0:r.easing)?t:d),height:n+"px"}}function c(){var e=i();a.style.transition=e.transition,a.style.height=e.height}if(!o.current)return h(a,n),void(o.current=!0);return a.style.willChange="height",e=requestAnimationFrame((function(){n?(c(),requestAnimationFrame((function(){a.style.height=f.height,a.style.overflow=f.overflow}))):(a.style.display="block",requestAnimationFrame((function(){c()})))})),function(){return cancelAnimationFrame(e)}}),[t,n,r])}function g(e){if(!o.A.canUseDOM)return e?f:m}function y(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,o=e.children,i=e.animation,s=e.onCollapseTransitionEnd,l=e.className,u=e.disableSSRStyle,d=(0,a.useRef)(null);return b({collapsibleRef:d,collapsed:r,animation:i}),(0,c.jsx)(n,{ref:d,style:u?void 0:g(r),onTransitionEnd:function(e){"height"===e.propertyName&&(h(d.current,r),null==s||s(r))},className:l,children:o})}function v(e){var t=e.collapsed,n=(0,r.A)(e,l),o=(0,a.useState)(!t),s=o[0],u=o[1],d=(0,a.useState)(t),p=d[0],f=d[1];return(0,i.A)((function(){t||u(!0)}),[t]),(0,i.A)((function(){s&&f(t)}),[s,t]),s?(0,c.jsx)(y,Object.assign({},n,{collapsed:p})):null}function x(e){var t=e.lazy,n=(0,r.A)(e,u),a=t?v:y;return(0,c.jsx)(a,Object.assign({},n))}},65041:(e,t,n)=>{"use strict";n.d(t,{M:()=>h,o:()=>m});var r=n(96540),a=n(92303),o=n(75376),i=n(43807),s=n(6342),c=n(74848),l=(0,o.Wf)("docusaurus.announcement.dismiss"),u=(0,o.Wf)("docusaurus.announcement.id"),d=function(){return"true"===l.get()},p=function(e){return l.set(String(e))},f=r.createContext(null);function m(e){var t=e.children,n=function(){var e=(0,s.p)().announcementBar,t=(0,a.A)(),n=(0,r.useState)((function(){return!!t&&d()})),o=n[0],i=n[1];(0,r.useEffect)((function(){i(d())}),[]);var c=(0,r.useCallback)((function(){p(!0),i(!0)}),[]);return(0,r.useEffect)((function(){if(e){var t=e.id,n=u.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;u.set(t),r&&p(!1),!r&&d()||i(!1)}}),[e]),(0,r.useMemo)((function(){return{isActive:!!e&&!o,close:c}}),[e,o,c])}();return(0,c.jsx)(f.Provider,{value:n,children:t})}function h(){var e=(0,r.useContext)(f);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},95293:(e,t,n)=>{"use strict";n.d(t,{G:()=>g,a:()=>b});var r=n(96540),a=n(38193),o=n(43807),i=n(75376),s=n(6342),c=n(74848),l=r.createContext(void 0),u="theme",d=(0,i.Wf)(u),p={light:"light",dark:"dark"},f=function(e){return e===p.dark?p.dark:p.light},m=function(e){return a.A.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e)},h=function(e){d.set(f(e))};function b(e){var t=e.children,n=function(){var e=(0,s.p)().colorMode,t=e.defaultMode,n=e.disableSwitch,a=e.respectPrefersColorScheme,o=(0,r.useState)(m(t)),i=o[0],c=o[1];(0,r.useEffect)((function(){n&&d.del()}),[n]);var l=(0,r.useCallback)((function(e,n){void 0===n&&(n={});var r=n.persist,o=void 0===r||r;e?(c(e),o&&h(e)):(c(a?window.matchMedia("(prefers-color-scheme: dark)").matches?p.dark:p.light:t),d.del())}),[a,t]);(0,r.useEffect)((function(){document.documentElement.setAttribute("data-theme",f(i))}),[i]),(0,r.useEffect)((function(){if(!n){var e=function(e){if(e.key===u){var t=d.get();null!==t&&l(f(t))}};return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}}}),[n,l]);var b=(0,r.useRef)(!1);return(0,r.useEffect)((function(){if(!n||a){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=function(){window.matchMedia("print").matches||b.current?b.current=window.matchMedia("print").matches:l(null)};return e.addListener(t),function(){return e.removeListener(t)}}}),[l,n,a]),(0,r.useMemo)((function(){return{colorMode:i,setColorMode:l,get isDarkTheme(){return i===p.dark},setLightTheme:function(){l(p.light)},setDarkTheme:function(){l(p.dark)}}}),[i,l])}();return(0,c.jsx)(l.Provider,{value:n,children:t})}function g(){var e=(0,r.useContext)(l);if(null==e)throw new o.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},22069:(e,t,n)=>{"use strict";n.d(t,{M:()=>f,e:()=>p});var r=n(96540),a=n(75600),o=n(24581),i=n(57485),s=n(6342),c=n(43807),l=n(74848),u=r.createContext(void 0);function d(){var e,t=(e=(0,a.YL)(),0===(0,s.p)().navbar.items.length&&!e.component),n=(0,o.l)(),c=!t&&"mobile"===n,l=(0,r.useState)(!1),u=l[0],d=l[1];(0,i.$Z)((function(){if(u)return d(!1),!1}));var p=(0,r.useCallback)((function(){d((function(e){return!e}))}),[]);return(0,r.useEffect)((function(){"desktop"===n&&d(!1)}),[n]),(0,r.useMemo)((function(){return{disabled:t,shouldRender:c,toggle:p,shown:u}}),[t,c,p,u])}function p(e){var t=e.children,n=d();return(0,l.jsx)(u.Provider,{value:n,children:t})}function f(){var e=r.useContext(u);if(void 0===e)throw new c.dV("NavbarMobileSidebarProvider");return e}},75600:(e,t,n)=>{"use strict";n.d(t,{GX:()=>l,YL:()=>c,y_:()=>s});var r=n(96540),a=n(43807),o=n(74848),i=r.createContext(null);function s(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return(0,o.jsx)(i.Provider,{value:n,children:t})}function c(){var e=(0,r.useContext)(i);if(!e)throw new a.dV("NavbarSecondaryMenuContentProvider");return e[0]}function l(e){var t=e.component,n=e.props,o=(0,r.useContext)(i);if(!o)throw new a.dV("NavbarSecondaryMenuContentProvider");var s=o[1],c=(0,a.Be)(n);return(0,r.useEffect)((function(){s({component:t,props:c})}),[s,t,c]),(0,r.useEffect)((function(){return function(){return s({component:null,props:null})}}),[s]),null}},14090:(e,t,n)=>{"use strict";n.d(t,{w:()=>a,J:()=>o});var r=n(96540),a="navigation-with-keyboard";function o(){(0,r.useEffect)((function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},24255:(e,t,n)=>{"use strict";n.d(t,{b:()=>s,w:()=>c});var r=n(96540),a=n(44586),o=n(57485),i="q";function s(){return(0,o.l)(i)}function c(){var e=(0,a.A)().siteConfig,t=e.baseUrl,n=e.themeConfig.algolia.searchPagePath;return(0,r.useCallback)((function(e){return""+t+n+"?"+i+"="+encodeURIComponent(e)}),[t,n])}},24581:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(96540),a=n(38193),o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function s(e){var t=(void 0===e?{}:e).desktopBreakpoint,n=void 0===t?i:t,s=(0,r.useState)((function(){return"ssr"})),c=s[0],l=s[1];return(0,r.useEffect)((function(){function e(){l(function(e){if(!a.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?o.desktop:o.mobile}(n))}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[n]),c}},17559:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",blogAuthorsListPage:"blog-authors-list-page",blogAuthorsPostsPage:"blog-authors-posts-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",draftBanner:"theme-draft-banner",admonitionType:function(e){return"theme-admonition-"+e}},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},53109:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},12181:(e,t,n)=>{"use strict";n.d(t,{bq:()=>d,MN:()=>u,a2:()=>l,k2:()=>p});var r=n(77387),a=n(96540),o=n(21312),i=n(70440);const s={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};var c=n(74848);function l(e){return(0,c.jsx)("button",Object.assign({type:"button"},e,{children:(0,c.jsx)(o.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})}))}function u(e){var t=e.error,n=e.tryAgain;return(0,c.jsxs)("div",{className:s.errorBoundaryFallback,children:[(0,c.jsx)("p",{children:t.message}),(0,c.jsx)(l,{onClick:n})]})}function d(e){var t=e.error,n=(0,i.rA)(t).map((function(e){return e.message})).join("\n\nCause:\n");return(0,c.jsx)("p",{className:s.errorBoundaryError,children:n})}var p=function(e){function t(){return e.apply(this,arguments)||this}(0,r.A)(t,e);var n=t.prototype;return n.componentDidCatch=function(e,t){throw this.props.onError(e,t)},n.render=function(){return this.props.children},t}(a.Component)},20481:(e,t,n)=>{"use strict";n.d(t,{s:()=>a});var r=n(44586);function a(e){var t=(0,r.A)().siteConfig,n=t.title,a=t.titleDelimiter;return null!=e&&e.trim().length?e.trim()+" "+a+" "+n:n}},57485:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>i,aZ:()=>c,l:()=>l});var r=n(96540),a=n(56347),o=n(43807);function i(e){!function(e){var t=(0,a.W6)(),n=(0,o._q)(e);(0,r.useEffect)((function(){return t.block((function(e,t){return n(e,t)}))}),[t,n])}((function(t,n){if("POP"===n)return e(t,n)}))}function s(e){var t=(0,a.W6)();return(0,r.useSyncExternalStore)(t.listen,(function(){return e(t)}),(function(){return e(t)}))}function c(e){return s((function(t){return null===e?null:new URLSearchParams(t.location.search).get(e)}))}function l(e){var t,n=null!=(t=c(e))?t:"",o=function(e){var t=(0,a.W6)();return(0,r.useCallback)((function(n,r){var a=new URLSearchParams(t.location.search);n?a.set(e,n):a.delete(e),(null!=r&&r.push?t.push:t.replace)({search:a.toString()})}),[e,t])}(e);return[n,o]}},31682:(e,t,n)=>{"use strict";function r(e,t){return void 0===t&&(t=function(e,t){return e===t}),e.filter((function(n,r){return e.findIndex((function(e){return t(e,n)}))!==r}))}function a(e){return Array.from(new Set(e))}n.d(t,{XI:()=>r,sb:()=>a})},69024:(e,t,n)=>{"use strict";n.d(t,{e3:()=>f,be:()=>d,Jx:()=>m});var r=n(96540),a=n(34164),o=n(5260),i=n(53102);function s(){var e=r.useContext(i.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var c=n(86025),l=n(20481),u=n(74848);function d(e){var t=e.title,n=e.description,r=e.keywords,a=e.image,i=e.children,s=(0,l.s)(t),d=(0,c.hH)().withBaseUrl,p=a?d(a,{absolute:!0}):void 0;return(0,u.jsxs)(o.A,{children:[t&&(0,u.jsx)("title",{children:s}),t&&(0,u.jsx)("meta",{property:"og:title",content:s}),n&&(0,u.jsx)("meta",{name:"description",content:n}),n&&(0,u.jsx)("meta",{property:"og:description",content:n}),r&&(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),p&&(0,u.jsx)("meta",{property:"og:image",content:p}),p&&(0,u.jsx)("meta",{name:"twitter:image",content:p}),i]})}var p=r.createContext(void 0);function f(e){var t=e.className,n=e.children,i=r.useContext(p),s=(0,a.A)(i,t);return(0,u.jsxs)(p.Provider,{value:s,children:[(0,u.jsx)(o.A,{children:(0,u.jsx)("html",{className:s})}),n]})}function m(e){var t=e.children,n=s(),r="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),o="plugin-id-"+n.plugin.id;return(0,u.jsx)(f,{className:(0,a.A)(r,o),children:t})}},43807:(e,t,n)=>{"use strict";n.d(t,{dV:()=>m,fM:()=>b,_q:()=>p,ZC:()=>f,Be:()=>h});var r=n(3909),a=n(77387);function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var i=n(63662);function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(s())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var a=new(e.bind.apply(e,r));return n&&(0,i.A)(a,n.prototype),a}(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,i.A)(n,e)},c(e)}var l=n(96540),u=n(205),d=n(74848);function p(e){var t=(0,l.useRef)(e);return(0,u.A)((function(){t.current=e}),[e]),(0,l.useCallback)((function(){return t.current.apply(t,arguments)}),[])}function f(e){var t=(0,l.useRef)();return(0,u.A)((function(){t.current=e})),t.current}var m=function(e){function t(t,n){var a,o,i;return(i=e.call(this)||this).name="ReactContextError",i.message="Hook "+(null!=(a=null==(o=i.stack)||null==(o=o.split("\n")[1])||null==(o=o.match((0,r.A)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:o.groups.name)?a:"")+" is called outside the <"+t+">. "+(null!=n?n:""),i}return(0,a.A)(t,e),t}(c(Error));function h(e){var t=Object.entries(e);return t.sort((function(e,t){return e[0].localeCompare(t[0])})),(0,l.useMemo)((function(){return e}),t.flat())}function b(e){return function(t){var n=t.children;return(0,d.jsx)(d.Fragment,{children:e.reduceRight((function(e,t){return(0,d.jsx)(t,{children:e})}),n)})}}},91252:(e,t,n)=>{"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{G:()=>r})},99169:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>s,ys:()=>i});var r=n(96540),a=n(97671),o=n(44586);function i(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function s(){var e=(0,o.A)().siteConfig.baseUrl;return(0,r.useMemo)((function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap((function(e){var t;return null!=(t=e.routes)?t:[]})))}(e.routes)}({routes:a.A,baseUrl:e})}),[e])}},23104:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>f,Tv:()=>u,a_:()=>m,gk:()=>h});var r=n(96540),a=n(38193),o=n(92303),i=n(205),s=n(43807),c=n(74848);var l=r.createContext(void 0);function u(e){var t,n=e.children,a=(t=(0,r.useRef)(!0),(0,r.useMemo)((function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}}),[]));return(0,c.jsx)(l.Provider,{value:a,children:n})}function d(){var e=(0,r.useContext)(l);if(null==e)throw new s.dV("ScrollControllerProvider");return e}var p=function(){return a.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function f(e,t){void 0===t&&(t=[]);var n=d().scrollEventsEnabledRef,a=(0,r.useRef)(p()),o=(0,s._q)(e);(0,r.useEffect)((function(){var e=function(){if(n.current){var e=p();o(e,a.current),a.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}}),[o,n].concat(t))}function m(){var e,t,n,a=d(),o=(e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((function(t){e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((function(){var t=e.current,n=t.elem,r=t.top;if(!n)return{restored:!1};var a=n.getBoundingClientRect().top-r;return a&&window.scrollBy({left:0,top:a}),e.current={elem:null,top:0},{restored:0!==a}}),[]),(0,r.useMemo)((function(){return{save:t,restore:n}}),[n,t])),s=(0,r.useRef)(void 0),c=(0,r.useCallback)((function(e){o.save(e),a.disableScrollEvents(),s.current=function(){var e=o.restore().restored;if(s.current=void 0,e){var t=function(){a.enableScrollEvents(),window.removeEventListener("scroll",t)};window.addEventListener("scroll",t)}else a.enableScrollEvents()}}),[a,o]);return(0,i.A)((function(){queueMicrotask((function(){return null==s.current?void 0:s.current()}))})),{blockElementScrollPositionUntilNextRender:c}}function h(){var e=(0,r.useRef)(null),t=(0,o.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var a=document.documentElement.scrollTop;(n&&a>e||!n&&a{"use strict";n.d(t,{C:()=>r});var r="default"},75376:(e,t,n)=>{"use strict";n.d(t,{Wf:()=>u,Dv:()=>d});var r=n(96540);const a=JSON.parse('{"N":"localStorage","M":""}');var o=a.N;function i(e){var t=e.key,n=e.oldValue,r=e.newValue,a=e.storage;if(n!==r){var o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}}function s(e){if(void 0===e&&(e=o),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,c||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),c=!0),null}var t}var c=!1;var l={get:function(){return null},set:function(){},del:function(){},listen:function(){return function(){}}};function u(e,t){var n=""+e+a.M;if("undefined"==typeof window)return function(e){function t(){throw new Error('Illegal storage API usage for storage key "'+e+'".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.')}return{get:t,set:t,del:t,listen:t}}(n);var r=s(null==t?void 0:t.persistence);return null===r?l:{get:function(){try{return r.getItem(n)}catch(e){return console.error("Docusaurus storage error, can't get key="+n,e),null}},set:function(e){try{var t=r.getItem(n);r.setItem(n,e),i({key:n,oldValue:t,newValue:e,storage:r})}catch(a){console.error("Docusaurus storage error, can't set "+n+"="+e,a)}},del:function(){try{var e=r.getItem(n);r.removeItem(n),i({key:n,oldValue:e,newValue:null,storage:r})}catch(t){console.error("Docusaurus storage error, can't delete key="+n,t)}},listen:function(e){try{var t=function(t){t.storageArea===r&&t.key===n&&e(t)};return window.addEventListener("storage",t),function(){return window.removeEventListener("storage",t)}}catch(a){return console.error("Docusaurus storage error, can't listen for changes of key="+n,a),function(){}}}}}function d(e,t){var n=(0,r.useRef)((function(){return null===e?l:u(e,t)})).current(),a=(0,r.useCallback)((function(e){return"undefined"==typeof window?function(){}:n.listen(e)}),[n]);return[(0,r.useSyncExternalStore)(a,(function(){return"undefined"==typeof window?null:n.get()}),(function(){return null})),n]}},32131:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(44586),a=n(56347),o=n(70440);function i(){var e=(0,r.A)(),t=e.siteConfig,n=t.baseUrl,i=t.url,s=t.trailingSlash,c=e.i18n,l=c.defaultLocale,u=c.currentLocale,d=(0,a.zy)().pathname,p=(0,o.Ks)(d,{trailingSlash:s,baseUrl:n}),f=u===l?n:n.replace("/"+u+"/","/"),m=p.replace(n,"");return{createUrl:function(e){var t=e.locale;return""+(e.fullyQualified?i:"")+function(e){return e===l?""+f:""+f+e+"/"}(t)+m}}}},75062:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(96540),a=n(56347),o=n(43807);function i(e){var t=(0,a.zy)(),n=(0,o.ZC)(t),i=(0,o._q)(e);(0,r.useEffect)((function(){n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6342:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(44586);function a(){return(0,r.A)().siteConfig.themeConfig}},38126:(e,t,n)=>{"use strict";n.d(t,{c:()=>a});var r=n(44586);function a(){return(0,r.A)().siteConfig.themeConfig}},51062:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var r=n(96540),a=n(91252),o=n(86025),i=n(38126);function s(){var e=(0,o.hH)().withBaseUrl,t=(0,i.c)().algolia,n=t.externalUrlRegex,s=t.replaceSearchResultPathname;return(0,r.useCallback)((function(t){var r=new URL(t);if((0,a.G)(n,r.href))return t;var o=""+(r.pathname+r.hash);return e(function(e,t){return t?e.replaceAll(new RegExp(t.from,"g"),t.to):e}(o,s))}),[e,n,s])}},12983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addTrailingSlash=a,t.default=function(e,t){var n=t.trailingSlash,r=t.baseUrl;if(e.startsWith("#"))return e;if(void 0===n)return e;var i=e.split(/[#?]/)[0],s="/"===i||i===r?i:(c=i,l=n,l?a(c):o(c));var c,l;return e.replace(i,s)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=o;var r=n(42566);function a(e){return e.endsWith("/")?e:e+"/"}function o(e){return(0,r.removeSuffix)(e,"/")}},80253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=function e(t){if(t.cause)return[t].concat(e(t.cause));return[t]}},70440:(e,t,n)=>{"use strict";t.rA=t.Ks=void 0;var r=n(31635);var a=n(12983);Object.defineProperty(t,"Ks",{enumerable:!0,get:function(){return r.__importDefault(a).default}});var o=n(42566);var i=n(80253);Object.defineProperty(t,"rA",{enumerable:!0,get:function(){return i.getErrorCausalChain}})},42566:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPrefix=function(e,t){return e.startsWith(t)?e:""+t+e},t.removeSuffix=function(e,t){if(""===t)return e;return e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:""+e+t},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},97671:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});n(96540);var r=n(53259),a=n.n(r),o=n(91964);const i={"0058b4c6":[function(){return n.e(849).then(n.t.bind(n,9302,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-175.json",9302],"06597bc8":[function(){return Promise.all([n.e(1869),n.e(6417)]).then(n.bind(n,52877))},"@site/../docs/learn/archive/learn-treasury.md",52877],"078895e8":[function(){return Promise.all([n.e(1869),n.e(9909)]).then(n.bind(n,66232))},"@site/../docs/learn/archive/learn-controller.md",66232],"08c12c3a":[function(){return n.e(5630).then(n.bind(n,81329))},"@site/../docs/general/dune-analytics/parachain-dashboards/polimec-dashboards.md",81329],"09dda9ae":[function(){return n.e(2598).then(n.bind(n,42500))},"@site/../docs/general/dune-analytics/parachain-dashboards/polkadex-dashboards.md",42500],"0a3f0c9b":[function(){return Promise.all([n.e(1869),n.e(6555)]).then(n.bind(n,35209))},"@site/../docs/general/ledger.md",35209],"0b1a788a":[function(){return n.e(3395).then(n.t.bind(n,62508,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-jam-fed.json",62508],"0b632434":[function(){return n.e(4739).then(n.bind(n,56705))},"@site/../docs/general/parachains-apps.md",56705],"0df78d26":[function(){return n.e(782).then(n.bind(n,87145))},"@site/../docs/maintain/maintain-guides-secure-validator.md",87145],"0eeb7a68":[function(){return Promise.all([n.e(1869),n.e(6869)]).then(n.bind(n,5824))},"@site/../docs/learn/learn-guides-DOT-KSM-bridge.md",5824],"113faa87":[function(){return Promise.all([n.e(1869),n.e(6011)]).then(n.bind(n,30862))},"@site/../docs/learn/learn-guides-assets.md",30862],"12331e8b":[function(){return Promise.all([n.e(1869),n.e(2244)]).then(n.bind(n,48725))},"@site/../docs/general/polkadotjs.md",48725],"1283e352":[function(){return n.e(1396).then(n.t.bind(n,72140,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-01f.json",72140],"131c7f55":[function(){return Promise.all([n.e(1869),n.e(2298)]).then(n.bind(n,2512))},"@site/../docs/learn/learn-architecture.md",2512],"145746f5":[function(){return Promise.all([n.e(1869),n.e(6789)]).then(n.bind(n,3734))},"@site/../docs/maintain/maintain-polkadot-parameters.md",3734],"14eb3368":[function(){return Promise.all([n.e(1869),n.e(6969)]).then(n.bind(n,65847))},"@theme/DocCategoryGeneratedIndexPage",65847],15985664:[function(){return n.e(5881).then(n.bind(n,76248))},"@site/../docs/learn/xcm/journey/summary.md",76248],"1646726c":[function(){return Promise.all([n.e(1869),n.e(3266)]).then(n.bind(n,47002))},"@site/../docs/learn/learn-staking.md",47002],17896441:[function(){return Promise.all([n.e(1869),n.e(8401)]).then(n.bind(n,93069))},"@theme/DocItem",93069],"196e07e8":[function(){return n.e(3602).then(n.bind(n,97176))},"@site/../docs/general/dune-analytics/parachain-dashboards/interlay-dashboards.md",97176],"19ed4d4c":[function(){return n.e(4661).then(n.bind(n,74354))},"@site/../docs/learn/learn-comparisons-cosmos.md",74354],"1a4e3797":[function(){return Promise.all([n.e(1869),n.e(2138)]).then(n.bind(n,74604))},"@theme/SearchPage",74604],"1ae2b102":[function(){return Promise.all([n.e(3482),n.e(8121)]).then(n.bind(n,92508))},"@site/../docs/build/build-protocol-info.md",92508],"1d6d4797":[function(){return n.e(3477).then(n.bind(n,51976))},"@site/../docs/learn/xcm/journey/transact.md",51976],"1de1f488":[function(){return n.e(1240).then(n.t.bind(n,72680,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-parachains-index-132.json",72680],"1e051548":[function(){return n.e(3598).then(n.t.bind(n,45621,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-index-c1b.json",45621],"1e15616a":[function(){return n.e(3751).then(n.bind(n,59247))},"@site/../docs/learn/learn-wasm.md",59247],"1ed3671a":[function(){return n.e(3377).then(n.bind(n,29320))},"@site/../docs/learn/xcm/journey/trap-and-claim.md",29320],"1f8e8ebd":[function(){return n.e(5592).then(n.t.bind(n,77299,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-general-dune-analytics-dfe.json",77299],"21877fa5":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(6466)]).then(n.bind(n,98285))},"@site/../docs/learn/learn-system-chains.md",98285],"21899dd2":[function(){return Promise.all([n.e(1869),n.e(5168)]).then(n.bind(n,34495))},"@site/../docs/learn/learn-parachains.md",34495],"23210cde":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(499)]).then(n.bind(n,43406))},"@site/../docs/general/chain-state-values.md",43406],"23498fd5":[function(){return n.e(7276).then(n.bind(n,34632))},"@site/../docs/build/build-integrate-assets.md",34632],"240a6b01":[function(){return n.e(9633).then(n.bind(n,92532))},"@site/../docs/general/dune-analytics/parachain-dashboards/nodle-dashboards.md",92532],"2462cc91":[function(){return n.e(9141).then(n.bind(n,49631))},"@site/../docs/general/multisig-apps.md",49631],"25f2bd2a":[function(){return n.e(885).then(n.bind(n,72148))},"@site/../docs/maintain/maintain-guides-how-to-stop-validating.md",72148],"269b78ec":[function(){return n.e(1191).then(n.t.bind(n,76722,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-build-protocol-index-9e0.json",76722],"269bc3bb":[function(){return n.e(1968).then(n.bind(n,27143))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nominators.md",27143],"26dc7bd1":[function(){return n.e(166).then(n.bind(n,21975))},"@site/../docs/general/dune-analytics/parachain-dashboards/invarch-dashboards.md",21975],"279fb1d6":[function(){return Promise.all([n.e(1869),n.e(4994)]).then(n.bind(n,83022))},"@site/../docs/general/kusama/kusama-getting-started.md",83022],"28b84bbb":[function(){return n.e(9385).then(n.bind(n,85085))},"@site/../docs/build/build-network-overview.md",85085],"2be0d940":[function(){return Promise.all([n.e(1869),n.e(4537)]).then(n.bind(n,59681))},"@site/../docs/learn/learn-guides-identity.md",59681],"2d34559d":[function(){return n.e(7893).then(n.bind(n,24275))},"@site/../docs/learn/learn-jam-chain.md",24275],"2d429218":[function(){return n.e(6361).then(n.bind(n,82832))},"@site/../docs/learn/learn-consensus.md",82832],"2e0c35d5":[function(){return n.e(2698).then(n.bind(n,73123))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-governance-dashboard.md",73123],"2e944e01":[function(){return n.e(4231).then(n.bind(n,71471))},"@site/../docs/general/dune-analytics/parachain-dashboards/manta-dashboards.md",71471],"2ea50c63":[function(){return n.e(1560).then(n.bind(n,26160))},"@site/../docs/learn/learn-xcm-usecases.md",26160],"2f3b630e":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(2584)]).then(n.bind(n,95132))},"@site/../docs/learn/learn-polkadot-opengov.md",95132],"3002ebf4":[function(){return Promise.all([n.e(1869),n.e(3423)]).then(n.bind(n,57120))},"@site/../docs/build/build-dapp.md",57120],"3184af97":[function(){return Promise.all([n.e(1869),n.e(5362)]).then(n.bind(n,76526))},"@site/../docs/maintain/archive/maintain-guides-how-to-vote-councillor.md",76526],"31bd35e0":[function(){return n.e(1042).then(n.bind(n,18135))},"@site/../docs/learn/xcm/overview/summary.md",18135],"320c8a05":[function(){return n.e(4479).then(n.bind(n,98368))},"@site/../docs/maintain/maintain-networks.md",98368],"32c9742a":[function(){return n.e(9682).then(n.bind(n,70612))},"@site/../docs/learn/xcm/fundamentals/summary.md",70612],"33b0bcab":[function(){return n.e(1519).then(n.bind(n,9382))},"@site/../docs/learn/xcm/reference/xcvm-registers.md",9382],"33bbe353":[function(){return n.e(5033).then(n.bind(n,72083))},"@site/../docs/maintain/kusama/maintain-guides-society-kusama.md",72083],"34b0fecb":[function(){return n.e(1024).then(n.t.bind(n,22e3,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-references-e58.json",22e3],"3521cab9":[function(){return n.e(3827).then(n.t.bind(n,69073,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-staking-index-244.json",69073],"36051dfe":[function(){return n.e(3949).then(n.bind(n,98233))},"@site/../docs/general/dune-analytics/parachain-dashboards/unique-dashboards.md",98233],"3611be04":[function(){return Promise.all([n.e(1869),n.e(5761)]).then(n.bind(n,98712))},"@site/../docs/learn/learn-offenses.md",98712],"36b7ae49":[function(){return n.e(1914).then(n.bind(n,70137))},"@site/../docs/learn/learn-snowbridge.md",70137],"3829cf1d":[function(){return n.e(5249).then(n.bind(n,4909))},"@site/../docs/maintain/maintain-guides-validator-community.md",4909],"386099fc":[function(){return n.e(3091).then(n.bind(n,97980))},"@site/../docs/learn/learn-polkadot-opengov-treasury.md",97980],"386bfe51":[function(){return n.e(6319).then(n.bind(n,71220))},"@site/../docs/general/contributing.md",71220],"387813b8":[function(){return n.e(2409).then(n.bind(n,68766))},"@site/../docs/learn/learn-guides-coretime-parachains.md",68766],"390ca211":[function(){return Promise.all([n.e(1869),n.e(2623)]).then(n.bind(n,31287))},"@site/../docs/learn/archive/learn-launch.md",31287],"3ab7d35a":[function(){return n.e(5291).then(n.t.bind(n,35586,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-agile-coretime-index-f45.json",35586],"3bd77df4":[function(){return Promise.all([n.e(1869),n.e(3976)]).then(n.bind(n,40641))},"@site/../docs/learn/learn-bridges.md",40641],"3bd87233":[function(){return n.e(8309).then(n.t.bind(n,36278,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-maintain-validator-index-997.json",36278],"3d1bf5db":[function(){return n.e(4190).then(n.bind(n,47347))},"@site/../docs/maintain/maintain-guides-async-backing.md",47347],"3e56470e":[function(){return n.e(1608).then(n.bind(n,17740))},"@site/../docs/maintain/maintain-wss.md",17740],"41b7b3e8":[function(){return n.e(577).then(n.bind(n,15993))},"@site/../docs/learn/learn-staking-advanced.md",15993],"41f7224c":[function(){return Promise.all([n.e(1869),n.e(7376)]).then(n.bind(n,27049))},"@site/../docs/learn/learn-archive.md",27049],"437b4e16":[function(){return n.e(8647).then(n.bind(n,20718))},"@site/../docs/general/dune-analytics/parachain-dashboards/snowbridge-dashboards.md",20718],"43ee4f22":[function(){return Promise.all([n.e(1869),n.e(876)]).then(n.bind(n,36403))},"@site/../docs/build/build-guide.md",36403],"4403bb94":[function(){return n.e(3735).then(n.bind(n,39306))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-dot-ordinals.md",39306],"452ad91d":[function(){return n.e(6195).then(n.bind(n,24025))},"@site/../docs/learn/xcm/overview/intro.md",24025],"4642ab5c":[function(){return n.e(4434).then(n.bind(n,91797))},"@site/../docs/learn/learn-cryptography.md",91797],"46c5b6d8":[function(){return n.e(1905).then(n.t.bind(n,42578,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-comparisons-index-3c0.json",42578],"48d75399":[function(){return Promise.all([n.e(3482),n.e(230)]).then(n.bind(n,16870))},"@site/../docs/general/faq.md",16870],"493c7fdf":[function(){return Promise.all([n.e(3482),n.e(5053)]).then(n.bind(n,98828))},"@site/../docs/general/glossary.md",98828],"497334c4":[function(){return n.e(6736).then(n.bind(n,86739))},"@site/../docs/general/dune-analytics/project-dashboards.md",86739],"49ea81bb":[function(){return n.e(9233).then(n.bind(n,50803))},"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-staking.md",50803],"4a8eb552":[function(){return Promise.all([n.e(3482),n.e(1949)]).then(n.bind(n,4668))},"@site/../docs/learn/learn-comparisons-kusama.md",4668],"4d76887f":[function(){return n.e(6235).then(n.bind(n,60494))},"@site/../docs/build/build-hackathon.md",60494],"4d9b9869":[function(){return n.e(9550).then(n.bind(n,75024))},"@site/../docs/learn/learn-parachains-protocol.md",75024],"4f031749":[function(){return Promise.all([n.e(1869),n.e(1699)]).then(n.bind(n,35292))},"@site/../docs/learn/learn-guides-staking-pools.md",35292],"4f6f3f96":[function(){return n.e(1531).then(n.t.bind(n,56253,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-overview-d82.json",56253],"5136ee31":[function(){return n.e(4632).then(n.bind(n,23554))},"@site/../docs/learn/xcm/journey/expects.md",23554],"5193d8a9":[function(){return n.e(1511).then(n.bind(n,33199))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referenda-home.md",33199],"51fbc2c9":[function(){return n.e(2706).then(n.bind(n,43953))},"@site/../docs/learn/learn-comparisons.md",43953],"5355b952":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(2580),n.e(1003)]).then(n.bind(n,48427))},"@site/../docs/learn/learn-polkadot-opengov-origins.md",48427],"54338ffb":[function(){return n.e(8112).then(n.bind(n,60799))},"@site/../docs/learn/learn-account-multisig.md",60799],"543c9f0a":[function(){return n.e(566).then(n.bind(n,30644))},"@site/../docs/build/build-guides-coretime-troubleshoot.md",30644],"556d3f96":[function(){return n.e(1241).then(n.bind(n,62659))},"@site/../docs/general/dune-analytics/parachain-dashboards/astar-dashboards.md",62659],"571c8793":[function(){return n.e(3984).then(n.bind(n,28506))},"@site/../docs/general/dune-analytics/parachain-dashboards/moonbeam-dashboards.md",28506],"57d69936":[function(){return n.e(8736).then(n.t.bind(n,34309,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-programs-index-225.json",34309],"591eca19":[function(){return n.e(2493).then(n.bind(n,53458))},"@site/../docs/general/polkadot-direction.md",53458],"5c6a20c2":[function(){return n.e(9349).then(n.bind(n,77377))},"@site/../docs/learn/learn-safrole.md",77377],"5c90fc9b":[function(){return n.e(3708).then(n.bind(n,52012))},"@site/../docs/learn/xcm/executor_config/config.md",52012],"5d5db6f5":[function(){return n.e(3200).then(n.t.bind(n,56965,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-advanced-index-8e8.json",56965],"5d69d9d4":[function(){return n.e(1658).then(n.bind(n,87390))},"@site/../docs/maintain/maintain-guides-how-to-upgrade.md",87390],"5db34cd0":[function(){return n.e(8058).then(n.bind(n,74078))},"@site/../docs/general/decentralized-voices.md",74078],"5dfc1fb1":[function(){return n.e(1187).then(n.bind(n,2423))},"@site/../docs/general/pcf.md",2423],"5e1f281f":[function(){return n.e(6835).then(n.t.bind(n,33254,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-stay-safe-index-fb6.json",33254],"5e95c892":[function(){return n.e(9647).then(n.bind(n,7121))},"@theme/DocsRoot",7121],"5e9f5e1a":[function(){return Promise.resolve().then(n.bind(n,85290))},"@generated/docusaurus.config",85290],"5f2beba5":[function(){return n.e(7405).then(n.t.bind(n,39196,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-participants-index-530.json",39196],"60738e36":[function(){return Promise.all([n.e(3482),n.e(7777)]).then(n.bind(n,268))},"@site/../docs/general/metadata.md",268],"6116139f":[function(){return n.e(4840).then(n.bind(n,53932))},"@site/../docs/learn/learn-elastic-scaling.md",53932],"643a7bcf":[function(){return n.e(3345).then(n.t.bind(n,51948,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-wallets-index-9b6.json",51948],"64947d47":[function(){return n.e(8688).then(n.t.bind(n,27375,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-polkadot-vision-index-148.json",27375],"64c7e1cc":[function(){return n.e(8727).then(n.bind(n,23001))},"@site/../docs/build/build-integration.md",23001],"6544ec02":[function(){return n.e(9786).then(n.bind(n,49019))},"@site/../docs/general/alpha-program.md",49019],"6822f432":[function(){return n.e(2356).then(n.t.bind(n,50306,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-community-index-a87.json",50306],"694672cd":[function(){return Promise.all([n.e(1869),n.e(1004)]).then(n.bind(n,59458))},"@site/../docs/learn/learn-guides-staking.md",59458],"69b97ecd":[function(){return n.e(866).then(n.bind(n,21324))},"@site/../docs/learn/learn-implementations.md",21324],"6bfbfa77":[function(){return Promise.all([n.e(1869),n.e(2858)]).then(n.bind(n,7723))},"@site/../docs/learn/archive/learn-auction.md",7723],"6d2ffbf3":[function(){return n.e(4168).then(n.bind(n,31395))},"@site/../docs/learn/xcm/quickstart/first-look.md",31395],"6d423296":[function(){return n.e(9521).then(n.t.bind(n,12483,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-assets-index-7cb.json",12483],"6d5c9a28":[function(){return n.e(417).then(n.bind(n,55868))},"@site/../docs/general/staking-apps.md",55868],"6f1a81b8":[function(){return Promise.all([n.e(3482),n.e(2802)]).then(n.bind(n,19576))},"@site/../docs/maintain/maintain-guides-how-to-chill.md",19576],"700d39cd":[function(){return n.e(5647).then(n.t.bind(n,39389,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-polkadot-opengov-index-246.json",39389],"706277b1":[function(){return n.e(3487).then(n.bind(n,25834))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-validators.md",25834],"71ed82b9":[function(){return n.e(1369).then(n.bind(n,77371))},"@site/../docs/general/start-building.md",77371],"72b78d4a":[function(){return n.e(1772).then(n.bind(n,13109))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-opengov-referendum-voting-analysis.md",13109],73617284:[function(){return n.e(981).then(n.bind(n,26620))},"@site/../docs/learn/learn-hyperbridge.md",26620],"73a7060c":[function(){return Promise.all([n.e(3482),n.e(5208)]).then(n.bind(n,78741))},"@site/../docs/learn/learn-polkadot-technical-fellowship.md",78741],"73d1b372":[function(){return n.e(1498).then(n.bind(n,1874))},"@site/../docs/learn/learn-agile-coretime.md",1874],"74df6a22":[function(){return n.e(7227).then(n.bind(n,74064))},"@site/../docs/maintain/maintain-rpc.md",74064],"766a10e1":[function(){return n.e(6118).then(n.bind(n,15869))},"@site/../docs/learn/learn-comparisons-avalanche.md",15869],"77c23c97":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(3536)]).then(n.bind(n,90830))},"@site/../docs/learn/learn-transactions.md",90830],"78868b16":[function(){return n.e(1539).then(n.bind(n,97131))},"@site/../docs/general/kusama/kusama-social-recovery.md",97131],"78e1e977":[function(){return n.e(5884).then(n.bind(n,90616))},"@site/../docs/learn/xcm/journey/holding-modifiers.md",90616],"7c138549":[function(){return n.e(7473).then(n.bind(n,76173))},"@site/../docs/general/dune-analytics/parachain-dashboards/neuroweb-dashboards.md",76173],"7c43c534":[function(){return n.e(9787).then(n.t.bind(n,71769,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-fundamentals-multilocation-cfc.json",71769],"7dcec981":[function(){return Promise.all([n.e(1869),n.e(4271)]).then(n.bind(n,11714))},"@site/../docs/build/build-client-side.md",11714],"7fbac68a":[function(){return n.e(2757).then(n.bind(n,89032))},"@site/../docs/general/ambassadors.md",89032],"7ffd66a6":[function(){return n.e(6547).then(n.bind(n,38246))},"@site/../docs/general/dune-analytics/parachain-dashboards/acala-dashboards.md",38246],"804b1e9f":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(1062)]).then(n.bind(n,98362))},"@site/../docs/learn/learn-guides-nominator.md",98362],"8081c0c6":[function(){return n.e(8568).then(n.bind(n,77206))},"@site/../docs/general/parity-data-dashboards.md",77206],"824749c6":[function(){return n.e(8800).then(n.bind(n,68498))},"@site/../docs/build/build-node-interaction.md",68498],"8247eba8":[function(){return n.e(7044).then(n.bind(n,53935))},"@site/../docs/learn/xcm/journey/transfers/teleports.md",53935],"83d4859f":[function(){return n.e(2808).then(n.bind(n,3299))},"@site/../docs/learn/xcm/journey/transfers/summary.md",3299],"84ede15a":[function(){return Promise.all([n.e(1869),n.e(6124)]).then(n.bind(n,88779))},"@site/../docs/learn/learn-guides-transfers.md",88779],"85afe03a":[function(){return n.e(1628).then(n.bind(n,80396))},"@site/../docs/maintain/maintain-errors.md",80396],"863c4753":[function(){return n.e(6076).then(n.bind(n,51376))},"@site/../docs/learn/xcm/journey/register-modifiers.md",51376],"879e564b":[function(){return n.e(8789).then(n.bind(n,70272))},"@site/../docs/general/dune-analytics/onboarding-status-and-key-dashboards.md",70272],"899aadcc":[function(){return n.e(6993).then(n.bind(n,5596))},"@site/../docs/learn/xcm/overview/architecture.md",5596],"89a76fd2":[function(){return Promise.all([n.e(1869),n.e(2204)]).then(n.bind(n,4552))},"@site/../docs/learn/archive/learn-redenomination.md",4552],"8a8a7d05":[function(){return n.e(4791).then(n.bind(n,95827))},"@site/../docs/build/build-parachains.md",95827],"8b670b2b":[function(){return n.e(954).then(n.bind(n,62871))},"@site/../docs/build/build-index.md",62871],"8d3a1bf8":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(5588)]).then(n.bind(n,50373))},"@site/../docs/learn/learn-inflation.md",50373],"8d48ec84":[function(){return n.e(2615).then(n.bind(n,90640))},"@site/../docs/general/dune-analytics/parachain-dashboards/frequency-dashboards.md",90640],"8dd7cee0":[function(){return Promise.all([n.e(1869),n.e(7147)]).then(n.bind(n,52872))},"@site/../docs/general/thousand-validators.md",52872],"8fadc1f3":[function(){return n.e(2191).then(n.t.bind(n,98303,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-index-b78.json",98303],"90a09ad1":[function(){return n.e(8768).then(n.bind(n,98729))},"@site/../docs/general/dune-analytics/dunesql-cheatsheet.md",98729],"918b38b6":[function(){return Promise.all([n.e(3482),n.e(6930)]).then(n.bind(n,30479))},"@site/../docs/learn/learn-async-backing.md",30479],"93953b85":[function(){return n.e(6247).then(n.t.bind(n,48324,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-journey-f1c.json",48324],"943aba4c":[function(){return Promise.all([n.e(1869),n.e(1112)]).then(n.bind(n,83686))},"@site/../docs/learn/learn-guides-claims.md",83686],"9528ac88":[function(){return n.e(1379).then(n.bind(n,48707))},"@site/../docs/learn/learn-xcm-transport.md",48707],"95aedc42":[function(){return n.e(6842).then(n.t.bind(n,49664,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-journey-transfers-540.json",49664],"9662c81e":[function(){return Promise.all([n.e(1869),n.e(7809)]).then(n.bind(n,5771))},"@site/../docs/maintain/archive/maintain-guides-how-to-join-council.md",5771],"967fa6d4":[function(){return Promise.all([n.e(1869),n.e(7876)]).then(n.bind(n,62482))},"@site/../docs/learn/learn-guides-accounts-multisig.md",62482],"979a04e7":[function(){return n.e(3705).then(n.bind(n,82561))},"@site/../docs/general/dune-analytics/parachain-dashboards/bifrost-dashboards.md",82561],"987d08ef":[function(){return n.e(6496).then(n.bind(n,73036))},"@site/../docs/build/build-smart-contracts.md",73036],"98a30fd8":[function(){return n.e(2950).then(n.bind(n,11193))},"@site/../docs/learn/xcm/fundamentals/multiasset.md",11193],"98a431f4":[function(){return n.e(8005).then(n.bind(n,40058))},"@site/../docs/general/transaction-attacks.md",40058],"9913464d":[function(){return Promise.all([n.e(1869),n.e(5883)]).then(n.bind(n,9296))},"@site/../docs/learn/archive/learn-governance.md",9296],"9e2042f5":[function(){return n.e(3086).then(n.bind(n,70225))},"@site/../docs/learn/learn-collator.md",70225],"9e3f6a8a":[function(){return n.e(8108).then(n.bind(n,23773))},"@site/../docs/learn/learn-comparison-ethereum-2.md",23773],"9e6341e5":[function(){return n.e(8431).then(n.bind(n,62147))},"@site/../docs/learn/xcm/journey/transfers/reserve.md",62147],"9e76b49d":[function(){return n.e(6775).then(n.bind(n,29967))},"@site/../docs/learn/xcm/testing.md",29967],"9f319605":[function(){return n.e(834).then(n.bind(n,43635))},"@site/../docs/learn/xcm/journey/fees.md",43635],"9f804621":[function(){return Promise.all([n.e(1869),n.e(3482),n.e(1431)]).then(n.bind(n,92415))},"@site/../docs/learn/learn-guides-accounts.md",92415],a2800a5b:[function(){return n.e(3234).then(n.bind(n,29389))},"@site/../docs/build/build-transaction-construction.md",29389],a29dc56e:[function(){return n.e(7554).then(n.bind(n,81815))},"@site/../docs/maintain/maintain-guides-how-to-monitor-your-node.md",81815],a2d5a6d8:[function(){return n.e(6622).then(n.bind(n,51421))},"@site/../docs/general/dune-analytics/parachain-dashboards/collectives-dashboards.md",51421],a44b8423:[function(){return n.e(319).then(n.bind(n,55722))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-pool-member.md",55722],a5002e4a:[function(){return n.e(1067).then(n.bind(n,53029))},"@site/../docs/build/build-oracle.md",53029],a5b3561d:[function(){return n.e(2226).then(n.bind(n,54237))},"@site/../docs/general/kusama/kusama-coc.md",54237],a6e65e5f:[function(){return n.e(7208).then(n.t.bind(n,3840,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-quickstart-1cc.json",3840],a7456010:[function(){return n.e(1235).then(n.t.bind(n,50950,19))},"@generated/docusaurus-plugin-content-pages/default/__plugin.json",50950],a74a59a0:[function(){return Promise.all([n.e(3482),n.e(4975)]).then(n.bind(n,34917))},"@site/../docs/maintain/maintain-guides-how-to-validate-polkadot.md",34917],a7b37b86:[function(){return n.e(1447).then(n.bind(n,48999))},"@site/../docs/general/scams.md",48999],a7bd4aaa:[function(){return n.e(7098).then(n.bind(n,74532))},"@theme/DocVersionRoot",74532],a8f54fb1:[function(){return n.e(1706).then(n.bind(n,52280))},"@site/../docs/learn/learn-DOT-KSM-bridge.md",52280],a94703ab:[function(){return Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,11377))},"@theme/DocRoot",11377],a9f58d5b:[function(){return n.e(5331).then(n.bind(n,40936))},"@site/../docs/learn/learn-account-balances.md",40936],ab138bf8:[function(){return n.e(8914).then(n.bind(n,99771))},"@site/../docs/learn/learn-proxies.md",99771],aba21aa0:[function(){return n.e(5742).then(n.t.bind(n,98211,19))},"@generated/docusaurus-plugin-content-docs/default/__plugin.json",98211],ad1dd1a4:[function(){return n.e(7217).then(n.t.bind(n,86749,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-dashboards-index-254.json",86749],ad5a1373:[function(){return n.e(3656).then(n.bind(n,67166))},"@site/../docs/general/dune-analytics/parachain-dashboards/phala-dashboards.md",67166],ad762f86:[function(){return Promise.all([n.e(1869),n.e(3041)]).then(n.bind(n,12735))},"@site/../docs/learn/learn-account-advanced.md",12735],af2ff1b5:[function(){return n.e(6646).then(n.bind(n,18428))},"@site/../docs/general/dune-analytics/parachain-dashboards/hydration-dashboards.md",18428],afddde9d:[function(){return n.e(1724).then(n.bind(n,10666))},"@site/../docs/learn/learn-asset-conversion-assethub.md",10666],b0a48d97:[function(){return Promise.all([n.e(1869),n.e(1018)]).then(n.bind(n,31962))},"@site/../docs/learn/learn-guides-ledger.md",31962],b0cb055f:[function(){return n.e(9074).then(n.bind(n,93490))},"@site/../docs/learn/xcm/fundamentals/xcvm.md",93490],b0cbc1d4:[function(){return Promise.all([n.e(3482),n.e(7826)]).then(n.bind(n,2662))},"@site/../docs/general/staking-dashboard.md",2662],b0d34550:[function(){return n.e(8660).then(n.bind(n,42868))},"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-network.md",42868],b1b82dcd:[function(){return Promise.all([n.e(1869),n.e(557)]).then(n.bind(n,59384))},"@site/../docs/learn/archive/learn-crowdloans.md",59384],b21dd8a7:[function(){return n.e(6024).then(n.bind(n,28964))},"@site/../docs/learn/learn-comparison-rollups.md",28964],b225a2ce:[function(){return n.e(1101).then(n.bind(n,53241))},"@site/../docs/learn/xcm/fundamentals/multilocation/summary.md",53241],b3558274:[function(){return n.e(3975).then(n.bind(n,57844))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard.md",57844],b3719d54:[function(){return n.e(8290).then(n.bind(n,106))},"@site/../docs/general/polkadot-v1.md",106],b38833d4:[function(){return n.e(6104).then(n.bind(n,54357))},"@site/../docs/learn/learn-phragmen.md",54357],b418feb9:[function(){return n.e(7242).then(n.bind(n,42344))},"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-governance.md",42344],b48c599b:[function(){return n.e(9057).then(n.bind(n,66242))},"@site/../docs/general/kusama/kusama-bug-bounty.md",66242],b7bd3ab3:[function(){return n.e(6445).then(n.bind(n,46806))},"@site/../docs/general/dune-analytics/parachain-dashboards/energywebx-dashboards.md",46806],b835d927:[function(){return n.e(1397).then(n.bind(n,53119))},"@site/../docs/general/ecosystem-funds.md",53119],b8cd9d81:[function(){return n.e(3910).then(n.t.bind(n,33716,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-general-dune-analytics-polkadot-dashboards-be4.json",33716],b906f375:[function(){return n.e(159).then(n.bind(n,15102))},"@site/../docs/build/build-light-clients.md",15102],b940de31:[function(){return n.e(4817).then(n.bind(n,6598))},"@site/../docs/learn/learn-assets.md",6598],b9b4ec9e:[function(){return n.e(3316).then(n.bind(n,2197))},"@site/../docs/learn/xcm/reference/glossary.md",2197],bb8b1738:[function(){return Promise.all([n.e(3482),n.e(2916)]).then(n.bind(n,2937))},"@site/../docs/learn/learn-validator.md",2937],bbba852d:[function(){return n.e(9799).then(n.bind(n,20995))},"@site/../docs/general/kusama/kusama-adverserial-cheatsheet.md",20995],bd701914:[function(){return Promise.all([n.e(1869),n.e(1077)]).then(n.bind(n,63298))},"@site/../docs/learn/learn-parachains-faq.md",63298],bea375d6:[function(){return n.e(4938).then(n.bind(n,4907))},"@site/../docs/general/grants.md",4907],bf3ab9de:[function(){return Promise.all([n.e(1869),n.e(2389)]).then(n.bind(n,75753))},"@site/../docs/learn/learn-guides-bridges.md",75753],c07c2447:[function(){return Promise.all([n.e(1869),n.e(7561)]).then(n.bind(n,572))},"@site/../docs/learn/learn-guides-polkadot-opengov.md",572],c07ecb8b:[function(){return n.e(7371).then(n.t.bind(n,56310,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-general-dune-analytics-parachain-dashboards-671.json",56310],c110e322:[function(){return n.e(1592).then(n.bind(n,37917))},"@site/../docs/learn/learn-guides-coretime-swap.md",37917],c141421f:[function(){return n.e(957).then(n.t.bind(n,90786,19))},"@generated/docusaurus-theme-search-algolia/default/__plugin.json",90786],c1bbdb2a:[function(){return n.e(5558).then(n.bind(n,47008))},"@site/../docs/learn/learn-polkadot-host.md",47008],c2912163:[function(){return n.e(7352).then(n.t.bind(n,61910,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-components-index-c9a.json",61910],c2c6a3a6:[function(){return n.e(8506).then(n.bind(n,2506))},"@site/../docs/learn/learn-nft-projects.md",2506],c41801b5:[function(){return Promise.all([n.e(3482),n.e(9507)]).then(n.bind(n,95462))},"@site/../docs/maintain/kusama/maintain-guides-how-to-validate-kusama.md",95462],c4f5d8e4:[function(){return Promise.all([n.e(1869),n.e(2634)]).then(n.bind(n,497))},"@site/src/pages/index.js",497],c52e674c:[function(){return n.e(4466).then(n.t.bind(n,81627,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-build-archive-index-a99.json",81627],c57cca4f:[function(){return n.e(895).then(n.t.bind(n,33202,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-future-implementations-index-472.json",33202],c630d0cd:[function(){return n.e(5420).then(n.bind(n,23862))},"@site/../docs/build/build-guides-template-basic.md",23862],c662f00a:[function(){return n.e(7887).then(n.bind(n,21352))},"@site/../docs/learn/xcm/journey/queries.md",21352],c6b91cbc:[function(){return n.e(1050).then(n.t.bind(n,28239,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-basics-index-5be.json",28239],c78e4f7d:[function(){return n.e(1335).then(n.bind(n,39363))},"@site/../docs/general/dune-analytics/polkadot-dashboards/polkadot-dashboards-overview.md",39363],c7a044bb:[function(){return n.e(9110).then(n.bind(n,24225))},"@site/../docs/learn/xcm/journey/channels-and-bridges.md",24225],c7a2145e:[function(){return n.e(6277).then(n.bind(n,31059))},"@site/../docs/general/how-to-dyor.md",31059],c7c5ba1a:[function(){return Promise.all([n.e(1869),n.e(9476)]).then(n.bind(n,89207))},"@site/../docs/learn/learn-accounts.md",89207],c8dd560b:[function(){return Promise.all([n.e(1869),n.e(3482),n.e(4293)]).then(n.bind(n,77405))},"@site/../docs/learn/learn-guides-accounts-proxy-pure.md",77405],c91a9c06:[function(){return Promise.all([n.e(1869),n.e(1019)]).then(n.bind(n,84345))},"@site/../docs/learn/learn-identity.md",84345],c977dfe8:[function(){return Promise.all([n.e(3482),n.e(4024)]).then(n.bind(n,95304))},"@site/../docs/learn/learn-teleport.md",95304],ca45e589:[function(){return n.e(4821).then(n.t.bind(n,22754,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-explore-index-06f.json",22754],ca9fe671:[function(){return n.e(5827).then(n.bind(n,55995))},"@site/../docs/learn/xcm/overview/xcvm.md",55995],cb9afd28:[function(){return Promise.all([n.e(1869),n.e(1738)]).then(n.bind(n,27735))},"@site/../docs/learn/learn-polkadot-js-guides.md",27735],cc44e8fd:[function(){return n.e(5052).then(n.bind(n,2851))},"@site/../docs/build/build-node-management.md",2851],ccc1222e:[function(){return n.e(5702).then(n.bind(n,47765))},"@site/../docs/build/build-open-source.md",47765],cda87995:[function(){return n.e(1711).then(n.bind(n,24233))},"@site/../docs/build/build-tools-index.md",24233],cdedf67f:[function(){return n.e(8050).then(n.t.bind(n,8137,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-maintain-node-index-307.json",8137],ceaa29cb:[function(){return n.e(4841).then(n.bind(n,99027))},"@site/../docs/learn/xcm/journey/locks/locks.md",99027],cfd53ea4:[function(){return n.e(7482).then(n.bind(n,36531))},"@site/../docs/general/kusama/kusama-timeline.md",36531],cfe984ba:[function(){return n.e(8289).then(n.t.bind(n,57081,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-apps-index-b66.json",57081],d000eb73:[function(){return n.e(4228).then(n.bind(n,88218))},"@site/../docs/general/dune-analytics/parachain-dashboards/stellaswap-dashboards.md",88218],d27ae88d:[function(){return n.e(3170).then(n.bind(n,63366))},"@site/../docs/learn/learn-video-tutorials.md",63366],d3a753cf:[function(){return n.e(4191).then(n.bind(n,52819))},"@site/../docs/learn/xcm/fundamentals/multilocation/example.md",52819],d42819bc:[function(){return n.e(3306).then(n.bind(n,59666))},"@site/../docs/general/dune-analytics/parachain-dashboards/bridgehub-dashboards.md",59666],d569989b:[function(){return n.e(8255).then(n.bind(n,76030))},"@site/../docs/general/bug-bounty.md",76030],d5909206:[function(){return n.e(5434).then(n.bind(n,79245))},"@site/../docs/learn/xcm/fundamentals/multilocation/junction.md",79245],d6a97e7e:[function(){return n.e(1107).then(n.bind(n,58398))},"@site/../docs/learn/xcm/quickstart/xcm-simulator.md",58398],d6b0148d:[function(){return n.e(2980).then(n.bind(n,56591))},"@site/../docs/learn/xcm/journey/origins.md",56591],d9a69e3a:[function(){return n.e(5829).then(n.bind(n,41809))},"@site/../docs/general/dune-analytics/parachain-dashboards/people-dashboards.md",41809],d9ef69a7:[function(){return n.e(2164).then(n.bind(n,53894))},"@site/../docs/general/contributors.md",53894],da9f79cb:[function(){return Promise.all([n.e(1869),n.e(3044)]).then(n.bind(n,44903))},"@site/../docs/learn/learn-nomination-pools.md",44903],daaf1ab4:[function(){return Promise.all([n.e(1869),n.e(8215)]).then(n.bind(n,63523))},"@site/../docs/general/funding.md",63523],db039c7f:[function(){return n.e(2481).then(n.bind(n,40176))},"@site/../docs/learn/xcm/overview/format.md",40176],db3d6c4d:[function(){return n.e(7845).then(n.bind(n,19113))},"@site/../docs/learn/learn-account-abstraction.md",19113],db9d4dae:[function(){return n.e(8472).then(n.bind(n,47818))},"@site/../docs/general/dune-analytics/parachain-dashboards/coretime-dashboards.md",47818],dbbd9e76:[function(){return Promise.all([n.e(1869),n.e(2922)]).then(n.bind(n,22123))},"@site/../docs/learn/learn-guides-vault.md",22123],dc0f9344:[function(){return n.e(1058).then(n.bind(n,6794))},"@site/../docs/general/dune-analytics/parachain-dashboards/pendulum-dashboards.md",6794],dc36d550:[function(){return Promise.all([n.e(1869),n.e(2357)]).then(n.bind(n,32037))},"@site/../docs/maintain/maintain-archive.md",32037],dc776cbc:[function(){return n.e(4498).then(n.bind(n,55957))},"@site/../docs/general/thousand-contributors.md",55957],dd2fa029:[function(){return Promise.all([n.e(1869),n.e(2047)]).then(n.bind(n,98546))},"@site/../docs/learn/learn-polkadotjs.md",98546],dd32e389:[function(){return n.e(7781).then(n.bind(n,21279))},"@site/../docs/general/polkadot-vault.md",21279],df154d69:[function(){return n.e(3880).then(n.bind(n,80179))},"@site/../docs/learn/learn-xcm.md",80179],e00ac272:[function(){return n.e(1881).then(n.bind(n,89510))},"@site/../docs/learn/learn-guides-coretime-marketplaces.md",89510],e2e89062:[function(){return n.e(9894).then(n.bind(n,33910))},"@site/../docs/learn/learn-proxies-pure.md",33910],e31fc461:[function(){return n.e(352).then(n.bind(n,47881))},"@site/../docs/learn/xcm/learn-xcm-docs-intro.md",47881],e43aed4a:[function(){return n.e(1122).then(n.t.bind(n,95773,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-general-index-bbd.json",95773],e495ca4d:[function(){return Promise.all([n.e(1869),n.e(662)]).then(n.bind(n,6099))},"@site/../docs/maintain/archive/maintain-guides-democracy.md",6099],e4ef088f:[function(){return Promise.all([n.e(1869),n.e(3315)]).then(n.bind(n,62515))},"@site/../docs/build/build-guides-install-deps.md",62515],e77078a1:[function(){return n.e(3557).then(n.bind(n,29138))},"@site/../docs/learn/learn-jam-faq.md",29138],e8522a07:[function(){return n.e(5513).then(n.bind(n,38558))},"@site/../docs/general/dune-analytics/polkadot-dashboards/legacy/polkadot-staking-dashboard-nomination-pool.md",38558],ec3b6a32:[function(){return n.e(8832).then(n.bind(n,45003))},"@site/../docs/learn/learn-nft.md",45003],ecb495b7:[function(){return n.e(6786).then(n.bind(n,21017))},"@site/../docs/maintain/maintain-guides-how-to-systemd.md",21017],ece9fdae:[function(){return Promise.all([n.e(1869),n.e(6641)]).then(n.bind(n,49524))},"@site/../docs/general/community.md",49524],ed3409b3:[function(){return Promise.all([n.e(1869),n.e(4117)]).then(n.bind(n,1448))},"@site/../docs/learn/learn-guides-bounties.md",1448],eef3f1dd:[function(){return Promise.all([n.e(1869),n.e(7827)]).then(n.bind(n,3674))},"@site/../docs/learn/learn-guides-treasury.md",3674],efba78c5:[function(){return n.e(3368).then(n.bind(n,75273))},"@site/../docs/general/dune-analytics/polkadot-ecosystem-overview.md",75273],f0ff685a:[function(){return Promise.all([n.e(1869),n.e(3482),n.e(2393)]).then(n.bind(n,63362))},"@site/../docs/learn/learn-guides-accounts-proxy.md",63362],f10f9928:[function(){return n.e(5534).then(n.bind(n,42205))},"@site/../docs/general/dune-analytics/parachain-dashboards/assethub-dashboards.md",42205],f137ce68:[function(){return Promise.all([n.e(1869),n.e(9188)]).then(n.bind(n,33369))},"@site/../docs/learn/learn-xcm-instructions.md",33369],f1585bfb:[function(){return n.e(3642).then(n.bind(n,60957))},"@site/../docs/learn/xcm/quickstart/summary.md",60957],f189ca9f:[function(){return n.e(5312).then(n.bind(n,6026))},"@site/../docs/learn/learn-spree.md",6026],f2521980:[function(){return Promise.all([n.e(3482),n.e(3584)]).then(n.bind(n,28258))},"@site/../docs/general/getting-started.md",28258],f2b5c614:[function(){return n.e(4076).then(n.bind(n,91422))},"@site/../docs/general/dune-analytics/parachain-dashboards/centrifuge-dashboards.md",91422],f2c21b54:[function(){return n.e(4410).then(n.bind(n,99698))},"@site/../docs/build/build-storage.md",99698],f3027c84:[function(){return Promise.all([n.e(1869),n.e(1906)]).then(n.bind(n,2588))},"@site/../docs/general/polkadotjs-ui.md",2588],f359a251:[function(){return Promise.all([n.e(1869),n.e(4051)]).then(n.bind(n,90801))},"@site/../docs/maintain/maintain-endpoints.md",90801],f3bde756:[function(){return n.e(9625).then(n.bind(n,63675))},"@site/../docs/maintain/maintain-bootnode.md",63675],f4130007:[function(){return n.e(8582).then(n.bind(n,25151))},"@site/../docs/general/wallets-and-extensions.md",25151],f41c4e9d:[function(){return n.e(8679).then(n.bind(n,29446))},"@site/../docs/learn/learn-xcm-pallet.md",29446],f4200fe5:[function(){return Promise.all([n.e(1869),n.e(3135)]).then(n.bind(n,41360))},"@site/../docs/maintain/maintain-sync.md",41360],f44679e7:[function(){return n.e(9535).then(n.bind(n,24577))},"@site/../docs/general/governance-apps.md",24577],f44ed8f8:[function(){return n.e(2930).then(n.bind(n,49430))},"@site/../docs/build/build-hrmp-channels.md",49430],f47489cd:[function(){return n.e(4544).then(n.bind(n,31237))},"@site/../docs/learn/learn-runtime-upgrades.md",31237],f52abf29:[function(){return n.e(9116).then(n.bind(n,47817))},"@site/../docs/general/decentralized-futures.md",47817],f62dca67:[function(){return n.e(6416).then(n.t.bind(n,78697,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-learn-xcm-fundamentals-e19.json",78697],f750c690:[function(){return n.e(3261).then(n.bind(n,16117))},"@site/../docs/learn/learn-nft-pallets.md",16117],f7acb151:[function(){return Promise.all([n.e(1869),n.e(2783)]).then(n.bind(n,43143))},"@site/../docs/learn/learn-guides-assets-create.md",43143],f8518919:[function(){return n.e(4484).then(n.bind(n,74390))},"@site/../docs/general/web3-and-polkadot.md",74390],f861e7c0:[function(){return n.e(5967).then(n.bind(n,63609))},"@site/../docs/general/dune-analytics/parachain-dashboards/litentry-dashboards.md",63609],f90fa732:[function(){return n.e(8225).then(n.bind(n,22027))},"@site/../docs/build/build-data.md",22027],fa343ad1:[function(){return n.e(2368).then(n.bind(n,37374))},"@site/../docs/learn/xcm/fundamentals/weight_and_fees.md",37374],fabebe44:[function(){return n.e(9783).then(n.bind(n,68818))},"@site/../docs/general/dev-heroes.md",68818],fc0e5740:[function(){return n.e(8067).then(n.t.bind(n,32591,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-build-client-index-10e.json",32591],fda65b2b:[function(){return Promise.all([n.e(1869),n.e(6225)]).then(n.bind(n,54276))},"@site/../docs/learn/learn-guides-asset-conversion.md",54276],fea93377:[function(){return Promise.all([n.e(3482),n.e(4898)]).then(n.bind(n,45800))},"@site/../docs/maintain/maintain-guides-validator-payout.md",45800],feadf832:[function(){return Promise.all([n.e(1869),n.e(1710)]).then(n.bind(n,84680))},"@site/../docs/build/build-guides-coretime-start.md",84680],fecdcc34:[function(){return n.e(2410).then(n.bind(n,69144))},"@site/../docs/learn/xcm/journey/version.md",69144],feea648c:[function(){return n.e(9175).then(n.bind(n,35543))},"@site/../docs/learn/learn-xcvm.md",35543],ff154173:[function(){return n.e(34).then(n.t.bind(n,88796,19))},"@generated/docusaurus-plugin-content-docs/default/p/docs-maintain-collator-index-c0b.json",88796],ff6596ea:[function(){return Promise.all([n.e(3482),n.e(3507)]).then(n.bind(n,65410))},"@site/../docs/learn/learn-nominator.md",65410],ffd76171:[function(){return Promise.all([n.e(1869),n.e(639)]).then(n.bind(n,98319))},"@site/../docs/maintain/maintain-index.md",98319],ffe9c3c9:[function(){return n.e(1967).then(n.bind(n,99220))},"@site/../docs/learn/learn-DOT.md",99220]};var s=n(74848);function c(e){var t=e.error,n=e.retry,r=e.pastDelay;return t?(0,s.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,s.jsx)("p",{children:String(t)}),(0,s.jsx)("div",{children:(0,s.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,s.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,s.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,s.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var l=n(86921),u=n(53102);function d(e,t){if("*"===e)return a()({loading:c,loader:function(){return n.e(2237).then(n.bind(n,82237))},modules:["@theme/NotFound"],webpack:function(){return[82237]},render:function(e,t){var n=e.default;return(0,s.jsx)(u.W,{value:{plugin:{name:"native",id:"default"}},children:(0,s.jsx)(n,Object.assign({},t))})}});var r=o[e+"-"+t],d={},p=[],f=[],m=(0,l.A)(r);return Object.entries(m).forEach((function(e){var t=e[0],n=e[1],r=i[n];r&&(d[t]=r[0],p.push(r[1]),f.push(r[2]))})),a().Map({loading:c,loader:d,modules:p,webpack:function(){return f},render:function(t,n){var a=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((function(t){var n=t[0],r=t[1],o=r.default;if(!o)throw new Error("The page component at "+e+" doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.");"object"!=typeof o&&"function"!=typeof o||Object.keys(r).filter((function(e){return"default"!==e})).forEach((function(e){o[e]=r[e]}));var i=a,s=n.split(".");s.slice(0,-1).forEach((function(e){i=i[e]})),i[s[s.length-1]]=o}));var o=a.__comp;delete a.__comp;var i=a.__context;delete a.__context;var c=a.__props;return delete a.__props,(0,s.jsx)(u.W,{value:i,children:(0,s.jsx)(o,Object.assign({},a,c,n))})}})}const p=[{path:"/search",component:d("/search","5de"),exact:!0},{path:"/docs",component:d("/docs","923"),routes:[{path:"/docs",component:d("/docs","738"),routes:[{path:"/docs",component:d("/docs","813"),routes:[{path:"/docs/alpha-program",component:d("/docs/alpha-program","9f0"),exact:!0,sidebar:"docs"},{path:"/docs/ambassadors",component:d("/docs/ambassadors","718"),exact:!0,sidebar:"docs"},{path:"/docs/apps-index",component:d("/docs/apps-index","b46"),exact:!0,sidebar:"docs"},{path:"/docs/bug-bounty",component:d("/docs/bug-bounty","1ba"),exact:!0,sidebar:"docs"},{path:"/docs/build-archive-index",component:d("/docs/build-archive-index","3b3"),exact:!0,sidebar:"docs"},{path:"/docs/build-client-index",component:d("/docs/build-client-index","e7c"),exact:!0,sidebar:"docs"},{path:"/docs/build-client-side",component:d("/docs/build-client-side","65f"),exact:!0,sidebar:"docs"},{path:"/docs/build-dapp",component:d("/docs/build-dapp","dd7"),exact:!0},{path:"/docs/build-data",component:d("/docs/build-data","95f"),exact:!0,sidebar:"docs"},{path:"/docs/build-guide",component:d("/docs/build-guide","479"),exact:!0,sidebar:"docs"},{path:"/docs/build-guides-coretime-start",component:d("/docs/build-guides-coretime-start","7be"),exact:!0,sidebar:"docs"},{path:"/docs/build-guides-coretime-troubleshoot",component:d("/docs/build-guides-coretime-troubleshoot","0fb"),exact:!0,sidebar:"docs"},{path:"/docs/build-guides-install-deps",component:d("/docs/build-guides-install-deps","5f9"),exact:!0,sidebar:"docs"},{path:"/docs/build-guides-template-basic",component:d("/docs/build-guides-template-basic","326"),exact:!0,sidebar:"docs"},{path:"/docs/build-hackathon",component:d("/docs/build-hackathon","c97"),exact:!0,sidebar:"docs"},{path:"/docs/build-hrmp-channels",component:d("/docs/build-hrmp-channels","05c"),exact:!0,sidebar:"docs"},{path:"/docs/build-index",component:d("/docs/build-index","26d"),exact:!0},{path:"/docs/build-integrate-assets",component:d("/docs/build-integrate-assets","47a"),exact:!0,sidebar:"docs"},{path:"/docs/build-integration",component:d("/docs/build-integration","75b"),exact:!0,sidebar:"docs"},{path:"/docs/build-light-clients",component:d("/docs/build-light-clients","f31"),exact:!0,sidebar:"docs"},{path:"/docs/build-network-overview",component:d("/docs/build-network-overview","fb1"),exact:!0,sidebar:"docs"},{path:"/docs/build-node-interaction",component:d("/docs/build-node-interaction","f39"),exact:!0,sidebar:"docs"},{path:"/docs/build-node-management",component:d("/docs/build-node-management","cef"),exact:!0,sidebar:"docs"},{path:"/docs/build-open-source",component:d("/docs/build-open-source","416"),exact:!0,sidebar:"docs"},{path:"/docs/build-oracle",component:d("/docs/build-oracle","392"),exact:!0},{path:"/docs/build-pdk",component:d("/docs/build-pdk","d70"),exact:!0,sidebar:"docs"},{path:"/docs/build-protocol-index",component:d("/docs/build-protocol-index","aac"),exact:!0,sidebar:"docs"},{path:"/docs/build-protocol-info",component:d("/docs/build-protocol-info","a80"),exact:!0,sidebar:"docs"},{path:"/docs/build-smart-contracts",component:d("/docs/build-smart-contracts","bd5"),exact:!0,sidebar:"docs"},{path:"/docs/build-storage",component:d("/docs/build-storage","451"),exact:!0},{path:"/docs/build-tools-index",component:d("/docs/build-tools-index","889"),exact:!0,sidebar:"docs"},{path:"/docs/build-transaction-construction",component:d("/docs/build-transaction-construction","5ab"),exact:!0,sidebar:"docs"},{path:"/docs/chain-state-values",component:d("/docs/chain-state-values","35a"),exact:!0,sidebar:"docs"},{path:"/docs/community",component:d("/docs/community","d96"),exact:!0,sidebar:"docs"},{path:"/docs/community-index",component:d("/docs/community-index","d5a"),exact:!0,sidebar:"docs"},{path:"/docs/contributing",component:d("/docs/contributing","89f"),exact:!0,sidebar:"docs"},{path:"/docs/contributors",component:d("/docs/contributors","420"),exact:!0,sidebar:"docs"},{path:"/docs/dashboards-index",component:d("/docs/dashboards-index","421"),exact:!0,sidebar:"docs"},{path:"/docs/decentralized-futures",component:d("/docs/decentralized-futures","ff3"),exact:!0,sidebar:"docs"},{path:"/docs/decentralized-voices",component:d("/docs/decentralized-voices","a4e"),exact:!0,sidebar:"docs"},{path:"/docs/dev-heroes",component:d("/docs/dev-heroes","3a5"),exact:!0,sidebar:"docs"},{path:"/docs/ecosystem-funds",component:d("/docs/ecosystem-funds","479"),exact:!0,sidebar:"docs"},{path:"/docs/explore-index",component:d("/docs/explore-index","1f3"),exact:!0,sidebar:"docs"},{path:"/docs/faq",component:d("/docs/faq","286"),exact:!0,sidebar:"docs"},{path:"/docs/funding",component:d("/docs/funding","331"),exact:!0,sidebar:"docs"},{path:"/docs/general-index",component:d("/docs/general-index","409"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics",component:d("/docs/general/dune-analytics","b98"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/acala-dashboards",component:d("/docs/general/dune-analytics/acala-dashboards","792"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/assethub-dashboards",component:d("/docs/general/dune-analytics/assethub-dashboards","400"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/astar-dashboards",component:d("/docs/general/dune-analytics/astar-dashboards","790"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/bifrost-dashboards",component:d("/docs/general/dune-analytics/bifrost-dashboards","a46"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/bridgehub-dashboards",component:d("/docs/general/dune-analytics/bridgehub-dashboards","c1b"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/centrifuge-dashboards",component:d("/docs/general/dune-analytics/centrifuge-dashboards","ec8"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/collectives-dashboards",component:d("/docs/general/dune-analytics/collectives-dashboards","e12"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/coretime-dashboards",component:d("/docs/general/dune-analytics/coretime-dashboards","d8b"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/energywebx-dashboards",component:d("/docs/general/dune-analytics/energywebx-dashboards","936"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/frequency-dashboards",component:d("/docs/general/dune-analytics/frequency-dashboards","549"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/hydration-dashboards",component:d("/docs/general/dune-analytics/hydration-dashboards","366"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/interlay-dashboards",component:d("/docs/general/dune-analytics/interlay-dashboards","0c8"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/invarch-dashboards",component:d("/docs/general/dune-analytics/invarch-dashboards","8e2"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/litentry-dashboards",component:d("/docs/general/dune-analytics/litentry-dashboards","120"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/manta-dashboards",component:d("/docs/general/dune-analytics/manta-dashboards","02e"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/moonbeam-dashboards",component:d("/docs/general/dune-analytics/moonbeam-dashboards","319"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/neuroweb-dashboards",component:d("/docs/general/dune-analytics/neuroweb-dashboards","91b"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/nodle-dashboards",component:d("/docs/general/dune-analytics/nodle-dashboards","02e"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/parachain-dashboards",component:d("/docs/general/dune-analytics/parachain-dashboards","8fc"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/pendulum-dashboards",component:d("/docs/general/dune-analytics/pendulum-dashboards","dee"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/people-dashboards",component:d("/docs/general/dune-analytics/people-dashboards","7cf"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/phala-dashboards",component:d("/docs/general/dune-analytics/phala-dashboards","1a0"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polimec-dashboards",component:d("/docs/general/dune-analytics/polimec-dashboards","1ba"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadex-dashboards",component:d("/docs/general/dune-analytics/polkadex-dashboards","a53"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards",component:d("/docs/general/dune-analytics/polkadot-dashboards","689"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards-governance",component:d("/docs/general/dune-analytics/polkadot-dashboards-governance","a36"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards-network",component:d("/docs/general/dune-analytics/polkadot-dashboards-network","73d"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards-overview",component:d("/docs/general/dune-analytics/polkadot-dashboards-overview","d8e"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards-staking",component:d("/docs/general/dune-analytics/polkadot-dashboards-staking","f70"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-dot-ordinals",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-dot-ordinals","2ad"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-governance-dashboard",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-governance-dashboard","bf1"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referenda-home",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referenda-home","b4b"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referendum-voting-analysis",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-opengov-referendum-voting-analysis","cfb"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard","856"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nomination-pool",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nomination-pool","613"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nominators",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-nominators","a03"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-pool-member",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-pool-member","ddb"),exact:!0},{path:"/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-validators",component:d("/docs/general/dune-analytics/polkadot-dashboards/polkadot-staking-dashboard-validators","d6d"),exact:!0},{path:"/docs/general/dune-analytics/snowbridge-dashboards",component:d("/docs/general/dune-analytics/snowbridge-dashboards","915"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/stellaswap-dashboards",component:d("/docs/general/dune-analytics/stellaswap-dashboards","0bf"),exact:!0,sidebar:"docs"},{path:"/docs/general/dune-analytics/unique-dashboards",component:d("/docs/general/dune-analytics/unique-dashboards","f74"),exact:!0,sidebar:"docs"},{path:"/docs/general/dunesql-cheatsheet",component:d("/docs/general/dunesql-cheatsheet","fe2"),exact:!0,sidebar:"docs"},{path:"/docs/general/onboarding-status-and-key-dashboards",component:d("/docs/general/onboarding-status-and-key-dashboards","b88"),exact:!0,sidebar:"docs"},{path:"/docs/general/polkadot-ecosystem-overview",component:d("/docs/general/polkadot-ecosystem-overview","bcd"),exact:!0,sidebar:"docs"},{path:"/docs/general/project-dashboards",component:d("/docs/general/project-dashboards","c57"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started",component:d("/docs/getting-started","46c"),exact:!0,sidebar:"docs"},{path:"/docs/glossary",component:d("/docs/glossary","021"),exact:!0,sidebar:"docs"},{path:"/docs/governance-apps",component:d("/docs/governance-apps","055"),exact:!0,sidebar:"docs"},{path:"/docs/grants",component:d("/docs/grants","586"),exact:!0,sidebar:"docs"},{path:"/docs/how-to-dyor",component:d("/docs/how-to-dyor","9ea"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-adversarial-cheatsheet",component:d("/docs/kusama-adversarial-cheatsheet","7ad"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-bug-bounty",component:d("/docs/kusama-bug-bounty","5ce"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-coc",component:d("/docs/kusama-coc","fee"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-getting-started",component:d("/docs/kusama-getting-started","c42"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-social-recovery",component:d("/docs/kusama-social-recovery","f3d"),exact:!0,sidebar:"docs"},{path:"/docs/kusama-timeline",component:d("/docs/kusama-timeline","d67"),exact:!0,sidebar:"docs"},{path:"/docs/learn-account-abstraction",component:d("/docs/learn-account-abstraction","670"),exact:!0,sidebar:"docs"},{path:"/docs/learn-account-advanced",component:d("/docs/learn-account-advanced","652"),exact:!0,sidebar:"docs"},{path:"/docs/learn-account-balances",component:d("/docs/learn-account-balances","8e6"),exact:!0,sidebar:"docs"},{path:"/docs/learn-account-multisig",component:d("/docs/learn-account-multisig","f13"),exact:!0,sidebar:"docs"},{path:"/docs/learn-accounts",component:d("/docs/learn-accounts","42e"),exact:!0,sidebar:"docs"},{path:"/docs/learn-advanced-index",component:d("/docs/learn-advanced-index","63e"),exact:!0,sidebar:"docs"},{path:"/docs/learn-agile-coretime",component:d("/docs/learn-agile-coretime","777"),exact:!0,sidebar:"docs"},{path:"/docs/learn-agile-coretime-index",component:d("/docs/learn-agile-coretime-index","fa7"),exact:!0,sidebar:"docs"},{path:"/docs/learn-architecture",component:d("/docs/learn-architecture","908"),exact:!0,sidebar:"docs"},{path:"/docs/learn-archive",component:d("/docs/learn-archive","ca8"),exact:!0,sidebar:"docs"},{path:"/docs/learn-asset-conversion-assethub",component:d("/docs/learn-asset-conversion-assethub","426"),exact:!0,sidebar:"docs"},{path:"/docs/learn-assets",component:d("/docs/learn-assets","624"),exact:!0,sidebar:"docs"},{path:"/docs/learn-assets-index",component:d("/docs/learn-assets-index","506"),exact:!0,sidebar:"docs"},{path:"/docs/learn-async-backing",component:d("/docs/learn-async-backing","691"),exact:!0,sidebar:"docs"},{path:"/docs/learn-basics-index",component:d("/docs/learn-basics-index","2ab"),exact:!0,sidebar:"docs"},{path:"/docs/learn-bridges",component:d("/docs/learn-bridges","c95"),exact:!0,sidebar:"docs"},{path:"/docs/learn-collator",component:d("/docs/learn-collator","58b"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons",component:d("/docs/learn-comparisons","26e"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-avalanche",component:d("/docs/learn-comparisons-avalanche","9e6"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-cosmos",component:d("/docs/learn-comparisons-cosmos","9e6"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-ethereum-2",component:d("/docs/learn-comparisons-ethereum-2","e28"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-index",component:d("/docs/learn-comparisons-index","d6b"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-kusama",component:d("/docs/learn-comparisons-kusama","bba"),exact:!0,sidebar:"docs"},{path:"/docs/learn-comparisons-rollups",component:d("/docs/learn-comparisons-rollups","f66"),exact:!0,sidebar:"docs"},{path:"/docs/learn-components-index",component:d("/docs/learn-components-index","ba1"),exact:!0,sidebar:"docs"},{path:"/docs/learn-consensus",component:d("/docs/learn-consensus","83d"),exact:!0,sidebar:"docs"},{path:"/docs/learn-cryptography",component:d("/docs/learn-cryptography","ed0"),exact:!0,sidebar:"docs"},{path:"/docs/learn-DOT",component:d("/docs/learn-DOT","829"),exact:!0,sidebar:"docs"},{path:"/docs/learn-dot-ksm-bridge",component:d("/docs/learn-dot-ksm-bridge","cac"),exact:!0,sidebar:"docs"},{path:"/docs/learn-elastic-scaling",component:d("/docs/learn-elastic-scaling","867"),exact:!0,sidebar:"docs"},{path:"/docs/learn-future-implementations-index",component:d("/docs/learn-future-implementations-index","e25"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-accounts",component:d("/docs/learn-guides-accounts","e52"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-accounts-multisig",component:d("/docs/learn-guides-accounts-multisig","db1"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-accounts-proxy",component:d("/docs/learn-guides-accounts-proxy","c3c"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-accounts-proxy-pure",component:d("/docs/learn-guides-accounts-proxy-pure","76e"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-asset-conversion",component:d("/docs/learn-guides-asset-conversion","6af"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-assets",component:d("/docs/learn-guides-assets","832"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-assets-create",component:d("/docs/learn-guides-assets-create","eb2"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-bounties",component:d("/docs/learn-guides-bounties","883"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-bridges",component:d("/docs/learn-guides-bridges","5ea"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-claims",component:d("/docs/learn-guides-claims","1bb"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-coretime-marketplaces",component:d("/docs/learn-guides-coretime-marketplaces","515"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-coretime-parachains",component:d("/docs/learn-guides-coretime-parachains","8e6"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-coretime-swap",component:d("/docs/learn-guides-coretime-swap","85c"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-dot-ksm-bridge",component:d("/docs/learn-guides-dot-ksm-bridge","5d0"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-identity",component:d("/docs/learn-guides-identity","6ba"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-ledger",component:d("/docs/learn-guides-ledger","7de"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-nominator",component:d("/docs/learn-guides-nominator","394"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-polkadot-opengov",component:d("/docs/learn-guides-polkadot-opengov","238"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-staking",component:d("/docs/learn-guides-staking","bf2"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-staking-pools",component:d("/docs/learn-guides-staking-pools","14f"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-transfers",component:d("/docs/learn-guides-transfers","765"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-treasury",component:d("/docs/learn-guides-treasury","436"),exact:!0,sidebar:"docs"},{path:"/docs/learn-guides-vault",component:d("/docs/learn-guides-vault","f34"),exact:!0,sidebar:"docs"},{path:"/docs/learn-hyperbridge",component:d("/docs/learn-hyperbridge","646"),exact:!0,sidebar:"docs"},{path:"/docs/learn-identity",component:d("/docs/learn-identity","06f"),exact:!0,sidebar:"docs"},{path:"/docs/learn-implementations",component:d("/docs/learn-implementations","9b0"),exact:!0},{path:"/docs/learn-index",component:d("/docs/learn-index","0b7"),exact:!0,sidebar:"docs"},{path:"/docs/learn-inflation",component:d("/docs/learn-inflation","a49"),exact:!0,sidebar:"docs"},{path:"/docs/learn-jam",component:d("/docs/learn-jam","e19"),exact:!0,sidebar:"docs"},{path:"/docs/learn-jam-chain",component:d("/docs/learn-jam-chain","35f"),exact:!0,sidebar:"docs"},{path:"/docs/learn-jam-faq",component:d("/docs/learn-jam-faq","617"),exact:!0,sidebar:"docs"},{path:"/docs/learn-nft",component:d("/docs/learn-nft","078"),exact:!0,sidebar:"docs"},{path:"/docs/learn-nft-pallets",component:d("/docs/learn-nft-pallets","665"),exact:!0,sidebar:"docs"},{path:"/docs/learn-nft-projects",component:d("/docs/learn-nft-projects","226"),exact:!0,sidebar:"docs"},{path:"/docs/learn-nomination-pools",component:d("/docs/learn-nomination-pools","328"),exact:!0,sidebar:"docs"},{path:"/docs/learn-nominator",component:d("/docs/learn-nominator","443"),exact:!0,sidebar:"docs"},{path:"/docs/learn-offenses",component:d("/docs/learn-offenses","ed9"),exact:!0,sidebar:"docs"},{path:"/docs/learn-parachains",component:d("/docs/learn-parachains","d04"),exact:!0,sidebar:"docs"},{path:"/docs/learn-parachains-faq",component:d("/docs/learn-parachains-faq","a2b"),exact:!0,sidebar:"docs"},{path:"/docs/learn-parachains-index",component:d("/docs/learn-parachains-index","e80"),exact:!0,sidebar:"docs"},{path:"/docs/learn-parachains-protocol",component:d("/docs/learn-parachains-protocol","604"),exact:!0,sidebar:"docs"},{path:"/docs/learn-participants-index",component:d("/docs/learn-participants-index","426"),exact:!0,sidebar:"docs"},{path:"/docs/learn-phragmen",component:d("/docs/learn-phragmen","894"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-host",component:d("/docs/learn-polkadot-host","92a"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-js-guides",component:d("/docs/learn-polkadot-js-guides","f92"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-opengov",component:d("/docs/learn-polkadot-opengov","8c9"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-opengov-index",component:d("/docs/learn-polkadot-opengov-index","922"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-opengov-origins",component:d("/docs/learn-polkadot-opengov-origins","9d6"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-opengov-treasury",component:d("/docs/learn-polkadot-opengov-treasury","fbd"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadot-technical-fellowship",component:d("/docs/learn-polkadot-technical-fellowship","ee8"),exact:!0,sidebar:"docs"},{path:"/docs/learn-polkadotjs",component:d("/docs/learn-polkadotjs","56a"),exact:!0,sidebar:"docs"},{path:"/docs/learn-proxies",component:d("/docs/learn-proxies","a18"),exact:!0,sidebar:"docs"},{path:"/docs/learn-proxies-pure",component:d("/docs/learn-proxies-pure","8be"),exact:!0,sidebar:"docs"},{path:"/docs/learn-runtime-upgrades",component:d("/docs/learn-runtime-upgrades","582"),exact:!0,sidebar:"docs"},{path:"/docs/learn-safrole",component:d("/docs/learn-safrole","213"),exact:!0,sidebar:"docs"},{path:"/docs/learn-scams",component:d("/docs/learn-scams","a7e"),exact:!0,sidebar:"docs"},{path:"/docs/learn-snowbridge",component:d("/docs/learn-snowbridge","f68"),exact:!0,sidebar:"docs"},{path:"/docs/learn-spree",component:d("/docs/learn-spree","c79"),exact:!0,sidebar:"docs"},{path:"/docs/learn-staking",component:d("/docs/learn-staking","9b8"),exact:!0,sidebar:"docs"},{path:"/docs/learn-staking-advanced",component:d("/docs/learn-staking-advanced","33a"),exact:!0,sidebar:"docs"},{path:"/docs/learn-staking-index",component:d("/docs/learn-staking-index","cf9"),exact:!0,sidebar:"docs"},{path:"/docs/learn-system-chains",component:d("/docs/learn-system-chains","1b0"),exact:!0,sidebar:"docs"},{path:"/docs/learn-teleport",component:d("/docs/learn-teleport","e18"),exact:!0,sidebar:"docs"},{path:"/docs/learn-transactions",component:d("/docs/learn-transactions","81c"),exact:!0,sidebar:"docs"},{path:"/docs/learn-validator",component:d("/docs/learn-validator","4f1"),exact:!0,sidebar:"docs"},{path:"/docs/learn-video-tutorials",component:d("/docs/learn-video-tutorials","64f"),exact:!0,sidebar:"docs"},{path:"/docs/learn-wasm",component:d("/docs/learn-wasm","0b7"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm",component:d("/docs/learn-xcm","20d"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm-index",component:d("/docs/learn-xcm-index","49c"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm-instructions",component:d("/docs/learn-xcm-instructions","3c1"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm-pallet",component:d("/docs/learn-xcm-pallet","3da"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm-transport",component:d("/docs/learn-xcm-transport","5ef"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcm-usecases",component:d("/docs/learn-xcm-usecases","2ae"),exact:!0,sidebar:"docs"},{path:"/docs/learn-xcvm",component:d("/docs/learn-xcvm","d56"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-auction",component:d("/docs/learn/learn-auction","7ec"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-controller",component:d("/docs/learn/learn-controller","d30"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-crowdloans",component:d("/docs/learn/learn-crowdloans","834"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-governance",component:d("/docs/learn/learn-governance","4df"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-launch",component:d("/docs/learn/learn-launch","853"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-redenomination",component:d("/docs/learn/learn-redenomination","6a6"),exact:!0,sidebar:"docs"},{path:"/docs/learn/learn-treasury",component:d("/docs/learn/learn-treasury","ef0"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm",component:d("/docs/learn/xcm","995"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/config-deep-dive",component:d("/docs/learn/xcm/config-deep-dive","b64"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals",component:d("/docs/learn/xcm/fundamentals","13d"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals-fees",component:d("/docs/learn/xcm/fundamentals-fees","6b3"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals-multiasset",component:d("/docs/learn/xcm/fundamentals-multiasset","001"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals-summary",component:d("/docs/learn/xcm/fundamentals-summary","a4b"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals-xcvm",component:d("/docs/learn/xcm/fundamentals-xcvm","086"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals/multilocation",component:d("/docs/learn/xcm/fundamentals/multilocation","e19"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals/multilocation-example",component:d("/docs/learn/xcm/fundamentals/multilocation-example","358"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals/multilocation-junctions",component:d("/docs/learn/xcm/fundamentals/multilocation-junctions","e64"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/fundamentals/multilocation-summary",component:d("/docs/learn/xcm/fundamentals/multilocation-summary","958"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/introduction",component:d("/docs/learn/xcm/introduction","813"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey",component:d("/docs/learn/xcm/journey","0b1"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-assets",component:d("/docs/learn/xcm/journey-assets","bf0"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-channels",component:d("/docs/learn/xcm/journey-channels","22c"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-expectations",component:d("/docs/learn/xcm/journey-expectations","c0f"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-fees",component:d("/docs/learn/xcm/journey-fees","193"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-holding",component:d("/docs/learn/xcm/journey-holding","b29"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-locks",component:d("/docs/learn/xcm/journey-locks","f3a"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-origin",component:d("/docs/learn/xcm/journey-origin","a4d"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-queries",component:d("/docs/learn/xcm/journey-queries","670"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-register",component:d("/docs/learn/xcm/journey-register","0fe"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-summary",component:d("/docs/learn/xcm/journey-summary","6a3"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-transact",component:d("/docs/learn/xcm/journey-transact","eae"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey-version",component:d("/docs/learn/xcm/journey-version","d38"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey/transfers",component:d("/docs/learn/xcm/journey/transfers","d74"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey/transfers-reserve",component:d("/docs/learn/xcm/journey/transfers-reserve","4a6"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey/transfers-summary",component:d("/docs/learn/xcm/journey/transfers-summary","2e8"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/journey/transfers-teleport",component:d("/docs/learn/xcm/journey/transfers-teleport","2a8"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview",component:d("/docs/learn/xcm/overview","376"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview-architecture",component:d("/docs/learn/xcm/overview-architecture","7ac"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview-format",component:d("/docs/learn/xcm/overview-format","bef"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview-intro",component:d("/docs/learn/xcm/overview-intro","32c"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview-summary",component:d("/docs/learn/xcm/overview-summary","daf"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/overview-xcvm",component:d("/docs/learn/xcm/overview-xcvm","238"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/quickstart",component:d("/docs/learn/xcm/quickstart","9db"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/quickstart-first-look",component:d("/docs/learn/xcm/quickstart-first-look","b8c"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/quickstart-simulator",component:d("/docs/learn/xcm/quickstart-simulator","de9"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/quickstart-summary",component:d("/docs/learn/xcm/quickstart-summary","30b"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/reference-glossary",component:d("/docs/learn/xcm/reference-glossary","aa6"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/reference-xcvm-registers",component:d("/docs/learn/xcm/reference-xcvm-registers","043"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/references",component:d("/docs/learn/xcm/references","61c"),exact:!0,sidebar:"docs"},{path:"/docs/learn/xcm/testing",component:d("/docs/learn/xcm/testing","81b"),exact:!0,sidebar:"docs"},{path:"/docs/ledger",component:d("/docs/ledger","593"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-archive",component:d("/docs/maintain-archive","17f"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-bootnode",component:d("/docs/maintain-bootnode","9a2"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-collator-index",component:d("/docs/maintain-collator-index","058"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-endpoints",component:d("/docs/maintain-endpoints","3c9"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-errors",component:d("/docs/maintain-errors","57a"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-async-backing",component:d("/docs/maintain-guides-async-backing","e3a"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-chill",component:d("/docs/maintain-guides-how-to-chill","9be"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-monitor-your-node",component:d("/docs/maintain-guides-how-to-monitor-your-node","c4b"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-stop-validating",component:d("/docs/maintain-guides-how-to-stop-validating","67e"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-systemd",component:d("/docs/maintain-guides-how-to-systemd","1ad"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-upgrade",component:d("/docs/maintain-guides-how-to-upgrade","8d9"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-validate-kusama",component:d("/docs/maintain-guides-how-to-validate-kusama","ea3"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-how-to-validate-polkadot",component:d("/docs/maintain-guides-how-to-validate-polkadot","56f"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-secure-validator",component:d("/docs/maintain-guides-secure-validator","5d5"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-society-kusama",component:d("/docs/maintain-guides-society-kusama","059"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-validator-community",component:d("/docs/maintain-guides-validator-community","699"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-guides-validator-payout",component:d("/docs/maintain-guides-validator-payout","7df"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-index",component:d("/docs/maintain-index","c57"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-networks",component:d("/docs/maintain-networks","5dc"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-node-index",component:d("/docs/maintain-node-index","e80"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-polkadot-parameters",component:d("/docs/maintain-polkadot-parameters","38b"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-rpc",component:d("/docs/maintain-rpc","887"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-sync",component:d("/docs/maintain-sync","c37"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-validator-index",component:d("/docs/maintain-validator-index","069"),exact:!0,sidebar:"docs"},{path:"/docs/maintain-wss",component:d("/docs/maintain-wss","207"),exact:!0,sidebar:"docs"},{path:"/docs/maintain/maintain-guides-democracy",component:d("/docs/maintain/maintain-guides-democracy","9f8"),exact:!0,sidebar:"docs"},{path:"/docs/maintain/maintain-guides-how-to-join-council",component:d("/docs/maintain/maintain-guides-how-to-join-council","e5f"),exact:!0,sidebar:"docs"},{path:"/docs/maintain/maintain-guides-how-to-vote-councillor",component:d("/docs/maintain/maintain-guides-how-to-vote-councillor","cc7"),exact:!0,sidebar:"docs"},{path:"/docs/metadata",component:d("/docs/metadata","096"),exact:!0,sidebar:"docs"},{path:"/docs/multisig-apps",component:d("/docs/multisig-apps","593"),exact:!0,sidebar:"docs"},{path:"/docs/parachains-apps",component:d("/docs/parachains-apps","cda"),exact:!0,sidebar:"docs"},{path:"/docs/parity-data-dashboards",component:d("/docs/parity-data-dashboards","11c"),exact:!0,sidebar:"docs"},{path:"/docs/polkadot-community-foundation",component:d("/docs/polkadot-community-foundation","0d6"),exact:!0,sidebar:"docs"},{path:"/docs/polkadot-direction",component:d("/docs/polkadot-direction","9a3"),exact:!0,sidebar:"docs"},{path:"/docs/polkadot-v1",component:d("/docs/polkadot-v1","a68"),exact:!0,sidebar:"docs"},{path:"/docs/polkadot-vault",component:d("/docs/polkadot-vault","e33"),exact:!0,sidebar:"docs"},{path:"/docs/polkadot-vision-index",component:d("/docs/polkadot-vision-index","641"),exact:!0,sidebar:"docs"},{path:"/docs/polkadotjs",component:d("/docs/polkadotjs","fd4"),exact:!0,sidebar:"docs"},{path:"/docs/polkadotjs-ui",component:d("/docs/polkadotjs-ui","369"),exact:!0,sidebar:"docs"},{path:"/docs/programs-index",component:d("/docs/programs-index","292"),exact:!0,sidebar:"docs"},{path:"/docs/staking-apps",component:d("/docs/staking-apps","481"),exact:!0,sidebar:"docs"},{path:"/docs/staking-dashboard",component:d("/docs/staking-dashboard","d6b"),exact:!0,sidebar:"docs"},{path:"/docs/start-building",component:d("/docs/start-building","501"),exact:!0,sidebar:"docs"},{path:"/docs/stay-safe-index",component:d("/docs/stay-safe-index","e19"),exact:!0,sidebar:"docs"},{path:"/docs/thousand-contributors",component:d("/docs/thousand-contributors","b6c"),exact:!0,sidebar:"docs"},{path:"/docs/thousand-validators",component:d("/docs/thousand-validators","500"),exact:!0,sidebar:"docs"},{path:"/docs/transaction-attacks",component:d("/docs/transaction-attacks","5b0"),exact:!0,sidebar:"docs"},{path:"/docs/wallets-and-extensions",component:d("/docs/wallets-and-extensions","8ad"),exact:!0,sidebar:"docs"},{path:"/docs/wallets-index",component:d("/docs/wallets-index","d70"),exact:!0,sidebar:"docs"},{path:"/docs/web3-and-polkadot",component:d("/docs/web3-and-polkadot","c3a"),exact:!0,sidebar:"docs"}]}]}]},{path:"/",component:d("/","2e1"),exact:!0},{path:"*",component:d("*")}]},31513:(e,t,n)=>{"use strict";n.d(t,{zR:()=>x,TM:()=>j,yJ:()=>f,sC:()=>A,AO:()=>p});var r=n(58168);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;p--){var f=i[p];"."===f?o(i,p):".."===f?(o(i,p),d++):d&&(o(i,p),d--)}if(!l)for(;d--;d)i.unshift("..");!l||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var s=n(11561);function c(e){return"/"===e.charAt(0)?e:"/"+e}function l(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function f(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.A)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=f(e,t,h(),x.location);u.confirmTransitionTo(a,r,n,(function(e){e&&(x.entries[x.index]=a,d({action:r,location:a}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=x.index+e;return t>=0&&t{"use strict";var r=n(44363),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?i:s[e.$$typeof]||a}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=f(n);a&&a!==m&&e(t,a,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=c(t),h=c(n),b=0;b{"use strict";e.exports=function(e,t,n,r,a,o,i,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,a,o,i,s],u=0;(c=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},10119:(e,t,n)=>{"use strict";n.r(t)},74100:(e,t,n)=>{"use strict";n.r(t)},35697:(e,t,n)=>{"use strict";n.r(t)},95728:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),l=o.querySelector(r.barSelector),u=r.speed,d=r.easing;return o.offsetWidth,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),c(l,i(e,u,d)),1===e?(c(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){c(o,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),s=e?"-100":o(n.status||0),l=document.querySelector(r.parent);return c(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&f(a),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),c=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function l(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=p(e),r=n+t;l(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);l(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},19700:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,s=i.length;-1!==n.code.indexOf(a=t(r,s));)++s;return i[s]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(s){for(var c=0;c=o.length);c++){var l=s[c];if("string"==typeof l||l.content&&"string"==typeof l.content){var u=o[a],d=n.tokenStack[u],p="string"==typeof l?l:l.content,f=t(r,u),m=p.indexOf(f);if(m>-1){++a;var h=p.substring(0,m),b=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),g=p.substring(m+f.length),y=[];h&&y.push.apply(y,i([h])),y.push(b),g&&y.push.apply(y,i([g])),"string"==typeof l?s.splice.apply(s,[c,1].concat(y)):l.content=y}}else l.content&&i(l.content)}return s}(n.tokens)}}}})}(Prism)},75342:()=>{!function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)t=t.replace(//g,(function(){return t}));t=t.replace(//g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)},91830:(e,t,n)=>{var r={"./prism-rust":75342};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=91830},2694:(e,t,n)=>{"use strict";var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},61105:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(46942),a=n.n(r),o=n(96540),i=n(36519),s=n(74848);const c=o.forwardRef(((e,t)=>{const[{className:n,...r},{as:o="div",bsPrefix:c,spans:l}]=function({as:e,bsPrefix:t,className:n,...r}){t=(0,i.oU)(t,"col");const o=(0,i.gy)(),s=(0,i.Jm)(),c=[],l=[];return o.forEach((e=>{const n=r[e];let a,o,i;delete r[e],"object"==typeof n&&null!=n?({span:a,offset:o,order:i}=n):a=n;const u=e!==s?`-${e}`:"";a&&c.push(!0===a?`${t}${u}`:`${t}${u}-${a}`),null!=i&&l.push(`order${u}-${i}`),null!=o&&l.push(`offset${u}-${o}`)})),[{...r,className:a()(n,...c,...l)},{as:e,bsPrefix:t,spans:c}]}(e);return(0,s.jsx)(o,{...r,ref:t,className:a()(n,!l.length&&c)})}));c.displayName="Col";const l=c},43048:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(46942),a=n.n(r),o=n(96540),i=n(36519),s=n(74848);const c=o.forwardRef((({bsPrefix:e,fluid:t=!1,as:n="div",className:r,...o},c)=>{const l=(0,i.oU)(e,"container"),u="string"==typeof t?`-${t}`:"-fluid";return(0,s.jsx)(n,{ref:c,...o,className:a()(r,t?`${l}${u}`:l)})}));c.displayName="Container";const l=c},44479:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(46942),a=n.n(r),o=n(96540),i=n(36519),s=n(74848);const c=o.forwardRef((({bsPrefix:e,className:t,as:n="div",...r},o)=>{const c=(0,i.oU)(e,"row"),l=(0,i.gy)(),u=(0,i.Jm)(),d=`${c}-cols`,p=[];return l.forEach((e=>{const t=r[e];let n;delete r[e],null!=t&&"object"==typeof t?({cols:n}=t):n=t;const a=e!==u?`-${e}`:"";null!=n&&p.push(`${d}${a}-${n}`)})),(0,s.jsx)(n,{ref:o,...r,className:a()(t,c,...p)})}));c.displayName="Row";const l=c},36519:(e,t,n)=>{"use strict";n.d(t,{Jm:()=>u,gy:()=>l,oU:()=>c});var r=n(96540);n(74848);const a=["xxl","xl","lg","md","sm","xs"],o=r.createContext({prefixes:{},breakpoints:a,minBreakpoint:"xs"}),{Consumer:i,Provider:s}=o;function c(e,t){const{prefixes:n}=(0,r.useContext)(o);return e||n[t]||t}function l(){const{breakpoints:e}=(0,r.useContext)(o);return e}function u(){const{minBreakpoint:e}=(0,r.useContext)(o);return e}},22551:(e,t,n)=>{"use strict";var r=n(96540),a=n(69982);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n