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

add system signatures to FunctionSignatures #2382

Closed
holic opened this issue Mar 6, 2024 · 4 comments
Closed

add system signatures to FunctionSignatures #2382

holic opened this issue Mar 6, 2024 · 4 comments
Assignees

Comments

@holic
Copy link
Member

holic commented Mar 6, 2024

we have a use case in dev tools for decoding callFrom with a world function selector where we want to ultimately display the system function signature in our "action logs"

it would help to be able to look up these signatures onchain as needed

(related to #2386)

@yonadaaa
Copy link
Contributor

yonadaaa commented Mar 7, 2024

fyi in Sky Strife there is a transaction explorer that displays the function names of call, callFrom and batchCall calls. It uses the world contracts onWrite hook though so it doesn't have to work back from a selector

edit: actually for batch calls it uses the ABI to decode the call

@holic
Copy link
Member Author

holic commented Mar 7, 2024

decided we'll just do "add system signatures" part for now and avoid the cost of onchain table until we have a good use case for it

@holic holic changed the title make FunctionSignatures an onchain table, add system signatures add system signatures to FunctionSignatures Mar 7, 2024
@holic
Copy link
Member Author

holic commented Mar 7, 2024

while we do this, we should also rename functionSelector key to worldFunctionSelector in FunctionSelectors table

so that it's clear that FunctionSelectors table are for world function selectors (and can be used as source of truth for generating world ABI)

while FunctionSignatures is just a generic registry for offchain stuff (translating ~any function selector to signature and back)

@holic holic added this to the MUD v2 stable release milestone Mar 7, 2024
@yonadaaa yonadaaa moved this to In progress in MUD Mar 7, 2024
@yonadaaa yonadaaa moved this from In progress to Done in MUD Mar 7, 2024
@holic
Copy link
Member Author

holic commented Mar 11, 2024

added in #2392 and #2395

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

No branches or pull requests

2 participants