Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit 3d29c0d

Browse files
authored
feat: describe how to obtain config params (#245)
1 parent d3a1b29 commit 3d29c0d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

pages/ref/core-advanced.mdx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,26 @@ let fwdFee: Int = context().readForwardFee();
3232
fun getConfigParam(id: Int): Cell?;
3333
```
3434

35-
Loads network configuration parameter from the blockchain.
35+
Loads a [configuration parameter](https://docs.ton.org/develop/howto/blockchain-configs) of TON Blockchain by its `id` number.
3636

37-
Usage example:
37+
Usage examples:
3838

3939
```tact
40-
let iDemand: Cell = getConfigParam(0)!!;
40+
// Parameter 0, address of a special smart contract that stores the blockchain's configuration
41+
let configAddrAsCell: Cell = getConfigParam(0)!!;
42+
43+
// Parameter 18, configuration for determining the prices for data storage
44+
let dataStorageFeeConfig: Cell = getConfigParam(18)!!;
4145
```
4246

4347
<Callout>
4448

45-
A standard library [`@stdlib/config`](/ref/stdlib-config) provides two related helper functions:\
49+
Standard library [`@stdlib/config`](/ref/stdlib-config) provides two related helper functions:\
4650
[`getConfigAddress(){:tact}`](/ref/stdlib-config#getconfigaddress) for retrieving config [`Address{:tact}`][p]\
4751
[`getElectorAddress(){:tact}`](/ref/stdlib-config#getconfigaddress) for retrieving elector [`Address{:tact}`][p]
4852

53+
Read more about other parameters: [Config Parameters in TON Docs](https://docs.ton.org/develop/howto/blockchain-configs).
54+
4955
</Callout>
5056

5157
## acceptMessage

0 commit comments

Comments
 (0)