Skip to content

Commit 6344c00

Browse files
authored
chore(target_chains/ton): update contract address (#3143)
1 parent b914d46 commit 6344c00

File tree

5 files changed

+22
-6
lines changed

5 files changed

+22
-6
lines changed

contract_manager/store/contracts/TonPriceFeedContracts.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
},
77
{
88
"chain": "ton_mainnet",
9+
"comment": "This is deprecated, use the new contract address",
910
"address": "EQBU6k8HH6yX4Jf3d18swWbnYr31D3PJI7PgjXT-flsKHqql",
1011
"type": "TonPriceFeedContract"
12+
},
13+
{
14+
"chain": "ton_mainnet",
15+
"address": "EQBgtfuGIzWLiOzpZO48_psYvco4xRtkAbdbmTwy0_o95LtZ",
16+
"type": "TonPriceFeedContract"
1117
}
12-
]
18+
]

contract_manager/store/contracts/TonWormholeContracts.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
},
77
{
88
"chain": "ton_mainnet",
9+
"comment": "This is deprecated, use the new contract address",
910
"address": "EQBU6k8HH6yX4Jf3d18swWbnYr31D3PJI7PgjXT-flsKHqql",
1011
"type": "TonWormholeContract"
12+
},
13+
{
14+
"chain": "ton_mainnet",
15+
"address": "EQBgtfuGIzWLiOzpZO48_psYvco4xRtkAbdbmTwy0_o95LtZ",
16+
"type": "TonWormholeContract"
1117
}
12-
]
18+
]

target_chains/ton/sdk/js/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,13 @@ async function main() {
5757
);
5858
console.log("Hermes BTC price:", latestPriceUpdates.parsed?.[0].price);
5959

60+
const numUpdates = 1; // Only BTC price
6061
const updateData = Buffer.from(latestPriceUpdates.binary.data[0], "hex");
6162
console.log("Update data:", updateData);
6263

64+
// NOTE: As of 2025/10/19 There's a bug with TON Access (https://ton.access.orbs.network) RPC service where if you provide an
65+
// update data buffer with length of more than ~320 then the rpc returns error 404 and the function fails. In this case you can use the
66+
// contract.getSingleUpdateFee() method to get the single update fee and multiply it by the number of updates you want to perform.
6367
const updateFee = await contract.getUpdateFee(updateData);
6468
console.log("Update fee:", updateFee);
6569

@@ -74,7 +78,7 @@ async function main() {
7478
await contract.sendUpdatePriceFeeds(
7579
provider.sender(key.secretKey),
7680
updateData,
77-
calculateUpdatePriceFeedsFee(1n) + BigInt(updateFee)
81+
calculateUpdatePriceFeedsFee(numUpdates) + BigInt(updateFee)
7882
);
7983
console.log("Price feeds updated successfully.");
8084

target_chains/ton/sdk/js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pythnetwork/pyth-ton-js",
3-
"version": "0.1.2",
3+
"version": "0.2.0",
44
"description": "Pyth Network TON Utilities",
55
"homepage": "https://pyth.network",
66
"author": {
@@ -27,7 +27,7 @@
2727
"fix:format": "prettier --write \"src/**/*.ts\"",
2828
"prepublishOnly": "pnpm run build && pnpm run test:lint",
2929
"preversion": "pnpm run test:lint",
30-
"version": "pnpm run format && git add -A src"
30+
"version": "pnpm run test:format && git add -A src"
3131
},
3232
"keywords": [
3333
"pyth",

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_MAINNET =
14-
"EQBU6k8HH6yX4Jf3d18swWbnYr31D3PJI7PgjXT-flsKHqql";
14+
"EQBgtfuGIzWLiOzpZO48_psYvco4xRtkAbdbmTwy0_o95LtZ";
1515
export const PYTH_CONTRACT_ADDRESS_TESTNET =
1616
"EQB4ZnrI5qsP_IUJgVJNwEGKLzZWsQOFhiaqDbD7pTt_f9oU";
1717
// This is defined in target_chains/ton/contracts/common/gas.fc

0 commit comments

Comments
 (0)