-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Contracts: Refactor test builder (#4158)
- Moved `substrate/frame/contracts/src/tests/builder.rs` into a pub test_utils module, so we can use that in the `pallet-contracts-mock-network` tests - Refactor xcm tests to use XCM builders, and simplify the use case for xcm-send
- Loading branch information
Showing
7 changed files
with
346 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// This file is part of Substrate. | ||
|
||
// Copyright (C) Parity Technologies (UK) Ltd. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
//! Shared utilities for testing contracts. | ||
//! This is not part of the tests module because it is made public for other crates to use. | ||
#![cfg(feature = "std")] | ||
use frame_support::weights::Weight; | ||
pub use sp_runtime::AccountId32; | ||
|
||
pub const ALICE: AccountId32 = AccountId32::new([1u8; 32]); | ||
pub const BOB: AccountId32 = AccountId32::new([2u8; 32]); | ||
pub const CHARLIE: AccountId32 = AccountId32::new([3u8; 32]); | ||
pub const DJANGO: AccountId32 = AccountId32::new([4u8; 32]); | ||
|
||
pub const GAS_LIMIT: Weight = Weight::from_parts(100_000_000_000, 3 * 1024 * 1024); | ||
pub mod builder; |
Oops, something went wrong.