docs: update gas documentation after AccountCostIncrease NEP - #3086
Open
jancionear wants to merge 2 commits into
Open
docs: update gas documentation after AccountCostIncrease NEP#3086jancionear wants to merge 2 commits into
jancionear wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates NEAR protocol documentation to reflect NEP-642 changes to gas purchasing/burning/refunds and the increased receipt gas limit (300 Tgas → 1000 Tgas), plus documents the fixed account-creation charge.
Changes:
- Updates gas limit guidance across docs from 300 Tgas to 1000 Tgas.
- Documents “buy price vs burn price” mechanics and how refunds now commonly include a price-difference component.
- Adds/propagates the fixed
0.007Ⓝaccount-creation charge context into relevant sections.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| web3-apps/tutorials/data-types.mdx | Updates recommended attached gas guidance for calls to reflect the higher ceiling. |
| smart-contracts/anatomy/actions.mdx | Adds a note clarifying the fixed account-creation charge and where it’s collected from. |
| protocol/transactions/transaction-execution.mdx | Clarifies refund receipt semantics and links to the new buy/burn explanation. |
| protocol/transactions/meta-tx.mdx | Updates meta-tx refund explanation to match buy vs burn pricing and upfront balance needs. |
| protocol/transactions/gas.mdx | Main update: 1000 Tgas limits, buy vs burn model, refund behavior, and account-creation charge explanation. |
| protocol/storage/storage-staking.mdx | Connects the 770-byte account allowance to the fixed account-creation charge. |
| protocol/accounts-contracts/access-keys.mdx | Updates gas-key behavior to reflect buy/burn and refund mechanics and allowance implications. |
Comments suppressed due to low confidence (2)
protocol/transactions/gas.mdx:71
- This example says “At the minimum gas price (0.0001Ⓝ/Tgas) … buying 100Tgas deducts 0.1Ⓝ”, but 0.1Ⓝ corresponds to the purchase floor of 0.001Ⓝ/Tgas (per NEP-642), not 0.0001Ⓝ/Tgas. Reword to make it explicit which price is used for buying vs burning so the math isn’t confusing.
<Tip>
At the minimum gas price (`0.0001Ⓝ` per `Tgas`), buying `100Tgas` deducts `0.1Ⓝ` from your balance. If the transaction burns `50Tgas`, you get `0.095Ⓝ` back: `0.05Ⓝ` for the gas you didn't use, and `0.045Ⓝ` for the price difference on the gas you did. You paid `0.005Ⓝ`, exactly what those `50Tgas` are worth at the gas price.
</Tip>
protocol/transactions/gas.mdx:81
- The “Cost for Common Actions” intro says the fees are calculated at the minimum gas price (0.0001Ⓝ/Tgas), but
Create Account***now includes a fixed0.007Ⓝcharge (plus small send fees), so it’s not purely derived fromgas_price * Tgas. Calling out the exception in this sentence would prevent confusion.
| Create Account*** | 7.92 | 0.00707 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NEP-642 (Accoun Cost Increase) changed how gas buying, burning and refunds works. Let's update the documentation to reflect these changes.
I also noticed that the docs still talk about a 300 TGas gas limit on receipts, this was recently increased to 1PGas, so I updated the docs, changing 300 TGas to 1000 TGas.