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

CCIP-3416 paginate token admin registry get all tokens call #14514

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

ogtownsend
Copy link
Collaborator

CCIP-3416
Paginate call to GetAllConfiguredTokens since this can theoretically grow pretty large

@ogtownsend ogtownsend changed the title paginate token admin registry get all tokens call CCIP-3416 paginate token admin registry get all tokens call Sep 20, 2024
@ogtownsend ogtownsend marked this pull request as ready for review September 20, 2024 22:17
@ogtownsend ogtownsend requested a review from a team as a code owner September 20, 2024 22:17
@ogtownsend ogtownsend force-pushed the CCIP-3416-token-admin-registry-get-all-configured-tokens-handling branch from 61666a8 to 70bc529 Compare September 20, 2024 22:35
@ogtownsend ogtownsend force-pushed the CCIP-3416-token-admin-registry-get-all-configured-tokens-handling branch from 70bc529 to 852c40e Compare September 20, 2024 22:36
type TokenAdminRegistryView struct {
types.ContractMetaData
Tokens []common.Address `json:"tokens"`
}

func GenerateTokenAdminRegistryView(taContract *token_admin_registry.TokenAdminRegistry) (TokenAdminRegistryView, error) {
tokens, err := taContract.GetAllConfiguredTokens(nil, 0, 10)
if taContract == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice! should have this in every view

@cl-sonarqube-production
Copy link

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