Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add proxy pallet #286

Merged
merged 16 commits into from
Apr 16, 2024
Merged

Add proxy pallet #286

merged 16 commits into from
Apr 16, 2024

Conversation

camfairchild
Copy link
Contributor

Integrates the proxy pallet

[Needs testing]

TODO

  • Add tests for each ProxyType filter
    • Can't do transactions not in filter
  • Verify works on UI
  • Verify fee and deposit

@unconst unconst changed the base branch from main to development March 27, 2024 17:04
@vstam1
Copy link

vstam1 commented Apr 8, 2024

What is the progress on this? How soon can we get the proxy pallet merged?

@vstam1
Copy link

vstam1 commented Apr 10, 2024

@camfairchild Would love to see this feature merged, as it would allow us to work with cold wallets that can stake/unstake funds using a hot wallet. As it is a standard polkadot-sdk pallet that is included in many chains, it should be relatively easy to merge, right? 🙏

@open-junius
Copy link
Contributor

The PR is ready for review. I think the proxy types defined is flexible enough for token related, sub tensor staking and other operations. like to know more comments what's kind of type is needed from business logic

Copy link
Contributor

@distributedstatemachine distributedstatemachine left a comment

Choose a reason for hiding this comment

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

Left some comments . Is there a way to add tests to this ?

@@ -473,9 +481,9 @@ impl pallet_sudo::Config for Runtime {

parameter_types! {
// One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes.
pub const DepositBase: Balance = (1) as Balance * 2_000 * 10_000 + (88 as Balance) * 100 * 10_000;
pub const DepositBase: Balance = deposit(1, 88);
Copy link
Contributor

Choose a reason for hiding this comment

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

Where does this figure come from ? The calculation doesnt seem to match the comments

Copy link
Contributor

Choose a reason for hiding this comment

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

From multisig pallet, I get the code as follows. the comments from substrate upstream. I will check if we should change it.
/// This is held for an additional storage item whose value size is
/// 4 + sizeof((BlockNumber, Balance, AccountId)) bytes and whose key size is
/// 32 + sizeof(AccountId) bytes.
#[pallet::constant]
type DepositBase: Get<BalanceOf>;

ProxyType::NonFungibile => !matches!(
c,
RuntimeCall::Balances(..)
| RuntimeCall::SubtensorModule(pallet_subtensor::Call::add_stake { .. })
Copy link
Contributor

Choose a reason for hiding this comment

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

Note to self: Rebase stao off development so we can capture this

Copy link
Contributor

Choose a reason for hiding this comment

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

After rebase, the NonFungibile excludes all extrinsic related to balance in Subtensor pallet.

Copy link
Contributor

Choose a reason for hiding this comment

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

ha.. this was a note for me !

Copy link
Contributor

Choose a reason for hiding this comment

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

pls add stao extrinsic in filter

@open-junius
Copy link
Contributor

open-junius commented Apr 16, 2024

Left some comments . Is there a way to add tests to this ?

It is tricky to test the runtime, we can skip it for now since the pallet from upstream

@open-junius open-junius merged commit 1f320bc into development Apr 16, 2024
6 checks passed
@sam0x17 sam0x17 deleted the add-proxy-pallet branch April 16, 2024 13:14
@JuanCortez93
Copy link

Hello Guys! Thank you very much for taking care of this. I´m glad to know you are testing this proxy pallet :)

Do you have an estimation of the time it can take to push this to production?

@open-junius open-junius added the testnet-pass PR was successfully tested on testnet label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testnet-pass PR was successfully tested on testnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants