Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/#2053-action-vie…
Browse files Browse the repository at this point in the history
…ws-3

# Conflicts:
#	packages/ui/src/ActionView/action-view.tsx
#	packages/ui/src/ActionView/actions/swap-claim.tsx
#	packages/ui/src/ActionView/index.stories.tsx
#	packages/ui/src/ActionView/swap/swap.tsx
#	packages/ui/src/ActionView/types.ts
#	packages/ui/src/utils/bufs/action-view.ts
  • Loading branch information
VanishMax committed Feb 21, 2025
2 parents 2fcb394 + d0cc2ee commit 4fc273f
Show file tree
Hide file tree
Showing 66 changed files with 1,572 additions and 340 deletions.
5 changes: 0 additions & 5 deletions .changeset/chilly-oranges-scream.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/pretty-hotels-shop.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/soft-horses-grab.md

This file was deleted.

18 changes: 18 additions & 0 deletions apps/minifront/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# minifront

## 6.29.0

### Minor Changes

- 03597b7: bump skip widget to latest to fix penumbra noble transparent addresses issue

### Patch Changes

- Updated dependencies [49ae3ab]
- @penumbra-zone/protobuf@8.0.0
- @penumbra-zone/types@30.0.0
- @penumbra-zone/ui-deprecated@16.0.0
- @penumbra-zone/perspective@48.0.0
- @penumbra-zone/bech32m@14.0.0
- @penumbra-zone/client@25.0.0
- @penumbra-zone/getters@24.0.0
- @penumbra-zone/crypto-web@37.0.0

## 6.28.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/minifront/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minifront",
"version": "6.28.5",
"version": "6.29.0",
"private": true,
"license": "(MIT OR Apache-2.0)",
"type": "module",
Expand Down
10 changes: 10 additions & 0 deletions apps/node-status/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# node-status

## 4.1.52

### Patch Changes

- Updated dependencies [49ae3ab]
- @penumbra-zone/protobuf@8.0.0
- @penumbra-zone/types@30.0.0
- @penumbra-zone/ui-deprecated@16.0.0
- @penumbra-zone/crypto-web@37.0.0

## 4.1.51

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/node-status/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-status",
"version": "4.1.51",
"version": "4.1.52",
"private": true,
"license": "(MIT OR Apache-2.0)",
"type": "module",
Expand Down
7 changes: 7 additions & 0 deletions packages/bech32m/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @penumbra-zone/bech32

## 14.0.0

### Patch Changes

- Updated dependencies [49ae3ab]
- @penumbra-zone/protobuf@8.0.0

## 13.0.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/bech32m/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@penumbra-zone/bech32m",
"version": "13.0.0",
"version": "14.0.0",
"license": "(MIT OR Apache-2.0)",
"description": "Tools for manipulating Penumbra bech32m strings",
"type": "module",
Expand Down
7 changes: 7 additions & 0 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @penumbra-zone/client

## 25.0.0

### Patch Changes

- Updated dependencies [49ae3ab]
- @penumbra-zone/protobuf@8.0.0

## 24.0.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@penumbra-zone/client",
"version": "24.0.0",
"version": "25.0.0",
"license": "(MIT OR Apache-2.0)",
"description": "Package for connecting to any Penumbra extension, including Prax.",
"type": "module",
Expand Down
7 changes: 7 additions & 0 deletions packages/crypto/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @penumbra-zone/crypto-web

## 37.0.0

### Patch Changes

- Updated dependencies [49ae3ab]
- @penumbra-zone/types@30.0.0

## 36.0.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@penumbra-zone/crypto-web",
"version": "36.0.0",
"version": "37.0.0",
"license": "(MIT OR Apache-2.0)",
"type": "module",
"engine": {
Expand Down
8 changes: 8 additions & 0 deletions packages/getters/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @penumbra-zone/getters

## 24.0.0

### Patch Changes

- Updated dependencies [49ae3ab]
- @penumbra-zone/protobuf@8.0.0
- @penumbra-zone/bech32m@14.0.0

## 23.0.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/getters/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@penumbra-zone/getters",
"version": "23.0.0",
"version": "24.0.0",
"license": "(MIT OR Apache-2.0)",
"description": "Convenience getters for the deeply nested optionals of Penumbra's protobuf types",
"type": "module",
Expand Down
14 changes: 14 additions & 0 deletions packages/perspective/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @penumbra-zone/perspective

## 48.0.0

### Minor Changes

- 49ae3ab: LQT integration in web packages

### Patch Changes

- Updated dependencies [49ae3ab]
- @penumbra-zone/protobuf@8.0.0
- @penumbra-zone/wasm@41.0.0
- @penumbra-zone/bech32m@14.0.0
- @penumbra-zone/getters@24.0.0

## 47.0.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/perspective/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@penumbra-zone/perspective",
"version": "47.0.0",
"version": "48.0.0",
"license": "(MIT OR Apache-2.0)",
"description": "Tools for assuming different perspectives of Penumbra transactions",
"type": "module",
Expand Down
9 changes: 9 additions & 0 deletions packages/perspective/src/plan/view-action-plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,15 @@ export const viewActionPlan =
});
}

case 'actionLiquidityTournamentVote': {
return new ActionView({
actionView: {
case: 'actionLiquidityTournamentVote',
value: {},
},
});
}

case undefined:
return new ActionView({
actionView: actionPlan.action,
Expand Down
3 changes: 2 additions & 1 deletion packages/perspective/src/transaction/classification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ export type TransactionClassification =
| 'positionRewardClaim'
| 'communityPoolSpend'
| 'communityPoolOutput'
| 'communityPoolDeposit';
| 'communityPoolDeposit'
| 'liquidityTournamentVote';
4 changes: 4 additions & 0 deletions packages/perspective/src/transaction/classify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ export const classifyTransaction = (txv?: TransactionView): TransactionClassific
if (allActionCases.has('communityPoolOutput')) {
return 'communityPoolOutput';
}
if (allActionCases.has('actionLiquidityTournamentVote')) {
return 'liquidityTournamentVote';
}

const hasOpaqueSpend = txv.bodyView?.actionViews.some(
a => a.actionView.case === 'spend' && a.actionView.value.spendView.case === 'opaque',
Expand Down Expand Up @@ -167,6 +170,7 @@ export const TRANSACTION_LABEL_BY_CLASSIFICATION: Record<TransactionClassificati
proposalSubmit: 'Proposal Submit',
proposalWithdraw: 'Proposal Withdraw',
validatorDefinition: 'Validator Definition',
liquidityTournamentVote: 'Liquidity Tournament Vote',
};

export const getTransactionClassificationLabel = (txv?: TransactionView): string =>
Expand Down
9 changes: 9 additions & 0 deletions packages/perspective/src/translators/action-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Address } from '@penumbra-zone/protobuf/penumbra/core/keys/v1/keys_pb';
import { asOpaqueSwapView } from './swap-view.js';
import { asOpaqueSwapClaimView } from './swap-claim-view.js';
import { asOpaqueDelegatorVoteView } from './delegator-vote-view.js';
import { asOpaqueLiquidityTournamentVoteView } from './liquidity-tournament-vote-view.js';

export const asPublicActionView: Translator<ActionView> = actionView => {
switch (actionView?.actionView.case) {
Expand Down Expand Up @@ -49,6 +50,14 @@ export const asPublicActionView: Translator<ActionView> = actionView => {
},
});

case 'actionLiquidityTournamentVote':
return new ActionView({
actionView: {
case: 'actionLiquidityTournamentVote',
value: asOpaqueLiquidityTournamentVoteView(actionView.actionView.value),
},
});

// Currently defaulting to displaying that all data is public as it's better
// to err on communicating private data as public than the other way around
// TODO: Do proper audit of what data for each action is public
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {
ActionLiquidityTournamentVoteView,
ActionLiquidityTournamentVoteView_Opaque,
} from '@penumbra-zone/protobuf/penumbra/core/component/funding/v1/funding_pb';
import { Translator } from './types.js';

export const asOpaqueLiquidityTournamentVoteView: Translator<
ActionLiquidityTournamentVoteView
> = liquidityTournamentVoteView => {
return new ActionLiquidityTournamentVoteView({
liquidityTournamentVote: {
case: 'opaque',
value: new ActionLiquidityTournamentVoteView_Opaque({
vote: liquidityTournamentVoteView?.liquidityTournamentVote.value?.vote,
}),
},
});
};
6 changes: 6 additions & 0 deletions packages/protobuf/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @penumbra-zone/protobuf

## 8.0.0

### Major Changes

- 49ae3ab: LQT integration in web packages

## 7.2.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/protobuf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@penumbra-zone/protobuf",
"version": "7.2.0",
"version": "8.0.0",
"license": "(MIT OR Apache-2.0)",
"description": "Exports a `@bufbuild/protobuf` type registry with all message types necessary to communicate with a Penumbra extension",
"type": "module",
Expand All @@ -16,7 +16,7 @@
"gen:ibc": "buf generate buf.build/cosmos/ibc:7ab44ae956a0488ea04e04511efa5f70",
"gen:ics23": "buf generate buf.build/cosmos/ics23:55085f7c710a45f58fa09947208eb70b",
"gen:noble": "buf generate buf.build/noble-assets/forwarding:5a8609a6772d417584a9c60cd8b80881",
"gen:penumbra": "buf generate buf.build/penumbra-zone/penumbra:adb116eefae84c1abd53a1594b895360",
"gen:penumbra": "buf generate buf.build/penumbra-zone/penumbra:ae2300bce202a7d429727f1340e7412d3b9f810c",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"lint:strict": "tsc --noEmit && eslint src --max-warnings 0",
Expand Down
1 change: 1 addition & 0 deletions packages/protobuf/src/services/penumbra-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ export { QueryService as GovernanceService } from '../../gen/penumbra/core/compo
export { QueryService as SctService } from '../../gen/penumbra/core/component/sct/v1/sct_connect.js';
export { QueryService as ShieldedPoolService } from '../../gen/penumbra/core/component/shielded_pool/v1/shielded_pool_connect.js';
export { QueryService as StakeService } from '../../gen/penumbra/core/component/stake/v1/stake_connect.js';
export { FundingService } from '../../gen/penumbra/core/component/funding/v1/funding_connect.js';
4 changes: 3 additions & 1 deletion packages/protobuf/src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import type { CustodyService } from './services/penumbra-custody.js';
import type { ViewService } from './services/penumbra-view.js';
import type {
FundingService,
AppService,
AuctionService,
CommunityPoolService,
Expand Down Expand Up @@ -43,4 +44,5 @@ export type PenumbraService =
| typeof SimulationService
| typeof StakeService
| typeof TendermintProxyService
| typeof ViewService;
| typeof ViewService
| typeof FundingService;
17 changes: 17 additions & 0 deletions packages/services/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# @penumbra-zone/router

## 54.0.0

### Major Changes

- 49ae3ab: LQT integration in web packages

### Patch Changes

- Updated dependencies [49ae3ab]
- @penumbra-zone/protobuf@8.0.0
- @penumbra-zone/storage@48.0.0
- @penumbra-zone/types@30.0.0
- @penumbra-zone/wasm@41.0.0
- @penumbra-zone/bech32m@14.0.0
- @penumbra-zone/getters@24.0.0
- @penumbra-zone/crypto-web@37.0.0

## 53.0.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/services/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@penumbra-zone/services",
"version": "53.0.1",
"version": "54.0.0",
"license": "(MIT OR Apache-2.0)",
"type": "module",
"engine": {
Expand Down
8 changes: 8 additions & 0 deletions packages/services/src/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ export interface IndexedDbMock {
saveGasPrices?: Mock;
saveTransactionInfo?: Mock;
getTransactionInfo?: Mock;
getBlockHeightByEpoch?: Mock;
saveLQTHistoricalVote?: Mock;
getLQTHistoricalVotes?: Mock;
}

export interface AuctionMock {
Expand All @@ -62,6 +65,11 @@ export interface MockQuerier {
sct?: SctMock;
shieldedPool?: ShieldedPoolMock;
stake?: StakeMock;
funding?: FundingMock;
}

export interface FundingMock {
lqtCheckNullifier?: Mock;
}

export interface SctMock {
Expand Down
4 changes: 4 additions & 0 deletions packages/services/src/view-service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import { witness } from './witness.js';
import { witnessAndBuild } from './witness-and-build.js';
import { transparentAddress } from './transparent-address.js';
import { latestSwaps } from './latest-swaps.js';
import { lqtVotingNotes } from './lqt-voting-notes.js';
import { tournamentVotes } from './tournament-votes.js';

export type Impl = ServiceImpl<typeof ViewService>;

Expand Down Expand Up @@ -66,4 +68,6 @@ export const viewImpl: Impl = {
witnessAndBuild,
transparentAddress,
latestSwaps,
lqtVotingNotes,
tournamentVotes,
};
Loading

0 comments on commit 4fc273f

Please sign in to comment.