Skip to content

feat: add solana grant role implementation#797

Open
ecPablo wants to merge 3 commits into
mainfrom
ecpablo/add-grant-role-solana
Open

feat: add solana grant role implementation#797
ecPablo wants to merge 3 commits into
mainfrom
ecpablo/add-grant-role-solana

Conversation

@ecPablo

@ecPablo ecPablo commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Adds solana implementation for GrantRole on the TimelockConfigurer. Some notes on the solana implementation:

  • Solana admin is Config.Owner, not an access-controller role, so this role mapping is flagged as invalid by the solana sdk.
  • Added some optional arguments following the Configurer pattern so cld-changesets operations support both execution modes

ecPablo added 3 commits June 26, 2026 13:40
Signed-off-by: Pablo <pablo.estrada@smartcontract.com>
Signed-off-by: Pablo <pablo.estrada@smartcontract.com>
Signed-off-by: Pablo <pablo.estrada@smartcontract.com>
@cl-sonarqube-production

Copy link
Copy Markdown

@ecPablo ecPablo marked this pull request as ready for review June 27, 2026 00:22
@ecPablo ecPablo requested a review from a team as a code owner June 27, 2026 00:22
}
}

func TestTimelockRoleToBindingRejectsAdmin(t *testing.T) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: seems to be possible to consolidate the last two test functions in the test table; just need to add the typical wantErr attribute

return types.TransactionResult{}, err
}

if c.skipSend {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I think it should be possible to use the same solution used for the Configurer type and embed instructionCollection. It should, in theory, reduce a bit of duplication.

got, err := configurer.GrantRole(t.Context(), timelockAddress, sdk.TimelockRoleProposer, target.PublicKey().String())

tt.assertion(t, err)
assert.Equal(t, tt.wantHash, got.Hash)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if we have a parameterized assertion function, these other asserts should be inside it

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