Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preset calls with metadata #17

Open
arrudagates opened this issue Mar 21, 2023 · 0 comments
Open

Preset calls with metadata #17

arrudagates opened this issue Mar 21, 2023 · 0 comments

Comments

@arrudagates
Copy link
Member

arrudagates commented Mar 21, 2023

Saturn allows for custom metadata that can be used for the call being made to carry it's context and intentions with it to be interpreted and used in custom renders that replace the traditional call data json/yaml renders.

We should have preset calls that come with metadata already in it and we should have a metadata matcher to interpret metadata from retrieved multisig calls.

Things like function:metadata:

batchMemberManagement:"Sat:BMM"
setParameters:"Sat:SP"
callXcm:"Sat:CX"
balanceTransfer:"Sat:BT"
xcmBalanceTransfer:"Sat:XBT"

And then the matcher could take the entire multisig call data and transform it into an enum like so:

enum {
batchMemberManagement { members: {adding: bool, who: account, amount: number}[] },
setParameters { metadata: string, frozenTokens: bool, minimumSupport: perbill, requiredApproval: perbill },
callXcm { destination: string, call: string, weight: number },
balanceTransfer { to: account, amount: number },
xcmBalanceTransfer { asset: { chain: string, token: string }, to: account, amount: number }
}

This basically allows for extremely easy Saturn integration with the ability to create custom rendering for these predefined calls, and also gives developers the base to implement their own predefined functions with custom metadata and matchers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant