Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gas docs to EVM #182

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions evm/10_quick-start/01_introduction.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
---
title: Introduction
---

Take advantage of the EOS Network's high throughput and low latency by deploying and running
smart contracts written for the EVM on the EOS Network.

## Overview
---

EOS EVM is a fully compatible Ethereum Virtual Machine (EVM) that runs on the EOS Network. This opens
up the EOS Network to the entire Ethereum developer community and tooling.

You can now take advantage of the EOS Network's high throughput and low latency by deploying and running
smart contracts written for the EVM on the EOS Network.

## Features

- Fully compatible with the Ethereum Virtual Machine (EVM)
Expand Down
16 changes: 16 additions & 0 deletions evm/15_core-concepts/02_gas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Gas
---

In an EVM, **gas** is the unit of measurement for the amount of work that a transaction or contract execution requires.
Every transaction that modifies the state of the blockchain must pay a fee in gas.

Each operation (or `opcode`) has a fixed gas cost. You can see a list of all of the `opcodes` and their gas costs
on [EVM Codes](https://www.evm.codes/).

- The gas **required** is the sum of the gas costs of all `opcodes` that it performs.
- The gas **fee** is calculated by multiplying the amount of gas required by the current gas price.

If the transaction runs out of gas before it completes, then the transaction will fail and all changes will be reverted,
but the gas spent will not be refunded.

4 changes: 4 additions & 0 deletions evm/15_core-concepts/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Core Concepts
sidebar_class_name: sidebarhidden
---