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

Support delegation for vote signers #508

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

shazarre
Copy link
Contributor

@shazarre shazarre commented Jan 14, 2025

Description

This PR adds support for delegating locked gold as a vote signer.

Other changes

Added a test that covers a case when vote signer is authorized for a ReleaseGold contract instance.

Tested

Ran tests locally.


PR-Codex overview

This PR introduces support for delegation in the voting process for vote signers within the lockedgold command of the CLI, enhancing governance capabilities.

Detailed summary

  • Updated the delegate.ts file to include address in the newCheckBuilder.
  • Changed validation from .isAccount(address) to .isVoteSignerOrAccount().
  • Added a new test case in delegate.test.ts for delegating as a vote signer.
  • Included deployment of a releaseGoldContract in the test setup.
  • Verified delegation functionality and ensured the delegateeAddress is recorded correctly.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@shazarre shazarre requested a review from a team as a code owner January 14, 2025 10:33
Copy link

changeset-bot bot commented Jan 14, 2025

🦋 Changeset detected

Latest commit: 9c64184

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

This PR includes changesets to release 1 package
Name Type
@celo/celocli 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

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.26%. Comparing base (df052a1) to head (9c64184).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #508   +/-   ##
=======================================
  Coverage   76.26%   76.26%           
=======================================
  Files         246      246           
  Lines       10365    10365           
  Branches     1642     1624   -18     
=======================================
  Hits         7905     7905           
+ Misses       2377     2365   -12     
- Partials       83       95   +12     
Components Coverage Δ
celocli 86.49% <100.00%> (ø)
sdk 68.96% <ø> (ø)
wallets 73.30% <ø> (ø)
viem-sdks 95.08% <ø> (ø)

@aaronmgdr aaronmgdr merged commit 8fb95c9 into master Jan 14, 2025
24 of 37 checks passed
@aaronmgdr aaronmgdr deleted the shazarre/Releasegold_delegate_support branch January 14, 2025 11:51
@github-actions github-actions bot mentioned this pull request Jan 14, 2025
aaronmgdr pushed a commit that referenced this pull request Jan 14, 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 master, this PR
will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`master` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `master`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @celo/wallet-ledger@7.0.0-beta.0

### Major Changes

- [#488](#488)
[`07c4c78`](07c4c78)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Interfaces for
newLedgerWalletWithSetup and LedgerWallet constructor have changed.

`newLedgerWalletWithSetup` replaced positional arguments for named
arguments and added changeIndexes

    ```diff
      newLedgerWalletWithSetup(
        transport: any,
    -    derivationPathIndexes?: number[],
    -    baseDerivationPath?: string,
    -    ledgerAddressValidation?: AddressValidation,
    -    isCel2?: boolean
    +    options: LedgerWalletSetup
      )

    + interface LedgerWalletSetup {
    +   derivationPathIndexes?: number[]
    +   changeIndexes?: number[]
    +   baseDerivationPath?: string
    +   ledgerAddressValidation?: AddressValidation
    +   isCel2?: boolean
    + }

    ```

`new LedgerWallet` moved transport to first position and added
changeIndexes in 4th

    ```diff
    new LedgerWallet(
    +    transport,
        derivationPathIndexes,
        baseDerivationPath,
    -    transport,
    +    changeIndexes,
        ledgerAddressValidation,
        isCel2
      )
    ```

### Minor Changes

- [#488](#488)
[`07c4c78`](07c4c78)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - It is now possible
to iterate over both the change and address indexes to look thru more
bip44 paths for addresses. just pass changeIndexes into LedgerWallet.

### Patch Changes

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump dependncies up

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94),
[`07c4c78`](07c4c78)]:
    -   @celo/utils@8.0.1-beta.0
    -   @celo/base@7.0.1-beta.0
    -   @celo/wallet-remote@7.0.0-beta.0
    -   @celo/wallet-base@7.0.0-beta.0
    -   @celo/connect@6.1.1-beta.0

## @celo/celocli@6.1.0-beta.0

### Minor Changes

- [#470](#470)
[`770bfa4`](770bfa4)
Thanks [@shazarre](https://github.com/shazarre)! - Introduce
`validatorgroup:rpc-urls` command to list community RPC nodes

- [#488](#488)
[`07c4c78`](07c4c78)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - add
--derivationPath to config:set for setting global deriviationPath.
Usefull when using ledger devices and when generated new accounts.

- [#488](#488)
[`07c4c78`](07c4c78)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Add
--ledgerLiveMode flag for use with --useLedger flag. This is useful for
using same addresses on celocli as LedgerLive uses.

- [#508](#508)
[`8fb95c9`](8fb95c9)
Thanks [@shazarre](https://github.com/shazarre)! - Support delegation
for vote signers

- [#507](#507)
[`0517378`](0517378)
Thanks [@shazarre](https://github.com/shazarre)! - --useMultiSig support
for governance:withdraw command

### Patch Changes

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump dependncies up

- [#493](#493)
[`075a270`](075a270)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Fix
releasegold:transfer-dollars bug with pre run checks

- Updated dependencies
\[[`770bfa4`](770bfa4),
[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94),
[`07c4c78`](07c4c78),
[`07c4c78`](07c4c78),
[`07c4c78`](07c4c78)]:
    -   @celo/metadata-claims@1.0.1-beta.0
    -   @celo/wallet-hsm-azure@7.0.0-beta.0
    -   @celo/cryptographic-utils@5.1.2-beta.0
    -   @celo/utils@8.0.1-beta.0
    -   @celo/base@7.0.1-beta.0
    -   @celo/wallet-ledger@7.0.0-beta.0
    -   @celo/wallet-local@7.0.0-beta.0
    -   @celo/contractkit@9.0.1-beta.0
    -   @celo/phone-utils@6.0.5-beta.0
    -   @celo/governance@5.1.5-beta.0
    -   @celo/explorer@5.0.14-beta.0
    -   @celo/connect@6.1.1-beta.0

## @celo/dev-utils@0.0.8-beta.0

### Patch Changes

- Updated dependencies
\[[`79cd947`](79cd947)]:
    -   @celo/connect@6.1.1-beta.0

## @celo/base@7.0.1-beta.0

### Patch Changes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump @noble/ciphers
to use audited version

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- [#488](#488)
[`07c4c78`](07c4c78)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - New export type
DerivationPath. Useful for when a value Must match first part of BIP44

## @celo/connect@6.1.1-beta.0

### Patch Changes

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94),
[`07c4c78`](07c4c78)]:
    -   @celo/utils@8.0.1-beta.0
    -   @celo/base@7.0.1-beta.0

## @celo/contractkit@9.0.1-beta.0

### Patch Changes

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump dependncies up

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94),
[`07c4c78`](07c4c78)]:
    -   @celo/utils@8.0.1-beta.0
    -   @celo/base@7.0.1-beta.0
    -   @celo/wallet-local@7.0.0-beta.0
    -   @celo/connect@6.1.1-beta.0

## @celo/cryptographic-utils@5.1.2-beta.0

### Patch Changes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump @noble/ciphers
to use audited version

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump dependncies up

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94),
[`07c4c78`](07c4c78)]:
    -   @celo/utils@8.0.1-beta.0
    -   @celo/base@7.0.1-beta.0

## @celo/explorer@5.0.14-beta.0

### Patch Changes

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94),
[`07c4c78`](07c4c78)]:
    -   @celo/utils@8.0.1-beta.0
    -   @celo/base@7.0.1-beta.0
    -   @celo/contractkit@9.0.1-beta.0
    -   @celo/connect@6.1.1-beta.0

## @celo/governance@5.1.5-beta.0

### Patch Changes

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94),
[`07c4c78`](07c4c78)]:
    -   @celo/utils@8.0.1-beta.0
    -   @celo/base@7.0.1-beta.0
    -   @celo/contractkit@9.0.1-beta.0
    -   @celo/explorer@5.0.14-beta.0
    -   @celo/connect@6.1.1-beta.0

## @celo/keystores@5.0.13-beta.0

### Patch Changes

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94)]:
    -   @celo/utils@8.0.1-beta.0
    -   @celo/wallet-local@7.0.0-beta.0

## @celo/metadata-claims@1.0.1-beta.0

### Patch Changes

- [#470](#470)
[`770bfa4`](770bfa4)
Thanks [@shazarre](https://github.com/shazarre)! - Backwards
compatibility for existing ATTESTATIONS_SERVICE_URL claims

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump dependncies up

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94),
[`07c4c78`](07c4c78)]:
    -   @celo/utils@8.0.1-beta.0
    -   @celo/base@7.0.1-beta.0

## @celo/network-utils@5.0.7-beta.0

### Patch Changes

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

## @celo/phone-utils@6.0.5-beta.0

### Patch Changes

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump dependncies up

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94),
[`07c4c78`](07c4c78)]:
    -   @celo/utils@8.0.1-beta.0
    -   @celo/base@7.0.1-beta.0

## @celo/transactions-uri@5.0.13-beta.0

### Patch Changes

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`07c4c78`](07c4c78)]:
    -   @celo/base@7.0.1-beta.0
    -   @celo/connect@6.1.1-beta.0

## @celo/utils@8.0.1-beta.0

### Patch Changes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump @noble/ciphers
to use audited version

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump dependncies up

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`07c4c78`](07c4c78)]:
    -   @celo/base@7.0.1-beta.0

## @celo/wallet-base@7.0.0-beta.0

### Patch Changes

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump dependncies up

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94),
[`07c4c78`](07c4c78)]:
    -   @celo/utils@8.0.1-beta.0
    -   @celo/base@7.0.1-beta.0
    -   @celo/connect@6.1.1-beta.0

## @celo/wallet-hsm@7.0.0-beta.0

### Patch Changes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump @noble/ciphers
to use audited version

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump dependncies up

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`07c4c78`](07c4c78)]:
    -   @celo/base@7.0.1-beta.0

## @celo/wallet-hsm-aws@7.0.0-beta.0

### Patch Changes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump @noble/ciphers
to use audited version

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94)]:
    -   @celo/wallet-hsm@7.0.0-beta.0
    -   @celo/utils@8.0.1-beta.0
    -   @celo/wallet-remote@7.0.0-beta.0
    -   @celo/wallet-base@7.0.0-beta.0
    -   @celo/connect@6.1.1-beta.0

## @celo/wallet-hsm-azure@7.0.0-beta.0

### Patch Changes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump @noble/ciphers
to use audited version

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94),
[`07c4c78`](07c4c78)]:
    -   @celo/wallet-hsm@7.0.0-beta.0
    -   @celo/utils@8.0.1-beta.0
    -   @celo/base@7.0.1-beta.0
    -   @celo/wallet-remote@7.0.0-beta.0
    -   @celo/wallet-base@7.0.0-beta.0
    -   @celo/connect@6.1.1-beta.0

## @celo/wallet-hsm-gcp@7.0.0-beta.0

### Patch Changes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump @noble/ciphers
to use audited version

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94)]:
    -   @celo/wallet-hsm@7.0.0-beta.0
    -   @celo/utils@8.0.1-beta.0
    -   @celo/wallet-remote@7.0.0-beta.0
    -   @celo/wallet-base@7.0.0-beta.0
    -   @celo/connect@6.1.1-beta.0

## @celo/wallet-local@7.0.0-beta.0

### Patch Changes

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94),
[`07c4c78`](07c4c78)]:
    -   @celo/utils@8.0.1-beta.0
    -   @celo/base@7.0.1-beta.0
    -   @celo/wallet-base@7.0.0-beta.0
    -   @celo/connect@6.1.1-beta.0

## @celo/wallet-remote@7.0.0-beta.0

### Patch Changes

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`2e02d94`](2e02d94)]:
    -   @celo/utils@8.0.1-beta.0
    -   @celo/wallet-base@7.0.0-beta.0
    -   @celo/connect@6.1.1-beta.0

## @celo/viem-account-ledger@1.0.1-beta.0

### Patch Changes

- [#497](#497)
[`79cd947`](79cd947)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - chore: package.json
link fixes

- [#492](#492)
[`2e02d94`](2e02d94)
Thanks [@aaronmgdr](https://github.com/aaronmgdr)! - Bump dependncies up

- Updated dependencies
\[[`2e02d94`](2e02d94),
[`79cd947`](79cd947),
[`07c4c78`](07c4c78)]:
    -   @celo/base@7.0.1-beta.0


<!-- start pr-codex -->

---

## PR-Codex overview
This PR primarily focuses on updating various packages within the Celo
ecosystem to their beta versions, enhancing dependency management, and
fixing package links.

### Detailed summary
- Updated `@celo/dev-utils` to `0.0.8-beta.0`
- Updated several packages to their respective beta versions
- Added multiple changesets for version tracking
- Updated changelogs across various packages with patch changes
- Improved dependency links and fixed package.json entries across
modules

> The following files were skipped due to too many changes: `yarn.lock`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

3 participants