Skip to content
Open
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
2 changes: 1 addition & 1 deletion docs/arbitrum-essentials/how-to-estimate-gas.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Multiplying the value from `eth_estimateGas` by the child chain gas price gives

Alternatively, call `NodeInterface.gasEstimateComponents()` and use the first result (`gasEstimate`) as your gas limit. Multiply by the third result (`baseFee`) to get the total cost. For background on `NodeInterface` itself, see the [NodeInterface overview](/arbitrum-essentials/nodeinterface/overview.mdx).

Note that when working with [parent to child chain messages](/arbitrum-essentials/bridging/cross-chain-messaging.mdx) (also known as [retryable tickets](/how-arbitrum-works/deep-dives/l1-to-l2-messaging.mdx)), you can use the function [`ParentToChildMessageGasEstimator.estimateAll()`](https://github.com/OffchainLabs/arbitrum-sdk/blob/main/packages/sdk/src/lib/message/ParentToChildMessageGasEstimator.ts) of the Arbitrum SDK or [`NodeInterface.estimateRetryableTicket()`](https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.11.0@@/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](/arbitrum-essentials/bridging/cross-chain-messaging.mdx) (also known as [retryable tickets](/how-arbitrum-works/deep-dives/l1-to-l2-messaging.mdx)), you can use the function [`ParentToChildMessageGasEstimator.estimateAll()`](https://github.com/OffchainLabs/arbitrum-sdk/blob/main/packages/sdk/src/lib/message/ParentToChildMessageGasEstimator.ts) of the Arbitrum SDK or [`NodeInterface.estimateRetryableTicket()`](https://github.com/OffchainLabs/@@nitroRepositorySlug=nitro@@/blob/@@nitroVersionTag=v3.11.1@@/nodeInterface/NodeInterface.go#L120) to get all the gas information needed to send a successful transaction.

## The fee formula

Expand Down
2 changes: 1 addition & 1 deletion docs/arbitrum-essentials/nodeinterface/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ displayed_sidebar: arbitrumEssentialsSidebar

<!-- todo: remove this doc, redirect to existing ref doc -->

The Arbitrum Nitro software includes a special `NodeInterface` contract available at address `0xc8` that is only accessible via [RPCs](/arbitrum-essentials/arbitrum-vs-ethereum/rpc-methods.mdx) (it's not actually deployed onchain and thus can't be called by smart contracts). The way it works is that the node uses Geth's [`InterceptRPCMessage`](https://github.com/OffchainLabs/go-ethereum/blob/@@goEthereumCommit=0f618f330b8d78457524839997f0041d86f3cd1a@@/internal/ethapi/api.go#L1034) hook to detect messages sent to the address `0xc8`, and swaps out the message it's handling before deriving a transaction from it.
The Arbitrum Nitro software includes a special `NodeInterface` contract available at address `0xc8` that is only accessible via [RPCs](/arbitrum-essentials/arbitrum-vs-ethereum/rpc-methods.mdx) (it's not actually deployed onchain and thus can't be called by smart contracts). The way it works is that the node uses Geth's [`InterceptRPCMessage`](https://github.com/OffchainLabs/go-ethereum/blob/@@goEthereumCommit=f3a977ddf30b138da2fe673ac5cbff2bc6dd4c88@@/internal/ethapi/api.go#L1034) hook to detect messages sent to the address `0xc8`, and swaps out the message it's handling before deriving a transaction from it.

The [reference page](/arbitrum-essentials/nodeinterface/reference.mdx) contains information about all methods available in the `NodeInterface`.
58 changes: 29 additions & 29 deletions docs/arbitrum-essentials/precompiles/reference.mdx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<code>addressExists(address addr)</code>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/9056310e554d04829bc590d4ba7e17d40d0a9635/ArbAddressTable.sol#L17" target="_blank">
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/7e88c8cc53c2e96201a23c638f1536557b9cb68b/ArbAddressTable.sol#L17" target="_blank">
Interface
</a>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.0/precompiles/ArbAddressTable.go#L17" target="_blank">
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.1/precompiles/ArbAddressTable.go#L17" target="_blank">
Implementation
</a>
</td>
Expand All @@ -29,12 +29,12 @@
<code>compress(address addr)</code>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/9056310e554d04829bc590d4ba7e17d40d0a9635/ArbAddressTable.sol#L26" target="_blank">
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/7e88c8cc53c2e96201a23c638f1536557b9cb68b/ArbAddressTable.sol#L26" target="_blank">
Interface
</a>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.0/precompiles/ArbAddressTable.go#L22" target="_blank">
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.1/precompiles/ArbAddressTable.go#L22" target="_blank">
Implementation
</a>
</td>
Expand All @@ -45,12 +45,12 @@
<code>decompress(bytes calldata buf, uint256 offset)</code>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/9056310e554d04829bc590d4ba7e17d40d0a9635/ArbAddressTable.sol#L36" target="_blank">
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/7e88c8cc53c2e96201a23c638f1536557b9cb68b/ArbAddressTable.sol#L36" target="_blank">
Interface
</a>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.0/precompiles/ArbAddressTable.go#L27" target="_blank">
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.1/precompiles/ArbAddressTable.go#L27" target="_blank">
Implementation
</a>
</td>
Expand All @@ -61,12 +61,12 @@
<code>lookup(address addr)</code>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/9056310e554d04829bc590d4ba7e17d40d0a9635/ArbAddressTable.sol#L45" target="_blank">
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/7e88c8cc53c2e96201a23c638f1536557b9cb68b/ArbAddressTable.sol#L45" target="_blank">
Interface
</a>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.0/precompiles/ArbAddressTable.go#L40" target="_blank">
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.1/precompiles/ArbAddressTable.go#L40" target="_blank">
Implementation
</a>
</td>
Expand All @@ -77,12 +77,12 @@
<code>lookupIndex(uint256 index)</code>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/9056310e554d04829bc590d4ba7e17d40d0a9635/ArbAddressTable.sol#L53" target="_blank">
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/7e88c8cc53c2e96201a23c638f1536557b9cb68b/ArbAddressTable.sol#L53" target="_blank">
Interface
</a>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.0/precompiles/ArbAddressTable.go#L52" target="_blank">
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.1/precompiles/ArbAddressTable.go#L52" target="_blank">
Implementation
</a>
</td>
Expand All @@ -93,12 +93,12 @@
<code>register(address addr)</code>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/9056310e554d04829bc590d4ba7e17d40d0a9635/ArbAddressTable.sol#L62" target="_blank">
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/7e88c8cc53c2e96201a23c638f1536557b9cb68b/ArbAddressTable.sol#L62" target="_blank">
Interface
</a>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.0/precompiles/ArbAddressTable.go#L67" target="_blank">
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.1/precompiles/ArbAddressTable.go#L67" target="_blank">
Implementation
</a>
</td>
Expand All @@ -109,12 +109,12 @@
<code>size()</code>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/9056310e554d04829bc590d4ba7e17d40d0a9635/ArbAddressTable.sol#L69" target="_blank">
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/7e88c8cc53c2e96201a23c638f1536557b9cb68b/ArbAddressTable.sol#L69" target="_blank">
Interface
</a>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.0/precompiles/ArbAddressTable.go#L73" target="_blank">
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.1/precompiles/ArbAddressTable.go#L73" target="_blank">
Implementation
</a>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
⚠️<code>getPreferredAggregator(address addr)</code>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/9056310e554d04829bc590d4ba7e17d40d0a9635/ArbAggregator.sol#L14" target="_blank">
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/7e88c8cc53c2e96201a23c638f1536557b9cb68b/ArbAggregator.sol#L14" target="_blank">
Interface
</a>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.0/precompiles/ArbAggregator.go#L25" target="_blank">
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.1/precompiles/ArbAggregator.go#L25" target="_blank">
Implementation
</a>
</td>
Expand All @@ -29,12 +29,12 @@
⚠️<code>getDefaultAggregator()</code>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/9056310e554d04829bc590d4ba7e17d40d0a9635/ArbAggregator.sol#L20" target="_blank">
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/7e88c8cc53c2e96201a23c638f1536557b9cb68b/ArbAggregator.sol#L20" target="_blank">
Interface
</a>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.0/precompiles/ArbAggregator.go#L32" target="_blank">
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.1/precompiles/ArbAggregator.go#L32" target="_blank">
Implementation
</a>
</td>
Expand All @@ -45,12 +45,12 @@
<code>getBatchPosters()</code>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/9056310e554d04829bc590d4ba7e17d40d0a9635/ArbAggregator.sol#L24" target="_blank">
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/7e88c8cc53c2e96201a23c638f1536557b9cb68b/ArbAggregator.sol#L24" target="_blank">
Interface
</a>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.0/precompiles/ArbAggregator.go#L37" target="_blank">
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.1/precompiles/ArbAggregator.go#L37" target="_blank">
Implementation
</a>
</td>
Expand All @@ -61,12 +61,12 @@
<code>addBatchPoster(address newBatchPoster)</code>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/9056310e554d04829bc590d4ba7e17d40d0a9635/ArbAggregator.sol#L29" target="_blank">
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/7e88c8cc53c2e96201a23c638f1536557b9cb68b/ArbAggregator.sol#L29" target="_blank">
Interface
</a>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.0/precompiles/ArbAggregator.go#L42" target="_blank">
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.1/precompiles/ArbAggregator.go#L42" target="_blank">
Implementation
</a>
</td>
Expand All @@ -77,12 +77,12 @@
<code>getFeeCollector(address batchPoster)</code>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/9056310e554d04829bc590d4ba7e17d40d0a9635/ArbAggregator.sol#L36" target="_blank">
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/7e88c8cc53c2e96201a23c638f1536557b9cb68b/ArbAggregator.sol#L36" target="_blank">
Interface
</a>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.0/precompiles/ArbAggregator.go#L65" target="_blank">
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.1/precompiles/ArbAggregator.go#L65" target="_blank">
Implementation
</a>
</td>
Expand All @@ -93,12 +93,12 @@
<code>setFeeCollector(address batchPoster, address newFeeCollector)</code>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/9056310e554d04829bc590d4ba7e17d40d0a9635/ArbAggregator.sol#L44" target="_blank">
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/7e88c8cc53c2e96201a23c638f1536557b9cb68b/ArbAggregator.sol#L44" target="_blank">
Interface
</a>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.0/precompiles/ArbAggregator.go#L74" target="_blank">
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.1/precompiles/ArbAggregator.go#L74" target="_blank">
Implementation
</a>
</td>
Expand All @@ -109,12 +109,12 @@
⚠️<code>getTxBaseFee(address aggregator)</code>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/9056310e554d04829bc590d4ba7e17d40d0a9635/ArbAggregator.sol#L49" target="_blank">
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/7e88c8cc53c2e96201a23c638f1536557b9cb68b/ArbAggregator.sol#L49" target="_blank">
Interface
</a>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.0/precompiles/ArbAggregator.go#L98" target="_blank">
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.1/precompiles/ArbAggregator.go#L98" target="_blank">
Implementation
</a>
</td>
Expand All @@ -125,12 +125,12 @@
⚠️<code>setTxBaseFee(address aggregator, uint256 feeInL1Gas)</code>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/9056310e554d04829bc590d4ba7e17d40d0a9635/ArbAggregator.sol#L59" target="_blank">
<a href="https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/7e88c8cc53c2e96201a23c638f1536557b9cb68b/ArbAggregator.sol#L59" target="_blank">
Interface
</a>
</td>
<td>
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.0/precompiles/ArbAggregator.go#L106" target="_blank">
<a href="https://github.com/OffchainLabs/nitro/blob/v3.11.1/precompiles/ArbAggregator.go#L106" target="_blank">
Implementation
</a>
</td>
Expand Down
Loading
Loading