mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 15:51:12 +00:00
Add more documentation for the TargetAccount variant. (#625)
This commit is contained in:
committed by
Bastian Köcher
parent
3f7107da10
commit
de3037853b
@@ -66,6 +66,16 @@ pub enum CallOrigin<SourceChainAccountId, TargetChainAccountPublic, TargetChainS
|
||||
/// The account can be identified by `TargetChainAccountPublic`. The proof that the
|
||||
/// `SourceChainAccountId` controls `TargetChainAccountPublic` is the `TargetChainSignature`
|
||||
/// over `(Call, SourceChainAccountId).encode()`.
|
||||
///
|
||||
/// NOTE sending messages using this origin (or any other) does not have replay protection!
|
||||
/// The assumption is that both the source account and the target account is controlled by
|
||||
/// the same entity, so source-chain replay protection is sufficient.
|
||||
/// As a consequence, it's extremely important for the target chain user to never produce
|
||||
/// a signature with their target-private key on something that could be sent over the bridge,
|
||||
/// i.e. if the target user signs `(<some-source-account-id>, Call::Transfer(X, 5))`
|
||||
/// The owner of `some-source-account-id` can send that message multiple times, which would
|
||||
/// result with multiple transfer calls being dispatched on the target chain.
|
||||
/// So please, NEVER USE YOUR PRIVATE KEY TO SIGN SOMETHING YOU DON'T FULLY UNDERSTAND!
|
||||
TargetAccount(SourceChainAccountId, TargetChainAccountPublic, TargetChainSignature),
|
||||
|
||||
/// Call is sent by the `SourceChainAccountId` on the source chain. On the target chain it is
|
||||
|
||||
Reference in New Issue
Block a user