Files
pezkuwi-subxt/substrate/frame
Piotr Mikołajczyk d8d90a82a7 Enable mocking contracts (#1331)
# Description
This PR introduces two changes:
- the previous `Tracing` trait has been modified to accept contract
address instead of code hash (seems to be way more convenient)
- a new trait `CallInterceptor` that allows intercepting contract calls;
in particular the default implementation for `()` will just proceed in a
standard way (after compilation optimizations, there will be no
footprint of that); however, implementing type might decide to mock
invocation and return `ExecResult` instead

Note: one might try merging `before_call` and `intercept_call`. However,
IMHO this would be bad, since it would mix two completely different
abstractions - tracing without any effects and actual intervention into
execution process.

This will unblock working on mocking contracts utility in drink and
similar tools (https://github.com/Cardinal-Cryptography/drink/issues/33)

# Checklist

- [x] My PR includes a detailed description as outlined in the
"Description" section above
- [ ] My PR follows the [labeling
requirements](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md#process)
of this project (at minimum one label for `T` required)
- [x] I have made corresponding changes to the documentation (if
applicable)
- [x] I have added tests that prove my fix is effective or that my
feature works (if applicable)
2023-09-29 15:39:13 +02:00
..
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-08-29 13:39:41 +02:00
2023-09-04 12:02:32 +03:00
2023-08-29 13:39:41 +02:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-08-29 13:39:41 +02:00
2023-09-04 12:02:32 +03:00
2023-08-29 13:39:41 +02:00
2023-09-20 21:37:52 +02:00
2023-09-04 12:02:32 +03:00
2023-08-29 13:39:41 +02:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00

FRAME

The FRAME development environment provides modules (called "pallets") and support libraries that you can use, modify, and extend to build the runtime logic to suit the needs of your blockchain.

Documentation

https://docs.substrate.io/reference/frame-pallets/

Issues

https://github.com/orgs/paritytech/projects/40