git.delta.rocks / unique-network / refs/commits / 8a59560bc28e

difftreelog

Merge pull request #572 from UniqueNetwork/doc/sponsoring-flow

Yaroslav Bolyukin2022-09-13parents: #d236895 #0982b02.patch.diff
in: master
Add description of the sponsoring flow

2 files changed

addeddoc/sponsoring-flow.drawio.svgdiffbeforeafterboth

no changes

addeddoc/sponsoring.mddiffbeforeafterboth
--- /dev/null
+++ b/doc/sponsoring.md
@@ -0,0 +1,13 @@
+# Sponsoring
+
+![Sponsoring flow](./sponsoring-flow.drawio.svg)
+
+## Implementation
+
+If you need to add sponsoring for pallet call, you should implement `SponsorshipHandler<AccountId, Call, ()>`, see `UniqueSponsorshipHandler` for example.
+
+If you need to add sponsoring for EVM contract call, you should implement `SponsorshipHandler<CrossAccountId, (H160, Vec<u8>), CallContext>`, see `UniqueEthSponsorshipHandler` for example.
+
+## EVM bridging
+
+In case if Ethereum call is being called using substrate `evm.call` extrinsic, `BridgeSponsorshipHandler` is used to convert between two different `SponsorshipHandler` types