diff --git a/pages/price-feeds/contract-addresses/ton.mdx b/pages/price-feeds/contract-addresses/ton.mdx
index 4c2917e6..755d1ed9 100644
--- a/pages/price-feeds/contract-addresses/ton.mdx
+++ b/pages/price-feeds/contract-addresses/ton.mdx
@@ -2,8 +2,9 @@ import CopyAddress from "../../../components/CopyAddress";
# Price Feed Contract Addresses on TON
-Pyth is currently deployed on TON Testnet.
+Pyth is currently deployed on TON Mainnet and TON Testnet.
| Network | Contract address |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| TON Testnet | |
+| TON Mainnet | |
+| TON Testnet | |
diff --git a/pages/price-feeds/use-real-time-data/ton.mdx b/pages/price-feeds/use-real-time-data/ton.mdx
index 442f855b..2253ccbd 100644
--- a/pages/price-feeds/use-real-time-data/ton.mdx
+++ b/pages/price-feeds/use-real-time-data/ton.mdx
@@ -39,6 +39,7 @@ import { HermesClient } from "@pythnetwork/hermes-client";
import {
PythContract,
PYTH_CONTRACT_ADDRESS_TESTNET,
+ calculateUpdatePriceFeedsFee,
} from "@pythnetwork/pyth-ton-js";
const BTC_PRICE_FEED_ID =
"0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43";
@@ -72,6 +73,8 @@ async function main() {
// Get update fee
const updateFee = await contract.getUpdateFee(updateData);
console.log("Update fee:", updateFee);
+ const totalFee =
+ calculateUpdatePriceFeedsFee(BigInt(updateFee)) + BigInt(updateFee);
// Update price feeds
const mnemonic = "your mnemonic here";
const key = await mnemonicToPrivateKey(mnemonic.split(" "));
@@ -83,7 +86,7 @@ async function main() {
await contract.sendUpdatePriceFeeds(
provider.sender(key.secretKey),
updateData,
- 156000000n + BigInt(updateFee) // 156000000 = 390000 (estimated gas used for the transaction, this is defined in (contracts/common/gas.fc)[https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ton/contracts/common/gas.fc] as UPDATE_PRICE_FEEDS_GAS) * 400 (current settings in basechain are as follows: 1 unit of gas costs 400 nanotons)
+ totalFee
);
console.log("Price feeds updated successfully.");
}