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

consider emitting system function signatures #1708

Closed
holic opened this issue Oct 5, 2023 · 1 comment
Closed

consider emitting system function signatures #1708

holic opened this issue Oct 5, 2023 · 1 comment

Comments

@holic
Copy link
Member

holic commented Oct 5, 2023

right now we just emit world function signatures (useful to generate world ABI), but would be nice to emit system function signatures

my use case right now is #1611, going from config to onchain and back

  • from config, I can get systems and register their function signatures and the registration methods handle prefixing them for me (turning them from system function signature to world function signature)
  • from onchain, I can get systems and their world function signatures, but not the underlying system function signatures (just selector) to recreate a "system config"

to solve for this and have a common "system" definition (whether derived from onchain state or derived from config + system contracts), my TS code has to duplicate contract logic and either add the world prefix (local system contracts -> world function signatures) or remove the world prefix (onchain world function signatures -> system definition)

our FunctionSignatures table is offchain only and is just a mapping between selector -> signature, so we could just add an extra emission there when registerFunctionSelector is called (currently have one for world signature, need one for system signature)

@holic
Copy link
Member Author

holic commented Jul 17, 2024

done in #2392
dupe of #2382

@holic holic closed this as completed Jul 17, 2024
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