diff --git a/docs/build/massa-web3/utils.mdx b/docs/build/massa-web3/utils.mdx index bcf7bdf5..bcbe50a6 100644 --- a/docs/build/massa-web3/utils.mdx +++ b/docs/build/massa-web3/utils.mdx @@ -23,9 +23,9 @@ const gas = BigInt(2000000); const gas = 2000000n; ``` -- Coins/Fees: expressed in BigInt's. Coins/fees do however have a metric system behind them. The smallest unit is 10**-9 Massa. All coins/fees are to be expressed as integers scaled by 10**9 and this way consumed by the network json-rpc protocol. Since gas/fees are to be used as BigInt's web3 adds in a few convenience utils allowing smaller units (e.g. 0.5 Massa) to be expressed. +- Coins/Fees: expressed in BigInt's. Coins/fees do however have a metric system behind them. The smallest unit is 10\*\*-9 Massa. All coins/fees are to be expressed as integers scaled by 10\*\*9 and this way consumed by the network json-rpc protocol. Since gas/fees are to be used as BigInt's web3 adds in a few convenience utils allowing smaller units (e.g. 0.5 Massa) to be expressed. -The util function `fromMAS` and `toMAS` are used exactly for the latter purpose. `fromMAS` receives any amount of type `number | string | BigNumber | bigint and returns a scaled bigint` for ready use. `toMAS` on the contrary converts any amount from `nanoMassa` to `Massa` and returns a `BigNumber` representing the amount as a decimal. +The util function `fromMAS` and `toMAS` are used exactly for the latter purpose. `fromMAS` receives any amount of type `number | string | BigNumber | bigint` and returns a scaled `bigint` for ready to use. `toMAS` on the contrary converts any amount from `nanoMassa` to `Massa` and returns a `BigNumber` representing the amount as a decimal. Examples: