File tree Expand file tree Collapse file tree 5 files changed +22
-6
lines changed
contract_manager/store/contracts Expand file tree Collapse file tree 5 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 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+ ]
Original file line number Diff line number Diff line change 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+ ]
Original file line number Diff line number Diff 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 (1 n ) + BigInt (updateFee )
81+ calculateUpdatePriceFeedsFee (numUpdates ) + BigInt (updateFee )
7882 );
7983 console .log (" Price feeds updated successfully." );
8084
Original file line number Diff line number Diff line change 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" : {
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" ,
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
1111import { ContractProvider } from "@ton/ton" ;
1212
1313export const PYTH_CONTRACT_ADDRESS_MAINNET =
14- "EQBU6k8HH6yX4Jf3d18swWbnYr31D3PJI7PgjXT-flsKHqql " ;
14+ "EQBgtfuGIzWLiOzpZO48_psYvco4xRtkAbdbmTwy0_o95LtZ " ;
1515export const PYTH_CONTRACT_ADDRESS_TESTNET =
1616 "EQB4ZnrI5qsP_IUJgVJNwEGKLzZWsQOFhiaqDbD7pTt_f9oU" ;
1717// This is defined in target_chains/ton/contracts/common/gas.fc
You can’t perform that action at this time.
0 commit comments