|
55 | 55 | pub mod benchmarking; |
56 | 56 |
|
57 | 57 | pub mod chain_extension; |
58 | | -pub use chain_extension::ExtrinsicId; |
| 58 | +pub use chain_extension::{ExtrinsicId, PolymeshExtension}; |
59 | 59 |
|
60 | 60 | use frame_support::{ |
61 | 61 | decl_error, decl_event, decl_module, decl_storage, |
62 | 62 | dispatch::{ |
63 | 63 | DispatchError, DispatchErrorWithPostInfo, DispatchResult, DispatchResultWithPostInfo, |
64 | 64 | }, |
65 | 65 | ensure, |
66 | | - log::trace, |
67 | 66 | traits::Get, |
68 | 67 | weights::Weight, |
69 | 68 | }; |
@@ -130,7 +129,7 @@ macro_rules! cost { |
130 | 129 |
|
131 | 130 | macro_rules! cost_batched { |
132 | 131 | ($name:ident) => { |
133 | | - cost!($name) / Weight::from(CHAIN_EXTENSION_BATCH_SIZE) |
| 132 | + cost!($name) / u64::from(CHAIN_EXTENSION_BATCH_SIZE) |
134 | 133 | }; |
135 | 134 | } |
136 | 135 |
|
@@ -193,19 +192,19 @@ pub trait WeightInfo { |
193 | 192 | fn hash_twox_64(r: u32) -> Weight { |
194 | 193 | let per_byte = cost_byte_batched!(chain_extension_hash_twox_64_per_kb); |
195 | 194 | cost_batched!(chain_extension_hash_twox_64) |
196 | | - .saturating_add(per_byte.saturating_mul(r as Weight)) |
| 195 | + .saturating_add(per_byte.saturating_mul(r as u64)) |
197 | 196 | } |
198 | 197 |
|
199 | 198 | fn hash_twox_128(r: u32) -> Weight { |
200 | 199 | let per_byte = cost_byte_batched!(chain_extension_hash_twox_128_per_kb); |
201 | 200 | cost_batched!(chain_extension_hash_twox_128) |
202 | | - .saturating_add(per_byte.saturating_mul(r as Weight)) |
| 201 | + .saturating_add(per_byte.saturating_mul(r as u64)) |
203 | 202 | } |
204 | 203 |
|
205 | 204 | fn hash_twox_256(r: u32) -> Weight { |
206 | 205 | let per_byte = cost_byte_batched!(chain_extension_hash_twox_256_per_kb); |
207 | 206 | cost_batched!(chain_extension_hash_twox_256) |
208 | | - .saturating_add(per_byte.saturating_mul(r as Weight)) |
| 207 | + .saturating_add(per_byte.saturating_mul(r as u64)) |
209 | 208 | } |
210 | 209 |
|
211 | 210 | fn call_runtime(in_len: u32) -> Weight { |
@@ -391,7 +390,7 @@ where |
391 | 390 | { |
392 | 391 | /// Instantiates a contract using `code` as the WASM code blob. |
393 | 392 | fn base_update_call_runtime_whitelist( |
394 | | - origin: T::Origin, |
| 393 | + origin: T::RuntimeOrigin, |
395 | 394 | updates: Vec<(ExtrinsicId, bool)>, |
396 | 395 | ) -> DispatchResult { |
397 | 396 | ensure_root(origin)?; |
|
0 commit comments