Skip to content

Commit d9198c8

Browse files
committed
update addr
1 parent c18c46d commit d9198c8

File tree

5 files changed

+22
-6
lines changed

5 files changed

+22
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
- chain: ton_testnet
2-
address: "EQC5IXZMoHT1FVOjnBkQpHDoVYWzSvYzvyx5AOPn5ajarzHO"
2+
address: "EQDi9IHGin5GmrJyU5d_dQqjuYC22tshx1dxz9j5_ZGUz74j"
33
type: TonPriceFeedContract
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
- chain: ton_testnet
2-
address: "EQC5IXZMoHT1FVOjnBkQpHDoVYWzSvYzvyx5AOPn5ajarzHO"
2+
address: "EQDi9IHGin5GmrJyU5d_dQqjuYC22tshx1dxz9j5_ZGUz74j"
33
type: TonWormholeContract

target_chains/ton/contracts/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919

2020
### Deploy or run another script
2121

22-
First, visit [TON Center](https://toncenter.com/) and register to get an API key to bypass rate limits. Replace `<YOUR-API-KEY>` with the API key you obtained from TON Center. `<CUSTOM-TYPE>` is either `testnet` or `mainnet`.
22+
First, visit [TON Center](https://toncenter.com/) and register to get an API key to bypass rate limits. Replace `<YOUR-API-KEY>` with the API key you obtained from TON Center. `<CUSTOM-TYPE>` is either `testnet` or `mainnet`. `<CHAIN-ID>` is the chain ID of the chain you want to deploy to.
2323

2424
Then run:
2525

2626
```bash
27-
npx blueprint run --custom https://testnet.toncenter.com/api/v2/jsonRPC --custom-version v2 --custom-type <CUSTOM-TYPE> --custom-key <YOUR-API-KEY>
27+
CHAIN_ID=<CHAIN-ID> npx blueprint run --custom https://testnet.toncenter.com/api/v2/jsonRPC --custom-version v2 --custom-type <CUSTOM-TYPE> --custom-key <YOUR-API-KEY>
2828
```
2929

3030
### Add a new contract

target_chains/ton/contracts/scripts/deployPyth.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,28 @@ export async function run(provider: NetworkProvider) {
2121
},
2222
];
2323

24+
// Require CHAIN_ID environment variable
25+
if (!process.env.CHAIN_ID) {
26+
throw new Error(
27+
"CHAIN_ID environment variable is required. Example usage: CHAIN_ID=2 npx blueprint run ..."
28+
);
29+
}
30+
31+
const chainId = parseInt(process.env.CHAIN_ID, 10);
32+
33+
// Validate that chainId is a valid number
34+
if (isNaN(chainId)) {
35+
throw new Error("CHAIN_ID must be a valid number");
36+
}
37+
38+
console.log("Chain ID:", chainId);
39+
2440
const config: MainConfig = {
2541
singleUpdateFee: SINGLE_UPDATE_FEE,
2642
dataSources: DATA_SOURCES,
2743
guardianSetIndex: 0,
2844
guardianSet: GUARDIAN_SET_0,
29-
chainId: 1,
45+
chainId,
3046
governanceChainId: 1,
3147
governanceContract:
3248
"0000000000000000000000000000000000000000000000000000000000000004",

target_chains/ton/sdk/js/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
import { ContractProvider } from "@ton/ton";
1212

1313
export const PYTH_CONTRACT_ADDRESS_TESTNET =
14-
"EQC5IXZMoHT1FVOjnBkQpHDoVYWzSvYzvyx5AOPn5ajarzHO";
14+
"EQDi9IHGin5GmrJyU5d_dQqjuYC22tshx1dxz9j5_ZGUz74j";
1515
// This is defined in target_chains/ton/contracts/common/gas.fc
1616
export const UPDATE_PRICE_FEEDS_BASE_GAS = 300000n;
1717
export const UPDATE_PRICE_FEEDS_PER_UPDATE_GAS = 90000n;

0 commit comments

Comments
 (0)