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

imp: represent unlimited approvals with MaxUint256 value (backport #3454) #3580

Merged
merged 2 commits into from
May 15, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 15, 2023

This is an automatic backport of pull request #3454 done by Mergify.
Cherry-pick of 7e6eb4c has failed:

On branch mergify/bp/release/v6.2.x/pr-3454
Your branch is up to date with 'origin/release/v6.2.x'.

You are currently cherry-picking commit 7e6eb4c6.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   docs/apps/transfer/authorizations.md

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   CHANGELOG.md
	deleted by us:   e2e/tests/core/client_test.go
	deleted by us:   e2e/testsuite/grpc_query.go
	both modified:   modules/apps/transfer/types/transfer_authorization.go
	both modified:   modules/apps/transfer/types/transfer_authorization_test.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

* imp: represent unlimited approvals with a nil value

* CHANGELOG

* Update CHANGELOG.md

* fix: updated unlimited spending limit to be represented with the MaxInt64

* Update modules/apps/transfer/types/transfer_authorization.go

Co-authored-by: Federico Kunze Küllmer <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Federico Kunze Küllmer <[email protected]>

* fix: lint

* Update modules/apps/transfer/types/transfer_authorization.go

* fix: update failing test and add test case suggested in review

* fix: moved isAllowedAddress check before coin loop

* fix: use maxUint256 case so it aligns with what's being passed from the EVM extension

* refactor transfer authz to remove coins iteration in favour of explicit amount checking

* make format

* Update modules/apps/transfer/types/transfer_authorization.go

Co-authored-by: Damian Nolan <[email protected]>

* fix: add the Authorization to Updated.

* moving allowlist check to before spend limit logic

* Apply suggestions from code review

* fix: add comment to spend limit check

* review feedback

* Update modules/apps/transfer/types/transfer_authorization.go

Co-authored-by: Damian Nolan <[email protected]>

* Update docs/apps/transfer/authorizations.md

* fix: changed to new sentinel value name

---------

Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: Damian Nolan <[email protected]>
(cherry picked from commit 7e6eb4c)

# Conflicts:
#	CHANGELOG.md
#	e2e/tests/core/client_test.go
#	e2e/testsuite/grpc_query.go
#	modules/apps/transfer/types/transfer_authorization.go
#	modules/apps/transfer/types/transfer_authorization_test.go
Copy link
Member

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

I removed the changelog from the diff as one already exists for adding authz support for v6.2.0

@@ -9,10 +14,11 @@ import (
host "github.com/cosmos/ibc-go/v6/modules/core/24-host"
)

const gasCostPerIteration = uint64(10)
Copy link
Member

Choose a reason for hiding this comment

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

Removed this in favour of ctx.KVGasConfig().IterNextCostFlat below. Considering v6.2.0 is the introduction of the authz feature to the v6 line I thought it was best to align with what is on main.

@crodriguezvega crodriguezvega merged commit 94221f7 into release/v6.2.x May 15, 2023
@crodriguezvega crodriguezvega deleted the mergify/bp/release/v6.2.x/pr-3454 branch May 15, 2023 19:17
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.

4 participants