Fix contracts instantiation (#51)

* Move contracts tests to contracts module

* Add test for instantiating a contract

* Fix InstantiateArgs encoding

* Ignore PhantomData primitives, they are 0

* Increase endowment and log code hash

* Update SystemEvent

* Fix codec import

* Oops

* Write buffer directly to output to avoid encoding vec

* Debug with StorageChanges encoded as hex

* Logging and format code
This commit is contained in:
Andrew Jones
2019-12-17 09:39:56 +00:00
committed by GitHub
parent f1926f55cf
commit daa1415297
6 changed files with 159 additions and 58 deletions
+4 -2
View File
@@ -169,11 +169,13 @@ pub fn set_code(code: Vec<u8>) -> Call<SetCode> {
Call::new(MODULE, SET_CODE, code)
}
use frame_support::weights::DispatchInfo;
/// Event for the System module.
#[derive(Clone, Debug, codec::Decode)]
pub enum SystemEvent {
/// An extrinsic completed successfully.
ExtrinsicSuccess(frame_support::weights::DispatchInfo),
ExtrinsicSuccess(DispatchInfo),
/// An extrinsic failed.
ExtrinsicFailed(sp_runtime::DispatchError),
ExtrinsicFailed(sp_runtime::DispatchError, DispatchInfo),
}