Remove the treasury module as it is no longer being used.
Motivation
The tax rate is 0 as of [proposal 172](https://station.terra.money/proposal/172) and the tax logic is no longer used in the protocol. Tax income during usage was negligible, and there is no need for future usage of this tax. Pruning unnecessary logic will keep the Terra core lean and easier to navigate.
Tech Spec
Modules:
Treasury module: deprecate
Market module: migrate logic
Overview
Deprecate tax logic. Remove seigniorage and burn logic from Treasury. New logic will be made in the Market module.
Method
Remove all treasury implementation.
Add store upgrade logic to delete all module state.
Implement legacy querier interface for wasm contracts.
Code
Store Upgrade Logic:
// NewTerraApp returns a reference to an initialized TerraApp.
func NewTerraApp(...){
...
if upgradeInfo.Name == upgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
storeUpgrades := store.StoreUpgrades{
Deleted: []string{legacytreasury.ModuleName},
}
// configure store loader that checks if version == upgradeHeight and applies store upgrades
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
}
...
}
For backward compatibility for wasm contracts, treasury queriers will remain and return default values. This information can only be accessed by the wasm contracts:
TIP #: 47
Author: TFL Network: v0.6.x Date:
Summary
Remove the treasury module as it is no longer being used.
Motivation
The tax rate is
0
as of [proposal 172](https://station.terra.money/proposal/172) and the tax logic is no longer used in the protocol. Tax income during usage was negligible, and there is no need for future usage of this tax. Pruning unnecessary logic will keep the Terra core lean and easier to navigate.Tech Spec
Modules:
Overview
Deprecate tax logic. Remove seigniorage and burn logic from Treasury. New logic will be made in the Market module.
Method
Code
Store Upgrade Logic:
Implement legacy querier for stargate query:
Implement legacy querier for wasm query binding:
Considerations
For backward compatibility for wasm contracts, treasury queriers will remain and return default values. This information can only be accessed by the wasm contracts:
Timeline
NA
Test cases
TestLegacyQuerier_TreasuryQueryBinding
ensures the ability to query treasury state via query binding:TestLegacyQuerier_StargateQuery
ensures the ability to query treasury state via Stargate query: