Skip to content

Commit

Permalink
Merge branch 'main' into feat/deactivate-stake-vote-accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
guibescos committed Oct 16, 2024
2 parents d752778 + 9973287 commit 28f8970
Show file tree
Hide file tree
Showing 39 changed files with 778 additions and 387 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
package-manager-strict=true
engine-strict=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.19.1
v20.17.0
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nodejs 18.19.1
pnpm 9.3.0
nodejs 20.17.0
pnpm 9.12.1
rust 1.78.0
python 3.12.4
4 changes: 2 additions & 2 deletions Dockerfile.node
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.19.1-slim@sha256:246bf34b0c7cf8d9ff7cbe0c1ff44b178051f06c432c8e7df1645f1bd20b0352 as builder-base
FROM node:20.17.0-slim@sha256:2394e403d45a644e41ac2a15b6f843a7d4a99ad24be48c27982c5fdc61a1ef17 as builder-base
WORKDIR /usr/src/pyth
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
Expand All @@ -7,7 +7,7 @@ COPY ./ .
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile


FROM node:18.19.1-alpine@sha256:c7620fdecfefb96813da62519897808775230386f4c8482e972e37b8b18cb460 as runner-base
FROM node:20.17.0-alpine@sha256:2d07db07a2df6830718ae2a47db6fedce6745f5bcd174c398f2acdda90a11c03 as runner-base
WORKDIR /srv
ENV NODE_ENV production
RUN addgroup --system --gid 1001 pyth && adduser --system --uid 1001 pyth -g pyth && chown pyth:pyth .
Expand Down
2 changes: 1 addition & 1 deletion apps/api-reference/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"type": "module",
"engines": {
"node": "18"
"node": "20"
},
"scripts": {
"build": "next build",
Expand Down
2 changes: 1 addition & 1 deletion apps/price_pusher/config.fuel.testnet.sample.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"endpoint": "https://testnet.fuel.network/v1/graphql",
"pyth-contract-address": "0xe31e04946c67fb41923f93d50ee7fc1c6c99d6e07c02860c6bea5f4a13919277",
"pyth-contract-address": "0x25146735b29d4216639f7f8b1d7b921ff87a1d3051de62d6cceaacabeb33b8e7",
"price-service-endpoint": "https://hermes.pyth.network",
"private-key-file": "./mnemonic",
"price-config-file": "./price-config.stable.sample.yaml"
Expand Down
2 changes: 1 addition & 1 deletion apps/staking/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"type": "module",
"engines": {
"node": "18"
"node": "20"
},
"scripts": {
"build": "next build",
Expand Down
2 changes: 1 addition & 1 deletion apps/staking/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,5 +427,5 @@ export const optPublisherOut = async (
stakeAccount: PublicKey,
publisherKey: PublicKey,
): Promise<void> => {
await client.removePublisherStakeAccount(stakeAccount, publisherKey);
await client.removePublisherStakeAccount(publisherKey, stakeAccount);
};
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,7 @@ const PublisherIdentity = ({
<span className={clsx(className, withNameClassName)}>
<span>
{createElement(props.children.identity.icon, {
className: "mr-2 inline-block size-[20px] align-sub",
className: "mr-2 inline-block h-[20px] align-sub",
})}
<span className="mr-[0.5em]">{props.children.identity.name}</span>
</span>
Expand Down
10 changes: 10 additions & 0 deletions apps/staking/src/known-publishers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import blocksize from "./publisher-icons/blocksize.svg";
import elfomo from "./publisher-icons/elfomo.svg";
import finazon from "./publisher-icons/finazon.svg";
import sentio from "./publisher-icons/sentio.svg";

export const KNOWN_PUBLISHERS = {
Expand All @@ -10,4 +12,12 @@ export const KNOWN_PUBLISHERS = {
name: "Sentio",
icon: sentio,
},
Fq5zaoF76WYshMEYUn1q8cB8MrG61swhaWHRUCWeP5Vo: {
name: "Finazon",
icon: finazon,
},
"5giNPEh9PytXcnKNgufofmQPdS4jHoySgFpiu8f7QxP4": {
name: "Elfomo",
icon: elfomo,
},
};
3 changes: 3 additions & 0 deletions apps/staking/src/publisher-icons/elfomo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions apps/staking/src/publisher-icons/finazon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions contract_manager/store/chains/EvmChains.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,8 @@
type: EvmChain
- id: kakarot_sepolia
mainnet: false
rpcUrl: https://sepolia-rpc-priority.kakarot.org
networkId: 1802203764
rpcUrl: https://rpc-kakarot-sepolia.karnot.xyz/
networkId: 920637907288165
type: EvmChain
- id: berachain_testnet_v2
mainnet: false
Expand Down
6 changes: 3 additions & 3 deletions contract_manager/store/contracts/EvmPriceFeedContracts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,6 @@
- chain: dela_mithreum_deperp_testnet
address: "0xe9d69CdD6Fe41e7B621B4A688C5D1a68cB5c8ADc"
type: EvmPriceFeedContract
- chain: kakarot_sepolia
address: "0xD458261E832415CFd3BAE5E416FdF3230ce6F134"
type: EvmPriceFeedContract
- chain: berachain_testnet_v2
address: "0x2880aB155794e7179c9eE2e38200202908C17B43"
type: EvmPriceFeedContract
Expand Down Expand Up @@ -403,3 +400,6 @@
- chain: unichain_sepolia
address: "0x2880aB155794e7179c9eE2e38200202908C17B43"
type: EvmPriceFeedContract
- chain: kakarot_sepolia
address: "0xe9d69CdD6Fe41e7B621B4A688C5D1a68cB5c8ADc"
type: EvmPriceFeedContract
6 changes: 3 additions & 3 deletions contract_manager/store/contracts/EvmWormholeContracts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,6 @@
- chain: sei_evm_mainnet
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
type: EvmWormholeContract
- chain: kakarot_sepolia
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
type: EvmWormholeContract
- chain: dela_mithreum_deperp_testnet
address: "0x66E9cBa5529824a03B5Bc9931d9c63637101D0F7"
type: EvmWormholeContract
Expand Down Expand Up @@ -400,3 +397,6 @@
- chain: unichain_sepolia
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
type: EvmWormholeContract
- chain: kakarot_sepolia
address: "0xb27e5ca259702f209a29225d0eDdC131039C9933"
type: EvmWormholeContract
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
flake-utils.lib.eachDefaultSystem
(
system: let
nodejs-overlay = _: prev: {
nodejs = prev.nodejs_18;
};

cli-overlay = _: prev: {
cli = let
pnpm = "${prev.pnpm}/bin/pnpm i && ${prev.pnpm}/bin/pnpm";
Expand Down Expand Up @@ -48,7 +44,7 @@

pkgs = import nixpkgs {
inherit system;
overlays = [mkCli.overlays.default cli-overlay nodejs-overlay];
overlays = [mkCli.overlays.default cli-overlay];
config = {};
};
in {
Expand All @@ -63,6 +59,7 @@
pkgs.pnpm
pkgs.pre-commit
pkgs.python3
pkgs.python3Packages.distutils
];
};
}
Expand Down
15 changes: 14 additions & 1 deletion governance/pyth_staking_sdk/src/pyth-staking-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,20 @@ export class PythStakingClient {
stakeAccountPositions: PublicKey,
amount: bigint,
) {
const instructions = [];
const globalConfig = await this.getGlobalConfig();
const instructions: TransactionInstruction[] = [];

if (!(await this.hasGovernanceRecord(globalConfig))) {
await withCreateTokenOwnerRecord(
instructions,
GOVERNANCE_ADDRESS,
PROGRAM_VERSION_V2,
globalConfig.pythGovernanceRealm,
this.wallet.publicKey,
globalConfig.pythTokenMint,
this.wallet.publicKey,
);
}

if (!(await this.hasJoinedDaoLlc(stakeAccountPositions))) {
instructions.push(
Expand Down
4 changes: 2 additions & 2 deletions governance/xc_admin/packages/xc_admin_cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
},
"dependencies": {
"@coral-xyz/anchor": "^0.29.0",
"@ledgerhq/hw-transport": "^6.27.10",
"@ledgerhq/hw-transport-node-hid": "^6.27.10",
"@ledgerhq/hw-transport": "^6.31.4",
"@ledgerhq/hw-transport-node-hid": "^6.29.5",
"@pythnetwork/client": "^2.22.0",
"@pythnetwork/pyth-solana-receiver": "workspace:*",
"@pythnetwork/solana-utils": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion governance/xc_admin/packages/xc_admin_cli/src/ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ async function send(
buffer
);
if (response.length !== 2)
throw TransportStatusError(StatusCodes.INCORRECT_DATA);
throw new TransportStatusError(StatusCodes.INCORRECT_DATA);

p2 |= P2_EXTEND;
offset += MAX_PAYLOAD;
Expand Down
3 changes: 3 additions & 0 deletions governance/xc_admin/packages/xc_admin_frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "@pythnetwork/xc-admin-frontend",
"version": "0.1.0",
"private": true,
"engines": {
"node": "20"
},
"scripts": {
"dev": "next dev",
"build": "next build",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"private": true,
"packageManager": "pnpm@9.2.0",
"packageManager": "pnpm@9.12.1",
"engines": {
"node": "^18.19.1",
"pnpm": "^9.2.0"
"node": "^20.17.0",
"pnpm": "^9.12.1"
},
"devDependencies": {
"lerna": "^6.4.1",
Expand Down
Loading

0 comments on commit 28f8970

Please sign in to comment.