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

pallet-treasury cleanup #1416

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Conversation

Dinonard
Copy link
Member

Pull Request Summary

Removes unused calls & types from pallet-treasury.
These calls were incorrectly used in our governance and it's better to remove them (they don't work anyways).

If ever in the future we need these calls, the right action is to delete our fork & use the regular pallet-treasury from the polkadot-sdk.

@Dinonard Dinonard added the runtime This PR/Issue is related to the topic “runtime”. label Jan 23, 2025
@Dinonard Dinonard self-assigned this Jan 23, 2025
Copy link

Code Coverage

Package Line Rate Branch Rate Health
precompiles/sr25519/src 56% 0%
chain-extensions/types/assets/src 0% 0%
pallets/astar-xcm-benchmarks/src/fungible 100% 0%
pallets/dynamic-evm-base-fee/src 84% 0%
precompiles/dapp-staking/src/test 0% 0%
pallets/astar-xcm-benchmarks/src/generic 100% 0%
pallets/dapp-staking/rpc/runtime-api/src 0% 0%
pallets/dapp-staking/src/benchmarking 94% 0%
chain-extensions/types/unified-accounts/src 0% 0%
pallets/dapp-staking/src/test 0% 0%
primitives/src 54% 0%
pallets/ethereum-checked/src 76% 0%
pallets/price-aggregator/src 75% 0%
pallets/xc-asset-config/src 48% 0%
precompiles/dispatch-lockdrop/src 83% 0%
pallets/unified-accounts/src 81% 0%
pallets/vesting-mbm/src 87% 0%
pallets/static-price-provider/src 91% 0%
pallets/dapp-staking/src 79% 0%
precompiles/dapp-staking/src 89% 0%
chain-extensions/unified-accounts/src 0% 0%
primitives/src/xcm 62% 0%
precompiles/assets-erc20/src 78% 0%
pallets/astar-xcm-benchmarks/src 86% 0%
pallets/inflation/src 90% 0%
pallets/collective-proxy/src 94% 0%
precompiles/substrate-ecdsa/src 67% 0%
precompiles/unified-accounts/src 100% 0%
precompiles/xcm/src 69% 0%
pallets/collator-selection/src 87% 0%
chain-extensions/pallet-assets/src 54% 0%
Summary 76% (3484 / 4605) 0% (0 / 0)

Minimum allowed line rate is 50%

@grbIzl
Copy link
Contributor

grbIzl commented Jan 24, 2025

Sorry. I didn't get it. From the code it looks like you removed all API methods from the pallet (please correct me if I'm wrong). Is anything left? What's the purpose of leftovers? Can we just drop the whole pallet?

@Dinonard
Copy link
Member Author

Sorry. I didn't get it. From the code it looks like you removed all API methods from the pallet (please correct me if I'm wrong). Is anything left? What's the purpose of leftovers? Can we just drop the whole pallet?

I've removed the calls that are part of new treasury API, which we don't use.
Not everything has been deleted, the only 3 extrinsics we use have been kept.

We cannot drop the whole pallet, it's part of the governance system.

@grbIzl
Copy link
Contributor

grbIzl commented Jan 27, 2025

@Dinonard Sorry I misjudged. I was looking into fully removed interface section from readme and a lot of removed code. So I didn't notice that some methods are left indeed.

Copy link
Contributor

@grbIzl grbIzl left a comment

Choose a reason for hiding this comment

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

LGTM

@Dinonard
Copy link
Member Author

@Dinonard Sorry I misjudged. I was looking into fully removed interface section from readme and a lot of removed code. So I didn't notice that some methods are left indeed.

Thought I replied to this, but it seems it got lost somewhere.

All good! I was also surprised when going over the docs, but I guess they either never had docs for the old API, or removed it when they declared it as deprecated.

Copy link
Contributor

@ipapandinas ipapandinas left a comment

Choose a reason for hiding this comment

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

LGTM

vendor/treasury/Cargo.toml Show resolved Hide resolved
@Dinonard Dinonard merged commit d078b43 into master Jan 30, 2025
9 checks passed
@Dinonard Dinonard deleted the feat/remove-unsupported-treasury-calls branch January 30, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
runtime This PR/Issue is related to the topic “runtime”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants