Force create a pure proxy account
Pure proxy accounts can not be replicated across different chains (as of writing this document). This is a problem for people who may created a proxy on the relay chain, but got tokens transferred on a parachain. These people can not access the pure proxy, because it is not allowed for users to control the input data used to create the pure proxy. The only solution right now is to create some root referendum that force creates the pure proxy account on the parachain. There is also not dispatchable available for this and it requires some manual build set_storage
.
On the relay chain the proxy 12RP5AAF8TEb4qVBgiAgJXMVF8NzYZZPD8XftcKD7sM153E7
has the following data associated (Proxies
storage item):
[
[
{
delegate: 16Cf2SMFkWMApL7fiaiu3nSFiVk3wZoNHn7QTzTL1KvLDMcT,
proxyType: Any,
delay: 0
}
]
200,410,000,000
]
This data needs to be put onto the parachain to have the proxy accessible. The storage key on the relay chain for the account is 0x1809d78346727a0ef58c0fa03bafa3231d885dcfb277f185f2d8e62a5f290c85b8eb348ef415147e3ed46c4f3489ddd332eef9da8c350e6e46ed3f4860bd1b6eae99e5eff3218ac1
. This could be different on the parachain, if the pallet uses a different name in the runtime. Polkadot-JS displays the storage key as "encoded storage key" in the chain state UI.
Before we can set the proxy data on the parachain, the data needs to be changed a little bit. We need to change the deposit from 200,410,000,000
to 0
. As the deposit wasn't reserved on the parachain, there is nothing that needs to be unreserved when releasing the proxy on the parachain. This could also be solved by reserving the deposit on the parachain, but that would just make the "migration" of the proxy account more complicated.
The SCALE encoded proxy data:
0x04e610de98fd517f137bacce132c9cd3c3669afa0ec10a5fc83f9b09f0389fc784000000000000000000000000000000000000000000
The storage key and the SCALE encoded proxy data together need to be put into a set_storage
call:
0x00040421011809d78346727a0ef58c0fa03bafa3231d885dcfb277f185f2d8e62a5f290c85b8eb348ef415147e3ed46c4f3489ddd332eef9da8c350e6e46ed3f4860bd1b6eae99e5eff3218ac1d804e610de98fd517f137bacce132c9cd3c3669afa0ec10a5fc83f9b09f0389fc784000000000000000000000000000000000000000000
On the relay chain we need to register the following preimage:
This preimage needs to be put into a root referendum as it requires root rights on the parachain.