Skip to content

Commit

Permalink
Update send-transaction-l1-l2.md (matter-labs#642)
Browse files Browse the repository at this point in the history
Co-authored-by: Antonio <[email protected]>
  • Loading branch information
ianklatzco and uF4No authored Aug 3, 2023
1 parent 7e0239d commit b967c22
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/dev/how-to/send-transaction-l1-l2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Send an L1 to L2 transaction

The [zkSync Era smart contracts](https://github.com/matter-labs/zksync-2-contracts/tree/main/ethereum/contracts/zksync) allow the sender to request transactions on Ethereum L1 and pass data to zkSync Era L2.
The [zkSync Era smart contracts](https://github.com/matter-labs/era-contracts/tree/main/ethereum/contracts/zksync) allow the sender to request transactions on Ethereum L1 and pass data to zkSync Era L2.

## Common use cases

Expand All @@ -13,7 +13,7 @@ Along with zkSync Era's built-in censorship resistance that requires multi-layer

1. Import the zkSync Era library or contract containing the required functionality.

The import gives access to the [`IZkSync.sol`](https://github.com/matter-labs/v2-testnet-contracts/blob/b8449bf9c819098cc8bfee0549ff5094456be51d/l1/contracts/zksync/interfaces/IZkSync.sol#L4) inherited interfaces that include the gas estimation functionality.
The import gives access to the [`IZkSync.sol`](https://github.com/matter-labs/era-contracts/blob/b8449bf9c819098cc8bfee0549ff5094456be51d/l1/contracts/zksync/interfaces/IZkSync.sol#L4) inherited interfaces that include the gas estimation functionality.

Import the contracts with yarn (recommended), or [download the contracts](https://github.com/matter-labs/v2-testnet-contracts) from the repo.

Expand Down Expand Up @@ -109,7 +109,7 @@ Along with zkSync Era's built-in censorship resistance that requires multi-layer

:::

5. Get the base cost by calling the [`l2TransactionBaseCost`](https://github.com/matter-labs/v2-testnet-contracts/blob/b8449bf9c819098cc8bfee0549ff5094456be51d/l1/contracts/zksync/interfaces/IMailbox.sol#L129) function with:
5. Get the base cost by calling the [`l2TransactionBaseCost`](https://github.com/matter-labs/era-contracts/blob/3a4506522aaef81485d8abb96f5a6394bd2ba69e/ethereum/contracts/zksync/interfaces/IMailbox.sol#L130) function with:

- The gas price returned at step 2 as `_gasPrice`.
- The gas value returned at step 3 as `_l2GasLimit`.
Expand Down Expand Up @@ -161,7 +161,7 @@ Along with zkSync Era's built-in censorship resistance that requires multi-layer
}
```

7. Send the transaction, including the gas price and base cost in the value parameters, by calling the [`requestL2Transaction`](https://github.com/matter-labs/v2-testnet-contracts/blob/b8449bf9c819098cc8bfee0549ff5094456be51d/l1/contracts/zksync/interfaces/IMailbox.sol#L119) function.
7. Send the transaction, including the gas price and base cost in the value parameters, by calling the [`requestL2Transaction`](https://github.com/matter-labs/era-contracts/blob/3a4506522aaef81485d8abb96f5a6394bd2ba69e/ethereum/contracts/zksync/interfaces/IMailbox.sol#L120) function.

Include the gas limit value from step 3 as `_l2GasLimit` and the `REQUIRED_L1_TO_L2_GAS_PER_PUBDATA_LIMIT` constant as `_l2GasPerPubdataByteLimit`.

Expand Down

0 comments on commit b967c22

Please sign in to comment.