Skip to content

Commit 2d9625d

Browse files
authored
Merge branch 'pyth-network:main' into main
2 parents 64d4c90 + cf5a70f commit 2d9625d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2680
-5411
lines changed

.github/workflows/ci-turbo-build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,17 @@ jobs:
2626
# precompiled binary isn't found.
2727
- name: Install libusb
2828
run: sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev libudev-dev
29+
# Install Foundry for Ethereum contract builds
30+
- name: Install Foundry
31+
uses: foundry-rs/foundry-toolchain@v1
32+
with:
33+
version: v0.3.0
2934
- uses: pnpm/action-setup@v4
3035
name: Install pnpm
3136
with:
3237
run_install: true
38+
- name: Install Forge dependencies
39+
run: cd target_chains/ethereum/contracts && pnpm run install-forge-deps
3340
- name: Cache for Turbo
3441
uses: rharkor/[email protected]
3542
- name: Build

.github/workflows/ci-turbo-test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v4
20+
- uses: actions-rust-lang/setup-rust-toolchain@v1
2021
- uses: actions/setup-node@v4
2122
with:
2223
node-version-file: "package.json"
@@ -25,10 +26,17 @@ jobs:
2526
# precompiled binary isn't found.
2627
- name: Install libusb
2728
run: sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev libudev-dev
29+
# Install Foundry for Ethereum contract tests
30+
- name: Install Foundry
31+
uses: foundry-rs/foundry-toolchain@v1
32+
with:
33+
version: v0.3.0
2834
- uses: pnpm/action-setup@v4
2935
name: Install pnpm
3036
with:
3137
run_install: true
38+
- name: Install Forge dependencies
39+
run: cd target_chains/ethereum/contracts && pnpm run install-forge-deps
3240
- name: Cache for Turbo
3341
uses: rharkor/[email protected]
3442
- name: Test

.github/workflows/publish-js.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ jobs:
99
name: Publish Javascript Packages to NPM
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
13+
- uses: actions-rust-lang/setup-rust-toolchain@v1
1314
- uses: actions/setup-node@v4
1415
with:
1516
node-version-file: "package.json"
@@ -18,10 +19,17 @@ jobs:
1819
# precompiled binary isn't found.
1920
- name: Install libusb
2021
run: sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev libudev-dev
22+
# Install Foundry for Ethereum contract builds
23+
- name: Install Foundry
24+
uses: foundry-rs/foundry-toolchain@v1
25+
with:
26+
version: v0.3.0
2127
- uses: pnpm/action-setup@v4
2228
name: Install pnpm
2329
with:
2430
run_install: true
31+
- name: Install Forge dependencies
32+
run: cd target_chains/ethereum/contracts && pnpm run install-forge-deps
2533
- name: Set publishing config
2634
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
2735
env:

Cargo.lock

Lines changed: 13 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/api-reference/src/apis/evm/update-price-feeds-if-necessary.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const updatePriceFeedsIfNecessary = writeApi<
3838
### Error Response
3939
4040
The above method can return the following error response:
41-
- \`NoFreshUpdate\`: The provided update is not fresh enough to apply. It means the provided \`publishTime\` is not equal to corresponding corresponding price id in \`updateData\`.
41+
- \`NoFreshUpdate\`: The provided update is not fresh enough to apply. It means the provided \`publishTime\` is not equal to corresponding price id in \`updateData\`.
4242
- \`InvalidUpdateData\`: The provided update data is invalid or incorrectly signed.
4343
- \`InsufficientFee\`: The fee provided is less than the required fee. Try calling [getUpdateFee](getUpdateFee) to get the required fee.
4444
`,

apps/developer-hub/next-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference path="./.next/types/routes.d.ts" />
34

45
// NOTE: This file should not be edited
56
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

apps/insights/next-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference path="./.next/types/routes.d.ts" />
34

45
// NOTE: This file should not be edited
56
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

apps/pyth-lazer-agent/config/config.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ relayer_urls = ["wss://relayer-0.pyth-lazer.dourolabs.app/v1/transaction", "wss:
22
publish_keypair_path = "/path/to/solana/id.json"
33
listen_address = "0.0.0.0:8910"
44
publish_interval_duration = "25ms"
5-
authorization_token = "token1"
65
enable_update_deduplication = true
6+
# Publishers with existing tokens may still need to provide them. Please confirm with the Lazer team.
7+
# New publishers will not need this line.
8+
# authorization_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-pblr"

contract_manager/scripts/common.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ export async function deployIfNotCached(
3535
const key = cacheKey ?? `${chain.getId()}-${artifactName}`;
3636
return runIfNotCached(key, async () => {
3737
const artifact = JSON.parse(
38-
readFileSync(join(config.jsonOutputDir, `${artifactName}.json`), "utf8"),
38+
readFileSync(
39+
join(
40+
config.jsonOutputDir,
41+
`${artifactName}.sol`,
42+
`${artifactName}.json`,
43+
),
44+
"utf8",
45+
),
3946
);
4047

4148
// Handle bytecode which can be either a string or an object with an 'object' property
@@ -74,7 +81,10 @@ export function getWeb3Contract(
7481
address: string,
7582
): Contract {
7683
const artifact = JSON.parse(
77-
readFileSync(join(jsonOutputDir, `${artifactName}.json`), "utf8"),
84+
readFileSync(
85+
join(jsonOutputDir, `${artifactName}.sol`, `${artifactName}.json`),
86+
"utf8",
87+
),
7888
);
7989
const web3 = new Web3();
8090
return new web3.eth.Contract(artifact["abi"], address);
@@ -84,7 +94,7 @@ export const COMMON_DEPLOY_OPTIONS = {
8494
"std-output-dir": {
8595
type: "string",
8696
demandOption: true,
87-
desc: "Path to the standard JSON output of the contracts (build artifact) directory",
97+
desc: "Path to the Foundry output directory (contains Contract.sol/Contract.json structure)",
8898
},
8999
"private-key": {
90100
type: "string",

contract_manager/scripts/deploy_evm_lazer_contracts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ export async function main() {
323323
console.log(`\n✅ Contract deployed at: ${deployedAddress}`);
324324
console.log(`Trusted signer updated: ${argv["update-signer"]}`);
325325
console.log(
326-
`Expires at: ${new Date(argv["expires-at"]! * 1000).toISOString()}`,
326+
`Expires at: ${new Date((argv["expires-at"] ?? 0) * 1000).toISOString()}`,
327327
);
328328
} else if (argv.deploy) {
329329
console.log(`Contract deployed at ${deployedAddress}`);

0 commit comments

Comments
 (0)