This repository was archived by the owner on Dec 12, 2024. It is now read-only.
File tree 1 file changed +10
-4
lines changed 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -32,20 +32,26 @@ let fwdFee: Int = context().readForwardFee();
32
32
fun getConfigParam(id: Int): Cell?;
33
33
```
34
34
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 .
36
36
37
- Usage example :
37
+ Usage examples :
38
38
39
39
``` 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)!!;
41
45
```
42
46
43
47
<Callout >
44
48
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:\
46
50
[ ` getConfigAddress(){:tact} ` ] ( /ref/stdlib-config#getconfigaddress ) for retrieving config [ ` Address{:tact} ` ] [ p ] \
47
51
[ ` getElectorAddress(){:tact} ` ] ( /ref/stdlib-config#getconfigaddress ) for retrieving elector [ ` Address{:tact} ` ] [ p ]
48
52
53
+ Read more about other parameters: [ Config Parameters in TON Docs] ( https://docs.ton.org/develop/howto/blockchain-configs ) .
54
+
49
55
</Callout >
50
56
51
57
## acceptMessage
You can’t perform that action at this time.
0 commit comments