Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Multiplying the value obtained from `eth_estimateGas` by the child chain gas pri

Alternatively, to obtain the gas limit for your transaction, you can call `NodeInterface.gasEstimateComponents()` and then use the first result, which is `gasEstimate`. Next, to find the total cost, you need to multiply this amount by the child chain gas price, which is available in the third result, `baseFee`.

Note that when working with parent to child chain messages (also known as [retryable tickets](/how-arbitrum-works/10-l1-to-l2-messaging.mdx)), you can use the function [`L1ToL2MessageGasEstimator.estimateAll()`](https://github.com/OffchainLabs/arbitrum-sdk/blob/main/src/lib/message/L1ToL2MessageGasEstimator.ts#L215) of the Arbitrum SDK or [`NodeInterface.estimateRetryableTicket()`](https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.2@@/nodeInterface/NodeInterface.go#L120) to get all the gas information needed to send a successful transaction.
Note that when working with parent to child chain messages (also known as [retryable tickets](/how-arbitrum-works/10-l1-to-l2-messaging.mdx)), you can use the function [L1ToL2MessageGasEstimator.estimateAll()](https://github.com/OffchainLabs/arbitrum-sdk/blob/main/src/lib/message/L1ToL2MessageGasEstimator.ts#L215) of the Arbitrum SDK or [NodeInterface.estimateRetryableTicket()](https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.1@@/nodeInterface/NodeInterface.go#L120) to get all the gas information needed to send a successful transaction.

## Breaking down the formula

Expand Down
28 changes: 14 additions & 14 deletions arbitrum-docs/build-decentralized-apps/precompiles/02-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,20 @@ This section is divided into two tables. We first list precompiles we expect use
[arbsys_link_interface]: https://github.com/OffchainLabs/@@nitroContractsRepositorySlug=nitro-contracts@@/blob/@@nitroContractsCommit=763bd77906b7677da691eaa31c6e195d455197a4@@/@@nitroContractsPathToPrecompilesInterface=src/precompiles@@/ArbSys.sol
[arbwasm_link_interface]: https://github.com/OffchainLabs/@@nitroContractsRepositorySlug=nitro-contracts@@/blob/@@nitroContractsCommit=763bd77906b7677da691eaa31c6e195d455197a4@@/@@nitroContractsPathToPrecompilesInterface=src/precompiles@@/ArbWasm.sol
[arbwasmcache_link_interface]: https://github.com/OffchainLabs/@@nitroContractsRepositorySlug=nitro-contracts@@/blob/@@nitroContractsCommit=763bd77906b7677da691eaa31c6e195d455197a4@@/@@nitroContractsPathToPrecompilesInterface=src/precompiles@@/ArbWasmCache.sol
[arbaddresstable_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.2@@/@@nitroPathToPrecompiles=precompiles@@/ArbAddressTable.go
[arbaggregator_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.2@@/@@nitroPathToPrecompiles=precompiles@@/ArbAggregator.go
[arbdebug_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.2@@/@@nitroPathToPrecompiles=precompiles@@/ArbDebug.go
[arbfunctiontable_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.2@@/@@nitroPathToPrecompiles=precompiles@@/ArbFunctionTable.go
[arbgasinfo_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.2@@/@@nitroPathToPrecompiles=precompiles@@/ArbGasInfo.go
[arbinfo_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.2@@/@@nitroPathToPrecompiles=precompiles@@/ArbInfo.go
[arbowner_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.2@@/@@nitroPathToPrecompiles=precompiles@@/ArbOwner.go
[arbownerpublic_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.2@@/@@nitroPathToPrecompiles=precompiles@@/ArbOwnerPublic.go
[arbostest_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.2@@/@@nitroPathToPrecompiles=precompiles@@/ArbosTest.go
[arbretryabletx_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.2@@/@@nitroPathToPrecompiles=precompiles@@/ArbRetryableTx.go
[arbstatistics_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.2@@/@@nitroPathToPrecompiles=precompiles@@/ArbStatistics.go
[arbsys_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.2@@/@@nitroPathToPrecompiles=precompiles@@/ArbSys.go
[arbwasm_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.2@@/@@nitroPathToPrecompiles=precompiles@@/ArbWasm.go
[arbwasmcache_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.2@@/@@nitroPathToPrecompiles=precompiles@@/ArbWasmCache.go
[arbaddresstable_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.1@@/@@nitroPathToPrecompiles=precompiles@@/ArbAddressTable.go
[arbaggregator_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.1@@/@@nitroPathToPrecompiles=precompiles@@/ArbAggregator.go
[arbdebug_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.1@@/@@nitroPathToPrecompiles=precompiles@@/ArbDebug.go
[arbfunctiontable_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.1@@/@@nitroPathToPrecompiles=precompiles@@/ArbFunctionTable.go
[arbgasinfo_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.1@@/@@nitroPathToPrecompiles=precompiles@@/ArbGasInfo.go
[arbinfo_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.1@@/@@nitroPathToPrecompiles=precompiles@@/ArbInfo.go
[arbowner_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.1@@/@@nitroPathToPrecompiles=precompiles@@/ArbOwner.go
[arbownerpublic_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.1@@/@@nitroPathToPrecompiles=precompiles@@/ArbOwnerPublic.go
[arbostest_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.1@@/@@nitroPathToPrecompiles=precompiles@@/ArbosTest.go
[arbretryabletx_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.1@@/@@nitroPathToPrecompiles=precompiles@@/ArbRetryableTx.go
[arbstatistics_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.1@@/@@nitroPathToPrecompiles=precompiles@@/ArbStatistics.go
[arbsys_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.1@@/@@nitroPathToPrecompiles=precompiles@@/ArbSys.go
[arbwasm_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.1@@/@@nitroPathToPrecompiles=precompiles@@/ArbWasm.go
[arbwasmcache_link_implementation]: https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.5.1@@/@@nitroPathToPrecompiles=precompiles@@/ArbWasmCache.go

## Precompiles reference

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbAddressTable.go#L17"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbAddressTable.go#L17"
target="_blank"
>
Implementation
Expand All @@ -44,7 +44,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbAddressTable.go#L22"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbAddressTable.go#L22"
target="_blank"
>
Implementation
Expand All @@ -66,7 +66,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbAddressTable.go#L27"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbAddressTable.go#L27"
target="_blank"
>
Implementation
Expand All @@ -90,7 +90,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbAddressTable.go#L40"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbAddressTable.go#L40"
target="_blank"
>
Implementation
Expand All @@ -112,7 +112,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbAddressTable.go#L52"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbAddressTable.go#L52"
target="_blank"
>
Implementation
Expand All @@ -134,7 +134,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbAddressTable.go#L67"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbAddressTable.go#L67"
target="_blank"
>
Implementation
Expand All @@ -156,7 +156,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbAddressTable.go#L73"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbAddressTable.go#L73"
target="_blank"
>
Implementation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbAggregator.go#L24"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbAggregator.go#L24"
target="_blank"
>
Implementation
Expand All @@ -44,7 +44,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbAggregator.go#L30"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbAggregator.go#L30"
target="_blank"
>
Implementation
Expand All @@ -66,7 +66,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbAggregator.go#L35"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbAggregator.go#L35"
target="_blank"
>
Implementation
Expand All @@ -88,13 +88,13 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbAggregator.go#L40"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbAggregator.go#L40"
target="_blank"
>
Implementation
</a>
</td>
<td>Adds additional batch poster address</td>
<td>Adds newBatchPoster as a batch poster</td>
</tr>
<tr>
<td>
Expand All @@ -110,7 +110,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbAggregator.go#L63"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbAggregator.go#L63"
target="_blank"
>
Implementation
Expand All @@ -132,7 +132,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbAggregator.go#L72"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbAggregator.go#L72"
target="_blank"
>
Implementation
Expand All @@ -157,13 +157,13 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbAggregator.go#L95"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbAggregator.go#L95"
target="_blank"
>
Implementation
</a>
</td>
<td>Deprecated: always returns zero</td>
<td>Deprecated: returns 0</td>
</tr>
<tr>
<td>
Expand All @@ -179,13 +179,13 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbAggregator.go#L102"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbAggregator.go#L102"
target="_blank"
>
Implementation
</a>
</td>
<td>Deprecated: no-op</td>
<td>Deprecated: does nothing</td>
</tr>
</tbody>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbDebug.go#L58"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbDebug.go#L58"
target="_blank"
>
Implementation
Expand All @@ -44,13 +44,13 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbDebug.go#L28"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbDebug.go#L28"
target="_blank"
>
Implementation
</a>
</td>
<td>Emits events with values based on the args provided</td>
<td>Emit events with values based on the args provided</td>
</tr>
<tr>
<td>
Expand All @@ -66,7 +66,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbDebug.go#L47"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbDebug.go#L47"
target="_blank"
>
Implementation
Expand All @@ -88,7 +88,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbDebug.go#L53"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbDebug.go#L53"
target="_blank"
>
Implementation
Expand All @@ -110,7 +110,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbDebug.go#L63"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbDebug.go#L63"
target="_blank"
>
Implementation
Expand All @@ -132,7 +132,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbDebug.go#L68"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbDebug.go#L68"
target="_blank"
>
Implementation
Expand Down Expand Up @@ -166,7 +166,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbDebug.go#L33"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbDebug.go#L33"
target="_blank"
>
Implementation
Expand All @@ -190,7 +190,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbDebug.go#L38"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbDebug.go#L38"
target="_blank"
>
Implementation
Expand All @@ -214,7 +214,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbDebug.go#L0"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbDebug.go#L0"
target="_blank"
>
Implementation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbFunctionTable.go#L19"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbFunctionTable.go#L19"
target="_blank"
>
Implementation
Expand All @@ -44,7 +44,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbFunctionTable.go#L24"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbFunctionTable.go#L24"
target="_blank"
>
Implementation
Expand All @@ -66,7 +66,7 @@
</td>
<td>
<a
href="https://github.com/OffchainLabs/nitro/blob/v3.5.2/precompiles/ArbFunctionTable.go#L29"
href="https://github.com/OffchainLabs/nitro/blob/v3.5.1/precompiles/ArbFunctionTable.go#L29"
target="_blank"
>
Implementation
Expand Down
Loading