near-gas is crate for work with gas data in near-protocol.
The crate includes NearGas type and constructors for converting data as NearGas and as u64 type values.
```rust use near_gas::{NearGas};
fn main() {
let data = "12.657 TGas";
let neargas = NearGas::fromstr(data);
let gas = neargas.asgas(); assert_eq!(gas, 12657000000000);
let gigagas = neargas.asggas(); asserteq!(giga_gas, 12657); } ```
On every transaction you send to the network NEAR charges you a fee (aka gas fee). This fee is used to indirectly pay the people that keep the network infrastructure, and to incentivize developers of smart contracts. [For more information].
[Gas usege in Near Protocol]
This project is licensed under the [MIT license] and [Apache-2.0 license].