mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 05:21:03 +00:00
Contracts: use compiled rust tests (#2347)
see #2189 This PR does the following: - Bring the user api functions into a new pallet-contracts-uapi (They are currently defined in ink! [here])(https://github.com/paritytech/ink/blob/master/crates/env/src/engine/on_chain/ext.rs) - Add older api versions and unstable to the user api trait. - Remove pallet-contracts-primitives and bring the types it defined in uapi / pallet-contracts - Add the infrastructure to build fixtures from Rust files and test it works by replacing `dummy.wat` and `call.wat` - Move all the doc from wasm/runtime.rs to pallet-contracts-uapi. This will be done in a follow up: - convert the rest of the test from .wat to rust - bring risc-v uapi up to date with wasm - finalize the uapi host fns, making sure everything is codegen from the source host fns in pallet-contracts --------- Co-authored-by: Alexander Theißen <alex.theissen@me.com>
This commit is contained in:
@@ -30,9 +30,10 @@ use crate::{
|
||||
},
|
||||
exec::{Frame, Key},
|
||||
migration::codegen::LATEST_MIGRATION_VERSION,
|
||||
primitives::CodeUploadReturnValue,
|
||||
storage::DeletionQueueManager,
|
||||
tests::test_utils::{get_contract, get_contract_checked},
|
||||
wasm::{Determinism, ReturnCode as RuntimeReturnCode},
|
||||
wasm::{Determinism, ReturnErrorCode as RuntimeReturnCode},
|
||||
weights::WeightInfo,
|
||||
BalanceOf, Code, CodeHash, CodeInfoOf, CollectEvents, Config, ContractInfo, ContractInfoOf,
|
||||
DebugInfo, DefaultAddressGenerator, DeletionQueueCounter, Error, HoldReason,
|
||||
@@ -55,7 +56,6 @@ use frame_support::{
|
||||
};
|
||||
use frame_system::{EventRecord, Phase};
|
||||
use pallet_contracts_fixtures::compile_module;
|
||||
use pallet_contracts_primitives::CodeUploadReturnValue;
|
||||
use pretty_assertions::{assert_eq, assert_ne};
|
||||
use sp_core::ByteArray;
|
||||
use sp_io::hashing::blake2_256;
|
||||
|
||||
Reference in New Issue
Block a user