This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kratico
force-pushed
the
feat/fluent-multisig
branch
from
December 23, 2022 19:53
895e8b8
to
c696ed7
Compare
kratico
force-pushed
the
feat/fluent-multisig
branch
from
December 26, 2022 13:25
c696ed7
to
4ff0125
Compare
kratico
force-pushed
the
feat/fluent-multisig
branch
from
December 26, 2022 18:47
da1dbc0
to
20e46bd
Compare
kratico
commented
Dec 26, 2022
Comment on lines
+170
to
+187
function $call< | ||
Client extends Z.$<rpc.Client> = Z.$<rpc.Client>, | ||
>(client: Client) { | ||
const metadata_ = metadata(client)() | ||
const deriveCodec_ = scale.deriveCodec(metadata_) | ||
return scale.$call(deriveCodec_, metadata_) | ||
} | ||
|
||
export function callHash< | ||
Client extends Z.$<rpc.Client> = Z.$<rpc.Client>, | ||
Call extends Z.$<unknown> = Z.$<unknown>, | ||
>(client: Client) { | ||
return (call: Call) => { | ||
return Z.ls($call(client), call).next(([codec, call]) => { | ||
return Blake2_256.hash(codec.encode(call)) | ||
}) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harrysolovay I'm not sure about the best location for these $call
and callHash
kratico
force-pushed
the
feat/fluent-multisig
branch
from
December 28, 2022 13:07
20e46bd
to
1920333
Compare
Co-authored-by: Harry Solovay <[email protected]> Co-authored-by: T6 <[email protected]>
harrysolovay
approved these changes
Dec 30, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
fluent.Multisig
withratify
, to create or approve proposals for executionvote
, to vote proposals without proposal executioncancel
, to cancel an existing proposalisProposed
, to check if if the given call hash has been proposedproposals
, to list outstanding proposalsIt also adds the following utils
u8a.isEqual
to compareUint8Array
callHash
effect to compute the Blake256 hash for the given scale encoded call