diff --git a/Cargo.lock b/Cargo.lock index 35a878403..d95655c2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -94,7 +94,6 @@ dependencies = [ "acala-primitives", "evm-rpc", "jsonrpc-core", - "module-staking-pool-rpc", "orml-oracle-rpc", "pallet-transaction-payment-rpc", "parity-scale-codec", @@ -144,21 +143,15 @@ dependencies = [ "module-evm-bridge", "module-evm-manager", "module-evm-rpc-runtime-api", - "module-homa", "module-homa-lite", - "module-homa-validator-list", "module-honzon", "module-idle-scheduler", "module-incentives", "module-loans", "module-nft", - "module-nominees-election", - "module-polkadot-bridge", "module-prices", "module-relaychain", "module-session-manager", - "module-staking-pool", - "module-staking-pool-rpc-runtime-api", "module-support", "module-transaction-pause", "module-transaction-payment", @@ -254,7 +247,6 @@ dependencies = [ "module-evm-rpc-runtime-api", "module-nft", "module-staking-pool", - "module-staking-pool-rpc", "node-executor", "orml-oracle-rpc", "pallet-transaction-payment-rpc-runtime-api", @@ -3901,21 +3893,15 @@ dependencies = [ "module-evm-bridge", "module-evm-manager", "module-evm-rpc-runtime-api", - "module-homa", "module-homa-lite", - "module-homa-validator-list", "module-honzon", "module-idle-scheduler", "module-incentives", "module-loans", "module-nft", - "module-nominees-election", - "module-polkadot-bridge", "module-prices", "module-relaychain", "module-session-manager", - "module-staking-pool", - "module-staking-pool-rpc-runtime-api", "module-support", "module-transaction-pause", "module-transaction-payment", @@ -5821,22 +5807,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "module-staking-pool-rpc" -version = "2.0.0" -dependencies = [ - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "module-staking-pool-rpc-runtime-api", - "module-support", - "parity-scale-codec", - "serde", - "sp-api", - "sp-blockchain", - "sp-runtime", -] - [[package]] name = "module-staking-pool-rpc-runtime-api" version = "2.0.0" @@ -5892,7 +5862,6 @@ dependencies = [ "frame-system", "module-currencies", "module-dex", - "module-staking-pool", "module-support", "orml-tokens", "orml-traits", @@ -9891,20 +9860,14 @@ dependencies = [ "module-evm-bridge", "module-evm-manager", "module-evm-rpc-runtime-api", - "module-homa", "module-homa-lite", - "module-homa-validator-list", "module-honzon", "module-incentives", "module-loans", "module-nft", - "module-nominees-election", - "module-polkadot-bridge", "module-prices", "module-relaychain", "module-session-manager", - "module-staking-pool", - "module-staking-pool-rpc-runtime-api", "module-support", "module-transaction-payment", "orml-auction", diff --git a/modules/transaction-payment/Cargo.toml b/modules/transaction-payment/Cargo.toml index b2f74b593..3b57e9fa9 100644 --- a/modules/transaction-payment/Cargo.toml +++ b/modules/transaction-payment/Cargo.toml @@ -23,7 +23,6 @@ orml-traits = { path = "../../orml/traits", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } orml-tokens = { path = "../../orml/tokens" } -module-staking-pool = { path = "../staking-pool" } module-currencies = { path = "../../modules/currencies" } module-dex = { path = "../dex" } smallvec = "1.4.1" diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index c8b47d49d..f636d4774 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -71,7 +71,6 @@ ecosystem-renvm-bridge = { path = "../../ecosystem-modules/ren/renvm-bridge" } module-collator-selection = { path = "../../modules/collator-selection" } module-evm = { path = "../../modules/evm" } module-staking-pool = { path = "../../modules/staking-pool" } -module-staking-pool-rpc = { path = "../../modules/staking-pool/rpc" } module-nft = { path = "../../modules/nft" } orml-oracle-rpc = { path = "../../orml/oracle/rpc" } acala-primitives = { path = "../../primitives" } diff --git a/node/service/src/client.rs b/node/service/src/client.rs index 65deb1875..f72a17fa9 100644 --- a/node/service/src/client.rs +++ b/node/service/src/client.rs @@ -40,7 +40,6 @@ pub trait RuntimeApiCollection: + frame_system_rpc_runtime_api::AccountNonceApi + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi + orml_oracle_rpc::OracleRuntimeApi - + module_staking_pool_rpc::StakingPoolRuntimeApi + module_evm_rpc_runtime_api::EVMRuntimeRPCApi + sp_api::Metadata + sp_offchain::OffchainWorkerApi @@ -59,7 +58,6 @@ where + frame_system_rpc_runtime_api::AccountNonceApi + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi + orml_oracle_rpc::OracleRuntimeApi - + module_staking_pool_rpc::StakingPoolRuntimeApi + module_evm_rpc_runtime_api::EVMRuntimeRPCApi + sp_api::Metadata + sp_offchain::OffchainWorkerApi diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 2286744cc..1bf0b79dd 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -19,7 +19,6 @@ sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkad substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.12" } -module-staking-pool-rpc = { path = "../modules/staking-pool/rpc" } orml-oracle-rpc = { path = "../orml/oracle/rpc" } runtime-common = { path = "../runtime/common" } evm-rpc = { path = "../modules/evm/rpc" } diff --git a/rpc/src/lib.rs b/rpc/src/lib.rs index d78acb8de..960e17074 100644 --- a/rpc/src/lib.rs +++ b/rpc/src/lib.rs @@ -67,12 +67,10 @@ where C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, C::Api: orml_oracle_rpc::OracleRuntimeApi, - C::Api: module_staking_pool_rpc::StakingPoolRuntimeApi, C::Api: EVMRuntimeRPCApi, C::Api: BlockBuilder, P: TransactionPool + Sync + Send + 'static, { - use module_staking_pool_rpc::{StakingPool, StakingPoolApi}; use orml_oracle_rpc::{Oracle, OracleApi}; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi}; use substrate_frame_rpc_system::{FullSystem, SystemApi}; @@ -96,7 +94,6 @@ where // more context: https://github.com/paritytech/substrate/pull/3480 // These RPCs should use an asynchronous caller instead. io.extend_with(OracleApi::to_delegate(Oracle::new(client.clone()))); - io.extend_with(StakingPoolApi::to_delegate(StakingPool::new(client.clone()))); io.extend_with(EVMApiServer::to_delegate(EVMApi::new(client, deny_unsafe))); io diff --git a/runtime/acala/Cargo.toml b/runtime/acala/Cargo.toml index e16908c66..33b152a95 100644 --- a/runtime/acala/Cargo.toml +++ b/runtime/acala/Cargo.toml @@ -104,14 +104,8 @@ module-nft = { path = "../../modules/nft", default-features = false } module-prices = { path = "../../modules/prices", default-features = false } module-incentives = { path = "../../modules/incentives", default-features = false } module-support = { path = "../../modules/support", default-features = false } -module-homa = { path = "../../modules/homa", default-features = false } module-homa-lite = { path = "../../modules/homa-lite", default-features = false } -module-homa-validator-list = { path = "../../modules/homa-validator-list", default-features = false } -module-nominees-election = { path = "../../modules/nominees-election", default-features = false } module-session-manager = { path = "../../modules/session-manager", default-features = false } -module-staking-pool = { path = "../../modules/staking-pool", default-features = false } -module-staking-pool-rpc-runtime-api = { path = "../../modules/staking-pool/rpc/runtime-api", default-features = false } -module-polkadot-bridge = { path = "../../modules/polkadot-bridge", default-features = false } module-relaychain = { path = "../../modules/relaychain", default-features = false, features = ["polkadot"] } module-idle-scheduler = { path = "../../modules/idle-scheduler", default-features = false } primitives = { package = "acala-primitives", path = "../../primitives", default-features = false } @@ -227,13 +221,8 @@ std = [ "module-prices/std", "module-incentives/std", "module-support/std", - "module-homa/std", "module-homa-lite/std", - "module-nominees-election/std", "module-session-manager/std", - "module-staking-pool/std", - "module-staking-pool-rpc-runtime-api/std", - "module-polkadot-bridge/std", "module-relaychain/std", "module-idle-scheduler/std", "primitives/std", @@ -329,10 +318,6 @@ try-runtime = [ "module-nft/try-runtime", "module-prices/try-runtime", "module-incentives/try-runtime", - "module-homa/try-runtime", "module-homa-lite/try-runtime", - "module-nominees-election/try-runtime", "module-session-manager/try-runtime", - "module-staking-pool/try-runtime", - "module-polkadot-bridge/try-runtime", ] diff --git a/runtime/acala/src/lib.rs b/runtime/acala/src/lib.rs index 1d380fa17..42e24ab2b 100644 --- a/runtime/acala/src/lib.rs +++ b/runtime/acala/src/lib.rs @@ -41,7 +41,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ AccountIdConversion, AccountIdLookup, BadOrigin, BlakeTwo256, Block as BlockT, Convert, SaturatedConversion, - StaticLookup, Zero, + StaticLookup, }, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, DispatchResult, FixedPointNumber, Perbill, Percent, Permill, Perquintill, @@ -107,16 +107,16 @@ pub use primitives::{ DataProviderId, EraIndex, Hash, Moment, Nonce, ReserveIdentifier, Share, Signature, TokenSymbol, TradingPair, }; pub use runtime_common::{ - cent, dollar, microcent, millicent, CurveFeeModel, EnsureRootOrAllGeneralCouncil, - EnsureRootOrAllTechnicalCommittee, EnsureRootOrHalfFinancialCouncil, EnsureRootOrHalfGeneralCouncil, - EnsureRootOrHalfHomaCouncil, EnsureRootOrOneGeneralCouncil, EnsureRootOrOneThirdsTechnicalCommittee, - EnsureRootOrThreeFourthsGeneralCouncil, EnsureRootOrTwoThirdsGeneralCouncil, - EnsureRootOrTwoThirdsTechnicalCommittee, ExchangeRate, FinancialCouncilInstance, - FinancialCouncilMembershipInstance, GasToWeight, GeneralCouncilInstance, GeneralCouncilMembershipInstance, - HomaCouncilInstance, HomaCouncilMembershipInstance, OffchainSolutionWeightLimit, OperatorMembershipInstanceAcala, - OperatorMembershipInstanceBand, Price, ProxyType, Rate, Ratio, RelayChainBlockNumberProvider, - RelayChainSubAccountId, RuntimeBlockLength, RuntimeBlockWeights, SystemContractsFilter, TechnicalCommitteeInstance, - TechnicalCommitteeMembershipInstance, TimeStampedPrice, ACA, AUSD, DOT, LDOT, RENBTC, + cent, dollar, microcent, millicent, EnsureRootOrAllGeneralCouncil, EnsureRootOrAllTechnicalCommittee, + EnsureRootOrHalfFinancialCouncil, EnsureRootOrHalfGeneralCouncil, EnsureRootOrHalfHomaCouncil, + EnsureRootOrOneGeneralCouncil, EnsureRootOrOneThirdsTechnicalCommittee, EnsureRootOrThreeFourthsGeneralCouncil, + EnsureRootOrTwoThirdsGeneralCouncil, EnsureRootOrTwoThirdsTechnicalCommittee, ExchangeRate, + FinancialCouncilInstance, FinancialCouncilMembershipInstance, GasToWeight, GeneralCouncilInstance, + GeneralCouncilMembershipInstance, HomaCouncilInstance, HomaCouncilMembershipInstance, OffchainSolutionWeightLimit, + OperatorMembershipInstanceAcala, OperatorMembershipInstanceBand, Price, ProxyType, Rate, Ratio, + RelayChainBlockNumberProvider, RelayChainSubAccountId, RuntimeBlockLength, RuntimeBlockWeights, + SystemContractsFilter, TechnicalCommitteeInstance, TechnicalCommitteeMembershipInstance, TimeStampedPrice, ACA, + AUSD, DOT, LDOT, RENBTC, }; mod authority; @@ -1970,22 +1970,6 @@ impl_runtime_apis! { } } - impl module_staking_pool_rpc_runtime_api::StakingPoolApi< - Block, - AccountId, - Balance, - > for Runtime { - fn get_available_unbonded(_account: AccountId) -> module_staking_pool_rpc_runtime_api::BalanceInfo { - module_staking_pool_rpc_runtime_api::BalanceInfo { - amount: Zero::zero() - } - } - - fn get_liquid_staking_exchange_rate() -> ExchangeRate { - ExchangeRate::zero() - } - } - impl module_evm_rpc_runtime_api::EVMRuntimeRPCApi for Runtime { fn call( from: H160, diff --git a/runtime/acala/src/weights/mod.rs b/runtime/acala/src/weights/mod.rs index 742622adc..b6b2840c5 100644 --- a/runtime/acala/src/weights/mod.rs +++ b/runtime/acala/src/weights/mod.rs @@ -28,12 +28,10 @@ pub mod module_dex; pub mod module_emergency_shutdown; pub mod module_evm; pub mod module_evm_accounts; -pub mod module_homa; pub mod module_homa_lite; pub mod module_honzon; pub mod module_incentives; pub mod module_nft; -pub mod module_nominees_election; pub mod module_prices; pub mod module_session_manager; pub mod module_transaction_pause; diff --git a/runtime/acala/src/weights/module_homa.rs b/runtime/acala/src/weights/module_homa.rs deleted file mode 100644 index 8830e9f24..000000000 --- a/runtime/acala/src/weights/module_homa.rs +++ /dev/null @@ -1,74 +0,0 @@ -// This file is part of Acala. - -// Copyright (C) 2020-2021 Acala Foundation. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -//! Autogenerated weights for module_homa -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-04-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: -//! `[]` EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: -//! Some("karura-latest"), DB CACHE: 128 - -// Executed Command: -// target/release/acala -// benchmark -// --chain=karura-latest -// --steps=50 -// --repeat=20 -// --pallet=* -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --heap-pages=4096 -// --header=./HEADER-GPL3 -// --output=./runtime/karura/src/weights/ - -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for module_homa. -pub struct WeightInfo(PhantomData); -impl module_homa::WeightInfo for WeightInfo { - fn mint() -> Weight { - (213_363_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) - } - fn redeem_immediately() -> Weight { - (217_492_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - fn redeem_wait_for_unbonding() -> Weight { - (102_515_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - fn redeem_by_claim_unbonding() -> Weight { - (167_810_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - fn withdraw_redemption() -> Weight { - (123_406_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } -} diff --git a/runtime/acala/src/weights/module_nominees_election.rs b/runtime/acala/src/weights/module_nominees_election.rs deleted file mode 100644 index 38b78feca..000000000 --- a/runtime/acala/src/weights/module_nominees_election.rs +++ /dev/null @@ -1,92 +0,0 @@ -// This file is part of Acala. - -// Copyright (C) 2020-2021 Acala Foundation. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -//! Autogenerated weights for module_nominees_election -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-28, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Native), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 - -// Executed Command: -// target/release/acala -// benchmark -// --chain=dev -// --steps=50 -// --repeat=20 -// --pallet=module_nominees_election -// --extrinsic=* -// --execution=native -// --wasm-execution=compiled -// --heap-pages=4096 -// --template=./templates/runtime-weight-template.hbs -// --output=./runtime/mandala/src/weights/ - - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for module_nominees_election. -pub struct WeightInfo(PhantomData); -impl module_nominees_election::WeightInfo for WeightInfo { - fn bond() -> Weight { - (17_949_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn unbond() -> Weight { - (16_380_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn rebond(c: u32, ) -> Weight { - (23_506_000 as Weight) - // Standard Error: 13_000 - .saturating_add((33_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn withdraw_unbonded(c: u32, ) -> Weight { - (14_912_000 as Weight) - // Standard Error: 9_000 - .saturating_add((55_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn nominate(c: u32, ) -> Weight { - (6_322_000 as Weight) - // Standard Error: 6_000 - .saturating_add((2_467_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) - } - fn chill(c: u32, ) -> Weight { - (5_685_000 as Weight) - // Standard Error: 12_000 - .saturating_add((3_870_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) - } -} diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index e0d159684..a05512202 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -104,14 +104,8 @@ module-nft = { path = "../../modules/nft" } module-prices = { path = "../../modules/prices" } module-incentives = { path = "../../modules/incentives" } module-support = { path = "../../modules/support" } -module-homa = { path = "../../modules/homa" } module-homa-lite = { path = "../../modules/homa-lite" } -module-homa-validator-list = { path = "../../modules/homa-validator-list" } -module-nominees-election = { path = "../../modules/nominees-election" } module-session-manager = { path = "../../modules/session-manager" } -module-staking-pool = { path = "../../modules/staking-pool" } -module-staking-pool-rpc-runtime-api = { path = "../../modules/staking-pool/rpc/runtime-api" } -module-polkadot-bridge = { path = "../../modules/polkadot-bridge" } module-relaychain = {path = "../../modules/relaychain" } primitives = { package = "acala-primitives", path = "../../primitives" } runtime-common = { path = "../common" } diff --git a/runtime/karura/Cargo.toml b/runtime/karura/Cargo.toml index 0bdb6eb36..b013d109b 100644 --- a/runtime/karura/Cargo.toml +++ b/runtime/karura/Cargo.toml @@ -104,14 +104,8 @@ module-nft = { path = "../../modules/nft", default-features = false } module-prices = { path = "../../modules/prices", default-features = false } module-incentives = { path = "../../modules/incentives", default-features = false } module-support = { path = "../../modules/support", default-features = false } -module-homa = { path = "../../modules/homa", default-features = false } module-homa-lite = { path = "../../modules/homa-lite", default-features = false } -module-homa-validator-list = { path = "../../modules/homa-validator-list", default-features = false } -module-nominees-election = { path = "../../modules/nominees-election", default-features = false } module-session-manager = { path = "../../modules/session-manager", default-features = false } -module-staking-pool = { path = "../../modules/staking-pool", default-features = false } -module-staking-pool-rpc-runtime-api = { path = "../../modules/staking-pool/rpc/runtime-api", default-features = false } -module-polkadot-bridge = { path = "../../modules/polkadot-bridge", default-features = false } module-relaychain = { path = "../../modules/relaychain", default-features = false, features = ["kusama"] } module-idle-scheduler = { path = "../../modules/idle-scheduler", default-features = false } primitives = { package = "acala-primitives", path = "../../primitives", default-features = false } @@ -227,13 +221,8 @@ std = [ "module-prices/std", "module-incentives/std", "module-support/std", - "module-homa/std", "module-homa-lite/std", - "module-nominees-election/std", "module-session-manager/std", - "module-staking-pool/std", - "module-staking-pool-rpc-runtime-api/std", - "module-polkadot-bridge/std", "module-relaychain/std", "module-idle-scheduler/std", "primitives/std", @@ -329,10 +318,6 @@ try-runtime = [ "module-nft/try-runtime", "module-prices/try-runtime", "module-incentives/try-runtime", - "module-homa/try-runtime", "module-homa-lite/try-runtime", - "module-nominees-election/try-runtime", "module-session-manager/try-runtime", - "module-staking-pool/try-runtime", - "module-polkadot-bridge/try-runtime", ] diff --git a/runtime/karura/src/lib.rs b/runtime/karura/src/lib.rs index 4b434f464..aeb2d6ed6 100644 --- a/runtime/karura/src/lib.rs +++ b/runtime/karura/src/lib.rs @@ -41,7 +41,7 @@ use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ AccountIdConversion, AccountIdLookup, BadOrigin, BlakeTwo256, Block as BlockT, Convert, SaturatedConversion, - StaticLookup, Zero, + StaticLookup, }, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, DispatchResult, FixedPointNumber, Perbill, Percent, Permill, Perquintill, @@ -109,16 +109,16 @@ pub use primitives::{ DataProviderId, EraIndex, Hash, Moment, Nonce, ReserveIdentifier, Share, Signature, TokenSymbol, TradingPair, }; pub use runtime_common::{ - cent, dollar, microcent, millicent, CurveFeeModel, EnsureRootOrAllGeneralCouncil, - EnsureRootOrAllTechnicalCommittee, EnsureRootOrHalfFinancialCouncil, EnsureRootOrHalfGeneralCouncil, - EnsureRootOrHalfHomaCouncil, EnsureRootOrOneGeneralCouncil, EnsureRootOrOneThirdsTechnicalCommittee, - EnsureRootOrThreeFourthsGeneralCouncil, EnsureRootOrTwoThirdsGeneralCouncil, - EnsureRootOrTwoThirdsTechnicalCommittee, ExchangeRate, FinancialCouncilInstance, - FinancialCouncilMembershipInstance, GasToWeight, GeneralCouncilInstance, GeneralCouncilMembershipInstance, - HomaCouncilInstance, HomaCouncilMembershipInstance, OperatorMembershipInstanceAcala, - OperatorMembershipInstanceBand, Price, ProxyType, Rate, Ratio, RelayChainBlockNumberProvider, - RelayChainSubAccountId, RuntimeBlockLength, RuntimeBlockWeights, SystemContractsFilter, TechnicalCommitteeInstance, - TechnicalCommitteeMembershipInstance, TimeStampedPrice, BNC, KAR, KSM, KUSD, LKSM, RENBTC, VSKSM, + cent, dollar, microcent, millicent, EnsureRootOrAllGeneralCouncil, EnsureRootOrAllTechnicalCommittee, + EnsureRootOrHalfFinancialCouncil, EnsureRootOrHalfGeneralCouncil, EnsureRootOrHalfHomaCouncil, + EnsureRootOrOneGeneralCouncil, EnsureRootOrOneThirdsTechnicalCommittee, EnsureRootOrThreeFourthsGeneralCouncil, + EnsureRootOrTwoThirdsGeneralCouncil, EnsureRootOrTwoThirdsTechnicalCommittee, ExchangeRate, + FinancialCouncilInstance, FinancialCouncilMembershipInstance, GasToWeight, GeneralCouncilInstance, + GeneralCouncilMembershipInstance, HomaCouncilInstance, HomaCouncilMembershipInstance, + OperatorMembershipInstanceAcala, OperatorMembershipInstanceBand, Price, ProxyType, Rate, Ratio, + RelayChainBlockNumberProvider, RelayChainSubAccountId, RuntimeBlockLength, RuntimeBlockWeights, + SystemContractsFilter, TechnicalCommitteeInstance, TechnicalCommitteeMembershipInstance, TimeStampedPrice, BNC, + KAR, KSM, KUSD, LKSM, RENBTC, VSKSM, }; mod authority; @@ -2032,22 +2032,6 @@ impl_runtime_apis! { } } - impl module_staking_pool_rpc_runtime_api::StakingPoolApi< - Block, - AccountId, - Balance, - > for Runtime { - fn get_available_unbonded(_account: AccountId) -> module_staking_pool_rpc_runtime_api::BalanceInfo { - module_staking_pool_rpc_runtime_api::BalanceInfo { - amount: Zero::zero() - } - } - - fn get_liquid_staking_exchange_rate() -> ExchangeRate { - ExchangeRate::zero() - } - } - impl module_evm_rpc_runtime_api::EVMRuntimeRPCApi for Runtime { fn call( from: H160, diff --git a/runtime/karura/src/weights/mod.rs b/runtime/karura/src/weights/mod.rs index 742622adc..b6b2840c5 100644 --- a/runtime/karura/src/weights/mod.rs +++ b/runtime/karura/src/weights/mod.rs @@ -28,12 +28,10 @@ pub mod module_dex; pub mod module_emergency_shutdown; pub mod module_evm; pub mod module_evm_accounts; -pub mod module_homa; pub mod module_homa_lite; pub mod module_honzon; pub mod module_incentives; pub mod module_nft; -pub mod module_nominees_election; pub mod module_prices; pub mod module_session_manager; pub mod module_transaction_pause; diff --git a/runtime/karura/src/weights/module_homa.rs b/runtime/karura/src/weights/module_homa.rs deleted file mode 100644 index 8830e9f24..000000000 --- a/runtime/karura/src/weights/module_homa.rs +++ /dev/null @@ -1,74 +0,0 @@ -// This file is part of Acala. - -// Copyright (C) 2020-2021 Acala Foundation. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -//! Autogenerated weights for module_homa -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-04-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: -//! `[]` EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: -//! Some("karura-latest"), DB CACHE: 128 - -// Executed Command: -// target/release/acala -// benchmark -// --chain=karura-latest -// --steps=50 -// --repeat=20 -// --pallet=* -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --heap-pages=4096 -// --header=./HEADER-GPL3 -// --output=./runtime/karura/src/weights/ - -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for module_homa. -pub struct WeightInfo(PhantomData); -impl module_homa::WeightInfo for WeightInfo { - fn mint() -> Weight { - (213_363_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) - } - fn redeem_immediately() -> Weight { - (217_492_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - fn redeem_wait_for_unbonding() -> Weight { - (102_515_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - fn redeem_by_claim_unbonding() -> Weight { - (167_810_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) - } - fn withdraw_redemption() -> Weight { - (123_406_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } -} diff --git a/runtime/karura/src/weights/module_nominees_election.rs b/runtime/karura/src/weights/module_nominees_election.rs deleted file mode 100644 index 38b78feca..000000000 --- a/runtime/karura/src/weights/module_nominees_election.rs +++ /dev/null @@ -1,92 +0,0 @@ -// This file is part of Acala. - -// Copyright (C) 2020-2021 Acala Foundation. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -//! Autogenerated weights for module_nominees_election -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-06-28, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Native), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 - -// Executed Command: -// target/release/acala -// benchmark -// --chain=dev -// --steps=50 -// --repeat=20 -// --pallet=module_nominees_election -// --extrinsic=* -// --execution=native -// --wasm-execution=compiled -// --heap-pages=4096 -// --template=./templates/runtime-weight-template.hbs -// --output=./runtime/mandala/src/weights/ - - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for module_nominees_election. -pub struct WeightInfo(PhantomData); -impl module_nominees_election::WeightInfo for WeightInfo { - fn bond() -> Weight { - (17_949_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn unbond() -> Weight { - (16_380_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn rebond(c: u32, ) -> Weight { - (23_506_000 as Weight) - // Standard Error: 13_000 - .saturating_add((33_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn withdraw_unbonded(c: u32, ) -> Weight { - (14_912_000 as Weight) - // Standard Error: 9_000 - .saturating_add((55_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - fn nominate(c: u32, ) -> Weight { - (6_322_000 as Weight) - // Standard Error: 6_000 - .saturating_add((2_467_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) - } - fn chill(c: u32, ) -> Weight { - (5_685_000 as Weight) - // Standard Error: 12_000 - .saturating_add((3_870_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) - } -}