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

feat(distr): add distribution authorization #35

Merged
merged 7 commits into from
Jun 8, 2023

Conversation

Vvaradinov
Copy link

Description

This PR adds an x/distribution specific Authorization to use with EVM extensions. It includes the msg url and the allowed list so smart contract developers are able to set multiple accounts for the transactions.
Closes: #XXXX


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

Copy link

@GAtom22 GAtom22 left a comment

Choose a reason for hiding this comment

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

LGTM!! Great work @Vvaradinov! Left one nit. Also would be great to add some unit tests

proto/cosmos/distribution/v1beta1/authz.proto Outdated Show resolved Hide resolved
Copy link

@MalteHerrmann MalteHerrmann left a comment

Choose a reason for hiding this comment

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

Looking good, needs tests and the checkAddressInList function can be removed and replaced with slices.Contains

proto/cosmos/distribution/v1beta1/authz.proto Outdated Show resolved Hide resolved
x/distribution/types/authz.go Outdated Show resolved Hide resolved
x/distribution/types/authz.go Outdated Show resolved Hide resolved
x/distribution/types/authz.go Outdated Show resolved Hide resolved
x/distribution/types/authz.go Outdated Show resolved Hide resolved
x/distribution/types/authz.go Outdated Show resolved Hide resolved
x/distribution/types/authz.go Outdated Show resolved Hide resolved
x/distribution/types/authz.go Outdated Show resolved Hide resolved
Copy link

@MalteHerrmann MalteHerrmann left a comment

Choose a reason for hiding this comment

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

Great job @Vvaradinov, some minor comments from my side ✌️

x/distribution/keeper/grpc_query_test.go Outdated Show resolved Hide resolved
x/distribution/types/authz_test.go Outdated Show resolved Hide resolved
x/distribution/types/authz_test.go Outdated Show resolved Hide resolved
@Vvaradinov Vvaradinov merged commit 3c10148 into ledger/v0.46.x Jun 8, 2023
@Vvaradinov Vvaradinov deleted the Vvaradinov/distribution-authz branch June 8, 2023 08:04
@GAtom22
Copy link

GAtom22 commented Jul 20, 2023

https://github.com/Mergifyio backport ledger/v0.47.x

@mergify
Copy link

mergify bot commented Jul 20, 2023

backport ledger/v0.47.x

❌ No backport have been created

  • Backport to branch ledger/v0.47.x failed

Git reported the following error:

fatal: couldn't find remote ref ledger/v0.46.x

@GAtom22 GAtom22 restored the Vvaradinov/distribution-authz branch July 20, 2023 15:40
@GAtom22 GAtom22 deleted the Vvaradinov/distribution-authz branch July 20, 2023 15:41
@GAtom22
Copy link

GAtom22 commented Jul 20, 2023

https://github.com/Mergifyio backport ledger/v0.47.x

@mergify
Copy link

mergify bot commented Jul 20, 2023

backport ledger/v0.47.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jul 20, 2023
(cherry picked from commit 3c10148)

# Conflicts:
#	tests/integration/distribution/keeper/grpc_query_test.go
#	x/distribution/types/codec.go
GAtom22 added a commit that referenced this pull request Jul 20, 2023
GAtom22 added a commit that referenced this pull request Jul 31, 2023
MalteHerrmann pushed a commit that referenced this pull request Oct 26, 2023
MalteHerrmann pushed a commit that referenced this pull request Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants