Open olanod opened 3 years ago
CC @shawntabrizi @thiolliere
There is no way to write a pallet that support all the possible configurations. Should just use smart contract.
Fair enough, I still think a slightly updated set of very general purpose configurations could be enough but even if that's the case it could be made more convenient if for example there's a variant of add_proxy
that accepts a smart contract codehash and expects the contract to follow a specific interface. On our chain we are not planning to use smart contracts so it would probably better if the handler/filter is a configurable associated type that accepts something like a dispatchable call?
we could add an associated type on proxy::Config
: AdditionalDelay
which would basically hold a function which takes Call
and ProxyDefinition
(or maybe ProxyType
instead) and return a number of block.
in call: proxy_announced
we would then add the additional delay to the proxy delay.
Thus we could define some proxy type, which have some additional delay on specific Call
or the filter itself could return a number of block instead of just a boolean
This issue has been mentioned on Polkadot Forum. There might be relevant details there:
https://forum.polkadot.network/t/proxy-pallet-on-steriods/292/3
This issue has been mentioned on Polkadot Forum. There might be relevant details there:
https://forum.polkadot.network/t/preventing-attacks-on-xcm-reserves/902/3
When adding a proxy account there's a delay parameter that specifies the number of blocks to wait before the transaction is submitted, it would be nice if it would be more granular or dynamic in some way so a user can create a proxy that can for example transfer only a maximum amount of tokens in a given time or if transferring a large amount of resources would have to wait a longer period of time giving the owner of the main account more time to cancel it if it's dangerously suspicious.