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

Remove type alias for Action + Auth + Output Registry #1547

Merged
merged 8 commits into from
Oct 9, 2024
Merged

Conversation

joshua-kim
Copy link
Contributor

Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
ActionRegistry() chain.ActionRegistry
OutputRegistry() chain.OutputRegistry
AuthRegistry() chain.AuthRegistry
ActionCodec() *codec.TypeParser[chain.Action]
Copy link
Contributor Author

@joshua-kim joshua-kim Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we should name this ActionRegistry or ActionParser or ActionCodec?

@joshua-kim joshua-kim marked this pull request as ready for review October 2, 2024 15:49
@joshua-kim joshua-kim changed the title Remove type alias for action + auth registry Remove type alias for Action + Auth + Output Registry Oct 2, 2024
Signed-off-by: Joshua Kim <[email protected]>
@@ -151,9 +151,8 @@ type GetABIReply struct {
}

func (j *JSONRPCServer) GetABI(_ *http.Request, _ *GetABIArgs, reply *GetABIReply) error {
actionRegistry, outputRegistry := j.vm.ActionRegistry(), j.vm.OutputRegistry()
// Must dereference aliased type to call GetRegisteredTypes
vmABI, err := abi.NewABI((*actionRegistry).GetRegisteredTypes(), (*outputRegistry).GetRegisteredTypes())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Motivation behind the PR

@joshua-kim joshua-kim self-assigned this Oct 2, 2024
Copy link
Collaborator

@aaronbuchwald aaronbuchwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aaronbuchwald aaronbuchwald enabled auto-merge (squash) October 9, 2024 20:29
@aaronbuchwald aaronbuchwald merged commit b934dbd into main Oct 9, 2024
17 checks passed
@joshua-kim joshua-kim deleted the alias branch October 9, 2024 22:43
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

Successfully merging this pull request may close these issues.

2 participants