Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
55 views

In the runtime chain extension, should we be charging weight if we are reading a `StorageMap`?

If we have the storage map DummyStorageMap in pallet-example And we read its value under the key key by calling DummyStorageMap::<T>::get(key) in the runtime chain extension (https://paritytech....
aang114's user avatar
  • 43
3 votes
1 answer
80 views

Charge weight and weight Info in chain-extension

I am writing a chain-extension that is a 1 to 1 map of a pallet. Based on this: [...] charging the appropriate amount of weight. In order to do so benchmarks must be written and the charge_weight ...
P.Ossun's user avatar
  • 1,219
1 vote
2 answers
135 views

How can I increase contract memory in pallet-contracts + chain-extension?

I am exposing some external functions to ink! contracts via a chain-extension in pallet-contracts. I am essentially passing a vector of bytes as a parameter to a contract method and directly ...
Petar Ivanov's user avatar
1 vote
1 answer
113 views

Contract CodeRejected when using chain extension

I've recently upgraded my chain to the latest substrate master, however, I'm unable to deploy contracts that use a chain extension. When I try to use a chain extension, the contract fails to deploy ...
Tony's user avatar
  • 527
5 votes
1 answer
104 views

How to benchmark a chain extension?

I would like to know the recommended way to benchmark a chain extension, and then how to charge the calculated weight. According to this document, we need to write benchmarks.
ExplodingJay's user avatar
4 votes
2 answers
141 views

Correct way to use dynamic sized types in chain extension

I'm writing chain extensions for my pallets and I have a few functions that require dynamic sized types, for example Vec<u8> for metadata and Vec<u64> for a list of asset ids. The way I am ...
Gabe's user avatar
  • 115