mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 10:31:04 +00:00
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:
+11
-2
@@ -196,11 +196,20 @@ impl<T: System + Balances + 'static> Rpc<T> {
|
||||
{
|
||||
let mut storage_key = twox_128(b"System").to_vec();
|
||||
storage_key.extend(twox_128(b"Events").to_vec());
|
||||
log::debug!("Events storage key {:?}", storage_key);
|
||||
log::debug!("Events storage key {:?}", hex::encode(&storage_key));
|
||||
|
||||
let closure: MapClosure<StorageChangeSet<<T as System>::Hash>> =
|
||||
Box::new(|event| {
|
||||
log::info!("Event {:?}", event);
|
||||
log::debug!(
|
||||
"Event {:?}",
|
||||
event
|
||||
.changes
|
||||
.iter()
|
||||
.map(|(k, v)| {
|
||||
(hex::encode(&k.0), v.as_ref().map(|v| hex::encode(&v.0)))
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
);
|
||||
event
|
||||
});
|
||||
self.state
|
||||
|
||||
Reference in New Issue
Block a user