Skip to content

Commit

Permalink
update orml and fix clippy (#2626)
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc authored Oct 3, 2023
1 parent 5fed183 commit 98e4af4
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 151 deletions.
125 changes: 9 additions & 116 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,18 @@ members = [
"orml/gradually-update",
"orml/nft",
"orml/oracle",
"orml/oracle/rpc",
"orml/parameters",
"orml/rewards",
"orml/tokens",
"orml/tokens/rpc",
"orml/tokens/rpc/runtime-api",
"orml/tokens/runtime-api",
"orml/traits",
"orml/unknown-tokens",
"orml/utilities",
"orml/vesting",
"orml/xcm-support",
"orml/xcm",
"orml/xtokens",
"orml/oracle/rpc/runtime-api",
"orml/oracle/runtime-api",

"ecosystem-modules/stable-asset/lib/stable-asset",
"evm-tests/jsontests",
Expand Down Expand Up @@ -94,7 +92,6 @@ hmac = { opt-level = 3 }
httparse = { opt-level = 3 }
integer-sqrt = { opt-level = 3 }
keccak = { opt-level = 3 }
libm = { opt-level = 3 }
librocksdb-sys = { opt-level = 3 }
libsecp256k1 = { opt-level = 3 }
libz-sys = { opt-level = 3 }
Expand Down
2 changes: 0 additions & 2 deletions node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "relea
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0" }

orml-oracle-rpc = { path = "../../orml/oracle/rpc" }
orml-tokens-rpc = { path = "../../orml/tokens/rpc" }
acala-primitives = { path = "../../primitives" }
acala-rpc = { path = "../../rpc" }

Expand Down
7 changes: 1 addition & 6 deletions node/service/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@

//! Acala Client abstractions.

use acala_primitives::{AccountId, Balance, Block, BlockNumber, CurrencyId, DataProviderId, Hash, Header, Nonce};
use runtime_common::TimeStampedPrice;
use acala_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Header, Nonce};
use sc_client_api::{Backend as BackendT, BlockchainEvents, KeysIter, PairsIter};
use sp_api::{CallApiAt, NumberFor, ProvideRuntimeApi};
use sp_blockchain::HeaderBackend;
Expand All @@ -39,8 +38,6 @@ pub trait RuntimeApiCollection:
+ sp_block_builder::BlockBuilder<Block>
+ frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce>
+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
+ orml_oracle_rpc::OracleRuntimeApi<Block, DataProviderId, CurrencyId, TimeStampedPrice>
+ orml_tokens_rpc::TokensRuntimeApi<Block, CurrencyId, Balance>
+ sp_api::Metadata<Block>
+ sp_offchain::OffchainWorkerApi<Block>
+ sp_session::SessionKeys<Block>
Expand All @@ -57,8 +54,6 @@ where
+ sp_block_builder::BlockBuilder<Block>
+ frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce>
+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
+ orml_oracle_rpc::OracleRuntimeApi<Block, DataProviderId, CurrencyId, TimeStampedPrice>
+ orml_tokens_rpc::TokensRuntimeApi<Block, CurrencyId, Balance>
+ sp_api::Metadata<Block>
+ sp_offchain::OffchainWorkerApi<Block>
+ sp_session::SessionKeys<Block>
Expand Down
2 changes: 1 addition & 1 deletion orml
Submodule orml updated 50 files
+4 −6 .github/workflows/coverage.yml
+5 −11 .github/workflows/test.yml
+2 −10 Cargo.dev.toml
+0 −2 Makefile
+1 −7 README.md
+0 −76 bencher/Cargo.toml
+0 −18 bencher/bencher-procedural/Cargo.toml
+0 −18 bencher/bencher-procedural/src/lib.rs
+0 −192 bencher/src/bench_ext.rs
+0 −40 bencher/src/bench_runner.rs
+0 −84 bencher/src/bencher.rs
+0 −64 bencher/src/build_wasm/mod.rs
+0 −297 bencher/src/build_wasm/prerequisites.rs
+0 −593 bencher/src/build_wasm/wasm_project.rs
+0 −39 bencher/src/colorize.rs
+0 −103 bencher/src/handler.rs
+0 −35 bencher/src/lib.rs
+0 −142 bencher/src/macros.rs
+0 −356 bencher/src/tracker.rs
+0 −114 bencher/src/utils.rs
+0 −46 bencher/test/Cargo.toml
+0 −2 bencher/test/benches/foo.rs
+0 −45 bencher/test/src/benches.rs
+0 −89 bencher/test/src/lib.rs
+0 −77 bencher/test/src/mock.rs
+0 −19 bencher/test/src/tests.rs
+0 −51 bencher/test/src/weights.rs
+1 −1 build-script-utils/src/license.rs
+0 −19 oracle/rpc/Cargo.toml
+0 −102 oracle/rpc/src/lib.rs
+2 −2 oracle/runtime-api/Cargo.toml
+0 −0 oracle/runtime-api/src/lib.rs
+1 −1 oracle/src/lib.rs
+0 −22 tokens/rpc/Cargo.toml
+0 −94 tokens/rpc/src/lib.rs
+3 −5 tokens/runtime-api/Cargo.toml
+0 −0 tokens/runtime-api/src/lib.rs
+0 −17 weight-gen/Cargo.toml
+0 −200 weight-gen/src/main.rs
+0 −29 weight-gen/src/template.hbs
+0 −38 weight-meter/Cargo.toml
+0 −13 weight-meter/README.md
+0 −77 weight-meter/src/lib.rs
+0 −40 weight-meter/src/meter_no_std.rs
+0 −44 weight-meter/src/meter_std.rs
+0 −224 weight-meter/src/mock.rs
+0 −60 weight-meter/src/tests.rs
+0 −19 weight-meter/weight-meter-procedural/Cargo.toml
+0 −39 weight-meter/weight-meter-procedural/src/lib.rs
+6 −8 xtokens/src/lib.rs
8 changes: 4 additions & 4 deletions runtime/acala/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ orml-authority = { path = "../../orml/authority", default-features = false }
orml-benchmarking = { path = "../../orml/benchmarking", default-features = false, optional = true }
orml-nft= { path = "../../orml/nft", default-features = false }
orml-oracle = { path = "../../orml/oracle", default-features = false }
orml-oracle-rpc-runtime-api = { path = "../../orml/oracle/rpc/runtime-api", default-features = false }
orml-oracle-runtime-api = { path = "../../orml/oracle/runtime-api", default-features = false }
orml-parameters = { path = "../../orml/parameters", default-features = false }
orml-rewards = { path = "../../orml/rewards", default-features = false }
orml-tokens = { path = "../../orml/tokens", default-features = false }
orml-tokens-rpc-runtime-api = { path = "../../orml/tokens/rpc/runtime-api", default-features = false }
orml-tokens-runtime-api = { path = "../../orml/tokens/runtime-api", default-features = false }
orml-traits = { path = "../../orml/traits", default-features = false }
orml-unknown-tokens = { path = "../../orml/unknown-tokens", default-features = false }
orml-utilities = { path = "../../orml/utilities", default-features = false }
Expand Down Expand Up @@ -211,11 +211,11 @@ std = [
"orml-authority/std",
"orml-benchmarking/std",
"orml-nft/std",
"orml-oracle-rpc-runtime-api/std",
"orml-oracle-runtime-api/std",
"orml-oracle/std",
"orml-parameters/std",
"orml-rewards/std",
"orml-tokens-rpc-runtime-api/std",
"orml-tokens-runtime-api/std",
"orml-tokens/std",
"orml-traits/std",
"orml-unknown-tokens/std",
Expand Down
4 changes: 2 additions & 2 deletions runtime/acala/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2024,7 +2024,7 @@ sp_api::impl_runtime_apis! {
}
}

impl orml_oracle_rpc_runtime_api::OracleApi<
impl orml_oracle_runtime_api::OracleApi<
Block,
DataProviderId,
CurrencyId,
Expand All @@ -2045,7 +2045,7 @@ sp_api::impl_runtime_apis! {
}
}

impl orml_tokens_rpc_runtime_api::TokensApi<
impl orml_tokens_runtime_api::TokensApi<
Block,
CurrencyId,
Balance,
Expand Down
4 changes: 2 additions & 2 deletions runtime/acala/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ impl Convert<MultiLocation, Option<CurrencyId>> for CurrencyIdConvert {

match location {
MultiLocation {
parents,
parents: 1,
interior: X2(Parachain(para_id), GeneralKey { data, length }),
} if parents == 1 => {
} => {
match (para_id, &data[..data.len().min(length as usize)]) {
(id, key) if id == u32::from(ParachainInfo::get()) => {
// Acala
Expand Down
2 changes: 1 addition & 1 deletion runtime/integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ orml-auction = { path = "../../orml/auction" }
orml-authority = { path = "../../orml/authority" }
orml-benchmarking = { path = "../../orml/benchmarking", optional = true }
orml-oracle = { path = "../../orml/oracle" }
orml-oracle-rpc-runtime-api = { path = "../../orml/oracle/rpc/runtime-api" }
orml-oracle-runtime-api = { path = "../../orml/oracle/runtime-api" }
orml-tokens = { path = "../../orml/tokens" }
orml-traits = { path = "../../orml/traits" }
orml-vesting = { path = "../../orml/vesting" }
Expand Down
Loading

0 comments on commit 98e4af4

Please sign in to comment.