Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Now?
  • Loading branch information
pmikolajczyk41 committed Jul 4, 2023
commit 08c19379d61b44e94dd08f36f09e0ffa86f6dcc0
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl-serde = { version = "0.4.0", default-features = false }
itertools = { version = "0.11", default-features = false }
jsonrpsee = { version = "0.18.0" }
num-traits = { version = "0.2", default-features = false }
parity-scale-codec = { version = "3.4", default-features = false }
scale = { package = "parity-scale-codec", version = "3.4", default-features = false }
paste = { version = "1.0" }
pretty_assertions = { version = "1" }
proc-macro2 = { version = "1" }
Expand Down
2 changes: 1 addition & 1 deletion crates/e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ readme = "README.md"
funty = { workspace = true }
impl-serde = { workspace = true }
jsonrpsee = { workspace = true, features = ["ws-client"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
scale = { workspace = true, features = ["derive"] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
subxt = { workspace = true }
Expand Down
1 change: 0 additions & 1 deletion crates/e2e/src/builders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use crate::scale;
use ink_env::{
call::{
utils::{
Expand Down
1 change: 0 additions & 1 deletion crates/e2e/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ use std::{
path::PathBuf,
};

use crate::scale;
use subxt::{
blocks::ExtrinsicEvents,
config::ExtrinsicParams,
Expand Down
2 changes: 0 additions & 2 deletions crates/e2e/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ use std::{
};
use xts::ContractsApi;

use parity_scale_codec as scale;

pub use subxt::PolkadotConfig;

/// Signer that is used throughout the E2E testing.
Expand Down
2 changes: 1 addition & 1 deletion crates/e2e/src/xts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use super::{
ContractInstantiateResult,
Signer,
};
use crate::scale;

use ink_env::Environment;

use core::marker::PhantomData;
Expand Down
4 changes: 2 additions & 2 deletions crates/engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ readme = "README.md"

[dependencies]
derive_more = { workspace = true, features = ["from", "display"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
scale = { workspace = true, features = ["derive"] }
sha2 = { workspace = true }
sha3 = { workspace = true }
blake2 = { workspace = true }
Expand All @@ -30,6 +30,6 @@ secp256k1 = { workspace = true, features = ["recovery", "global-context"], optio
[features]
default = ["std"]
std = [
"parity-scale-codec/std",
"scale/std",
"secp256k1"
]
2 changes: 1 addition & 1 deletion crates/engine/src/chain_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

use super::Error;
use crate::scale;

use derive_more::From;
use std::collections::{
hash_map::Entry,
Expand Down
5 changes: 1 addition & 4 deletions crates/engine/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use crate::{
scale,
types::Balance,
};
use crate::types::Balance;
use scale::KeyedVec;
use std::collections::HashMap;

Expand Down
1 change: 0 additions & 1 deletion crates/engine/src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use crate::{
chain_extension::ChainExtensionHandler,
database::Database,
exec_context::ExecContext,
scale,
test_api::{
DebugInfo,
EmittedEvent,
Expand Down
1 change: 0 additions & 1 deletion crates/engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ pub use chain_extension::ChainExtension;
pub use types::AccountError;

use derive_more::From;
use parity_scale_codec as scale;

/// Errors which can happen when interacting with this crate.
#[derive(Debug, From, PartialEq, Eq)]
Expand Down
9 changes: 3 additions & 6 deletions crates/engine/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use crate::{
ext::{
Engine,
Error,
},
scale,
use crate::ext::{
Engine,
Error,
};
use secp256k1::{
ecdsa::RecoverableSignature,
Expand Down
1 change: 0 additions & 1 deletion crates/engine/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
//! Right now the `engine` crate can only be used with the `ink_env::DefaultEnvironment`.
//! This is a known limitation that we want to address in the future.

use crate::scale;
use derive_more::From;

/// Same type as the `DefaultEnvironment::BlockNumber` type.
Expand Down
4 changes: 2 additions & 2 deletions crates/env/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ arrayref = { workspace = true }
cfg-if = { workspace = true }
derive_more = { workspace = true, features = ["from", "display"] }
num-traits = { workspace = true, features = ["i128"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
scale = { workspace = true, features = ["derive"] }
paste = { workspace = true }
static_assertions = { workspace = true }

Expand Down Expand Up @@ -63,7 +63,7 @@ std = [
"ink_primitives/std",
"ink_storage_traits/std",
"ink_engine/std",
"parity-scale-codec/std",
"scale/std",
"scale-decode",
"scale-encode",
"scale-info/std",
Expand Down
1 change: 0 additions & 1 deletion crates/env/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ use crate::{
CryptoHash,
HashOutput,
},
scale,
topics::Topics,
types::Gas,
Environment,
Expand Down
1 change: 0 additions & 1 deletion crates/env/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use crate::{
CryptoHash,
HashOutput,
},
scale,
topics::Topics,
Environment,
Result,
Expand Down
1 change: 0 additions & 1 deletion crates/env/src/call/call_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use crate::{
},
ExecutionInput,
},
scale,
types::Gas,
Environment,
Error,
Expand Down
1 change: 0 additions & 1 deletion crates/env/src/call/create_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ use crate::{
ExecutionInput,
Selector,
},
scale,
ContractEnv,
Environment,
Error,
Expand Down
5 changes: 1 addition & 4 deletions crates/env/src/call/execution_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use crate::{
call::Selector,
scale,
};
use crate::call::Selector;

/// The input data for a smart contract execution.
#[derive(Clone, Default, Debug)]
Expand Down
1 change: 0 additions & 1 deletion crates/env/src/call/selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use crate::scale;
use derive_more::From;

/// The function selector.
Expand Down
1 change: 0 additions & 1 deletion crates/env/src/chain_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use crate::{
EnvInstance,
OnInstance,
},
scale,
};
use core::marker::PhantomData;

Expand Down
1 change: 0 additions & 1 deletion crates/env/src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use crate::{
ConstructorReturnType,
FromAccountId,
},
scale,
Error as EnvError,
Error,
Result as EnvResult,
Expand Down
5 changes: 1 addition & 4 deletions crates/env/src/engine/off_chain/call_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use crate::{
call::Selector,
scale,
};
use crate::call::Selector;
use ink_prelude::{
vec,
vec::Vec,
Expand Down
1 change: 0 additions & 1 deletion crates/env/src/engine/off_chain/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ use crate::{
Keccak256,
Sha2x256,
},
scale,
topics::{
Topics,
TopicsBuilderBackend,
Expand Down
1 change: 0 additions & 1 deletion crates/env/src/engine/off_chain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ pub use call_data::CallData;
use super::OnInstance;
use crate::Error;

use crate::scale;
use derive_more::From;
use ink_engine::ext::Engine;

Expand Down
2 changes: 1 addition & 1 deletion crates/env/src/engine/off_chain/test_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use ink_engine::test_api::RecordedDebugMessages;
use std::panic::UnwindSafe;

pub use super::call_data::CallData;
use crate::scale;

pub use ink_engine::ChainExtension;

/// Record for an emitted event.
Expand Down
1 change: 0 additions & 1 deletion crates/env/src/engine/off_chain/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

use crate::{
engine::off_chain::impls::TopicsBuilder,
scale,
topics::TopicsBuilderBackend,
Result,
};
Expand Down
2 changes: 0 additions & 2 deletions crates/env/src/engine/on_chain/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use crate::scale;

/// A static buffer with 16 kB of capacity.
pub struct StaticBuffer {
/// The static buffer with a total capacity of 16 kB.
Expand Down
1 change: 0 additions & 1 deletion crates/env/src/engine/on_chain/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
//!
//! Refer to substrate FRAME contract module for more documentation.

use crate::scale;
use core::marker::PhantomData;
use scale::Encode;

Expand Down
5 changes: 1 addition & 4 deletions crates/env/src/engine/on_chain/ext/riscv32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ use super::{
Result,
ReturnCode,
};
use crate::{
scale,
ReturnFlags,
};
use crate::ReturnFlags;
use scale::Encode;

// TODO: Remove the constant and use the real func ids.
Expand Down
1 change: 0 additions & 1 deletion crates/env/src/engine/on_chain/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ use crate::{
Keccak256,
Sha2x256,
},
scale,
topics::{
Topics,
TopicsBuilderBackend,
Expand Down
1 change: 0 additions & 1 deletion crates/env/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use derive_more::From;

#[cfg(any(feature = "std", test, doc))]
use crate::engine::off_chain::OffChainError;
use crate::scale;

/// Errors that can be encountered upon environmental interaction.
#[derive(Debug, From, PartialEq, Eq)]
Expand Down
1 change: 0 additions & 1 deletion crates/env/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ pub use self::{
},
};
use ink_primitives::Clear;
use parity_scale_codec as scale;

cfg_if::cfg_if! {
if #[cfg(any(feature = "ink-debug", feature = "std"))] {
Expand Down
5 changes: 1 addition & 4 deletions crates/env/src/topics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@

//! This module contains the implementation for the event topic logic.

use crate::{
scale,
Environment,
};
use crate::Environment;

/// The concrete implementation that is guided by the topics builder.
///
Expand Down
2 changes: 1 addition & 1 deletion crates/env/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
//! the trait bounds on the `Environment` trait types.

use super::arithmetic::AtLeast32BitUnsigned;
use crate::scale;

use ink_primitives::{
AccountId,
Clear,
Expand Down
4 changes: 2 additions & 2 deletions crates/ink/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rust-version = "1.63"

[dependencies]
derive_more = { workspace = true, features = ["from"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
scale = { workspace = true, features = ["derive"] }

ink_env = { workspace = true }
ink_storage = { workspace = true }
Expand All @@ -44,7 +44,7 @@ std = [
"ink_env/std",
"ink_storage/std",
"ink_macro/std",
"parity-scale-codec/std",
"scale/std",
]
# Enable contract debug messages via `debug_print!` and `debug_println!`.
ink-debug = [
Expand Down
2 changes: 1 addition & 1 deletion crates/ink/codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ either = { workspace = true }
heck = { workspace = true }
impl-serde = { workspace = true, default-features = true }
itertools = { workspace = true }
parity-scale-codec = { workspace = true, features = ["derive"] }
scale = { workspace = true, features = ["derive"] }
proc-macro2 = { workspace = true }
quote = { workspace = true }
serde = { workspace = true, features = ["derive"] }
Expand Down
1 change: 0 additions & 1 deletion crates/ink/codegen/src/enforced_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use crate::scale;
use impl_serde::serialize as serde_hex;
use quote::format_ident;

Expand Down
2 changes: 1 addition & 1 deletion crates/ink/codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ use self::{
GenerateCodeUsing,
},
};
use parity_scale_codec as scale;

use proc_macro2::TokenStream as TokenStream2;

/// Types for which code can be generated by this crate.
Expand Down
4 changes: 2 additions & 2 deletions crates/ink/macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]
readme = "README.md"

[dependencies]
parity-scale-codec = { workspace = true, features = ["derive"] }
scale = { workspace = true, features = ["derive"] }
quote = { workspace = true }
proc-macro2 = { workspace = true }
syn = { workspace = true }
Expand All @@ -41,7 +41,7 @@ proc-macro = true
[features]
default = ["std"]
std = [
"parity-scale-codec/std",
"scale/std",
"ink_ir/std",
"ink_primitives/std",
]
Loading