Skip to content

feat: add TimelockProposal.Convert for Solana#242

Merged
gustavogama-cll merged 4 commits into
mainfrom
feat-solana-timelock-converter
Jan 28, 2025
Merged

feat: add TimelockProposal.Convert for Solana#242
gustavogama-cll merged 4 commits into
mainfrom
feat-solana-timelock-converter

Conversation

@gustavogama-cll

@gustavogama-cll gustavogama-cll commented Jan 16, 2025

Copy link
Copy Markdown
Contributor

Implement the Convert function for the Solana blockchain.

A small modification to the contract was needed because in Solana we need the address of the mcm contract in order to extract the signer PDA and set it in some of the instructions.

JIRA: https://smartcontract-it.atlassian.net/browse/DPA-1420

@changeset-bot

changeset-bot Bot commented Jan 16, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 431e921

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smartcontractkit/mcms Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gustavogama-cll gustavogama-cll force-pushed the feat-solana-timelock-converter branch 2 times, most recently from fec9b5e to 291a250 Compare January 16, 2025 07:01
@gustavogama-cll gustavogama-cll changed the title [WIP] feat: add TimelockProposal.Convert for Solana [WIP] feat: add TimelockProposal.Convert for Solana Jan 16, 2025
@gustavogama-cll gustavogama-cll force-pushed the feat-solana-timelock-converter branch 3 times, most recently from 11b5cee to b4fa31b Compare January 21, 2025 07:06
@gustavogama-cll gustavogama-cll force-pushed the feat-solana-timelock-converter branch 2 times, most recently from 7b91053 to 59ba342 Compare January 24, 2025 05:30
@gustavogama-cll gustavogama-cll changed the title [WIP] feat: add TimelockProposal.Convert for Solana feat: add TimelockProposal.Convert for Solana Jan 24, 2025
Comment thread sdk/solana/operation.go

type AdditionalFields struct {
Accounts []*solana.AccountMeta `json:"accounts" validate:"required"`
Value *big.Int `json:"value" validate:"omitempty"`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I opted to add the Value attribute to AdditionalFields for consistency's sake. And in the hopes we'll eventually learn how to do direct SOL transfers.

If it's already been decided that this is out-of-scope, I'll undo this part.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this should be good I also like both chain families having the value field to standardize the API

@gustavogama-cll gustavogama-cll force-pushed the feat-solana-timelock-converter branch from 59ba342 to 690425e Compare January 24, 2025 06:10
@gustavogama-cll

gustavogama-cll commented Jan 24, 2025

Copy link
Copy Markdown
Contributor Author

There's a lot of refactoring that we can do -- particularly in the e2e tests -- once this is merged. But I'm holding back for now to reduce the PR size. Maybe in the next one.

@gustavogama-cll gustavogama-cll marked this pull request as ready for review January 24, 2025 06:21
@gustavogama-cll gustavogama-cll requested a review from a team as a code owner January 24, 2025 06:21
Comment thread e2e/tests/solana/timelock_converter.go Outdated
ecPablo
ecPablo previously approved these changes Jan 24, 2025

@ecPablo ecPablo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! 🔥 left some minor comments and questions but overall looks great!

Comment thread e2e/tests/solana/timelock_converter.go
Comment thread sdk/solana/operation.go

type AdditionalFields struct {
Accounts []*solana.AccountMeta `json:"accounts" validate:"required"`
Value *big.Int `json:"value" validate:"omitempty"`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this should be good I also like both chain families having the value field to standardize the API

Comment thread sdk/solana/operation.go
Comment thread sdk/solana/timelock_converter.go
Comment thread sdk/solana/timelock_converter.go Outdated
@gustavogama-cll

Copy link
Copy Markdown
Contributor Author

Rebased due to conflicts, so needs another approval

@cl-sonarqube-production

Copy link
Copy Markdown

@gustavogama-cll gustavogama-cll added this pull request to the merge queue Jan 28, 2025
Merged via the queue into main with commit c610826 Jan 28, 2025
@gustavogama-cll gustavogama-cll deleted the feat-solana-timelock-converter branch January 28, 2025 13:37
akhilchainani pushed a commit that referenced this pull request Jan 28, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @smartcontractkit/mcms@0.6.0

### Minor Changes

- [#256](#256)
[`45c6a2e`](45c6a2e)
Thanks [@akhilchainani](https://github.com/akhilchainani)! - Allow
callProxy execute capability

- [#245](#245)
[`7a5944e`](7a5944e)
Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! - Add
context and Converter map TimelockConverter.Convert params

- [#231](#231)
[`a8447e1`](a8447e1)
Thanks [@graham-chainlink](https://github.com/graham-chainlink)! -
feat(solana): timelock inspection - operation statuses check

- [#242](#242)
[`c610826`](c610826)
Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! - Add
TimelockProposal.Convert for solana

- [#238](#238)
[`abde70c`](abde70c)
Thanks [@graham-chainlink](https://github.com/graham-chainlink)! -
feat(solana): implement get roles for timelock inspection

- [#236](#236)
[`150a1f6`](150a1f6)
Thanks [@graham-chainlink](https://github.com/graham-chainlink)! - Use
string for inspector return type

- [#209](#209)
[`a71dd79`](a71dd79)
Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! - Add the
`Configurer` component and `SetConfig` call to the Solana SDK.

- [#223](#223)
[`4adb968`](4adb968)
Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! - Add a
"context" parameter to all APIs that interact with a blockchain.

- [#227](#227)
[`21d8809`](21d8809)
Thanks [@ecPablo](https://github.com/ecPablo)! - Adds Execute
functionality to solana SDK

- [#248](#248)
[`e153c75`](e153c75)
Thanks [@ecPablo](https://github.com/ecPablo)! - Timelock execute batch
on solana SDK.

- [#211](#211)
[`be76399`](be76399)
Thanks [@graham-chainlink](https://github.com/graham-chainlink)! -
feat(solana): support get opdata, root and root metadata

### Patch Changes

- [#215](#215)
[`9f39403`](9f39403)
Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! - Add the
`Executor` component and `SetRoot` call to the Solana SDK.

- [#259](#259)
[`a4bc13b`](a4bc13b)
Thanks [@anirudhwarrier](https://github.com/anirudhwarrier)! -
usbwallet: fix ledger access for latest firmware and add Ledger Flex

- [#225](#225)
[`7c9cd3d`](7c9cd3d)
Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! - Add PDA
finders and ContractAddress parser to the Solana SDK

- [#258](#258)
[`a11a0ee`](a11a0ee)
Thanks [@akhilchainani](https://github.com/akhilchainani)! -
non-breaking change to allow a salt override to proposals

- [#228](#228)
[`b953973`](b953973)
Thanks [@graham-chainlink](https://github.com/graham-chainlink)! -
fix(solana): setProgramID on inspection methods

Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com>
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.

3 participants