Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
docs: updated era-contracts links (#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
benceharomi authored Jan 2, 2024
1 parent b3db944 commit 558b5ef
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/api/go/paymaster-utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The [paymaster utilities library](https://github.com/zksync-sdk/zksync2-go/blob/
### `IPaymasterFlow`

Constant ABI definition for
the [Paymaster Flow Interface](https://github.com/matter-labs/era-contracts/blob/36fe0fd11aeb2cfe88139e7e09d59a25366668d6/zksync/contracts/interfaces/IPaymasterFlow.sol).
the [Paymaster Flow Interface](https://github.com/matter-labs/era-contracts/blob/87cd8d7b0f8c02e9672c0603a821641a566b5dd8/l2-contracts/contracts/interfaces/IPaymasterFlow.sol).

```go
IPaymasterFlow := abi.JSON(strings.NewReader(paymasterflow.IPaymasterFlowMetaData.ABI));
Expand Down
2 changes: 1 addition & 1 deletion docs/api/js/paymaster-utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The [paymaster utilities library](https://github.com/zksync-sdk/zksync-ethers/bl
- This method is deprecated in favor of [utils.PAYMASTER_FLOW_ABI](./utils.md#paymasterflow).
:::

Constant ABI definition for the [Paymaster Flow Interface](https://github.com/matter-labs/era-contracts/blob/36fe0fd11aeb2cfe88139e7e09d59a25366668d6/zksync/contracts/interfaces/IPaymasterFlow.sol).
Constant ABI definition for the [Paymaster Flow Interface](https://github.com/matter-labs/era-contracts/blob/87cd8d7b0f8c02e9672c0603a821641a566b5dd8/l2-contracts/contracts/interfaces/IPaymasterFlow.sol).

```typescript
export const IPaymasterFlow = new ethers.utils.Interface(require("../../abi/IPaymasterFlow.json").abi);
Expand Down
2 changes: 1 addition & 1 deletion docs/api/js/zksync2-js/paymaster-utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The [paymaster utilities library](https://github.com/zksync-sdk/zksync-ethers/bl
:::

Constant ABI definition for
the [Paymaster Flow Interface](https://github.com/matter-labs/era-contracts/blob/36fe0fd11aeb2cfe88139e7e09d59a25366668d6/zksync/contracts/interfaces/IPaymasterFlow.sol).
the [Paymaster Flow Interface](https://github.com/matter-labs/era-contracts/blob/87cd8d7b0f8c02e9672c0603a821641a566b5dd8/l2-contracts/contracts/interfaces/IPaymasterFlow.sol).

```typescript
export const IPaymasterFlow = new ethers.utils.Interface(require("../abi/IPaymasterFlow.json").abi);
Expand Down
2 changes: 1 addition & 1 deletion docs/api/python/paymaster-utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The [paymaster utilities library](https://github.com/zksync-sdk/zksync2-go/blob/
### `PaymasterFlowEncoder`

Constant ABI definition for
the [Paymaster Flow Interface](https://github.com/matter-labs/era-contracts/blob/36fe0fd11aeb2cfe88139e7e09d59a25366668d6/zksync/contracts/interfaces/IPaymasterFlow.sol).
the [Paymaster Flow Interface](https://github.com/matter-labs/era-contracts/blob/87cd8d7b0f8c02e9672c0603a821641a566b5dd8/l2-contracts/contracts/interfaces/IPaymasterFlow.sol).

```python
encoder = PaymasterFlowEncoder(zk_web3)
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/how-to/estimate-gas.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ To estimate gas for an L1 to L2 transaction, first gather the required values:

2. Call the [`zks_estimateGasL1ToL2`](../../api/api.md#zks-estimategasl1tol2) method, passing the transaction data. This returns the estimated amount of L2 gas the transaction requires; commonly called **gas limit** or similar in our code and docs.

- Apply an alias to the addresses in the request if the sender address is a contract. If the sender is an EOA, no aliasing is required. This is implemented by the [`applyL1ToL2Alias`](https://github.com/matter-labs/era-contracts/blob/41c25aa16d182f757c3fed1463c78a81896f65e6/ethereum/contracts/vendor/AddressAliasHelper.sol#L28) Solidity function.
- Apply an alias to the addresses in the request if the sender address is a contract. If the sender is an EOA, no aliasing is required. This is implemented by the [`applyL1ToL2Alias`](https://github.com/matter-labs/era-contracts/blob/87cd8d7b0f8c02e9672c0603a821641a566b5dd8/l1-contracts/contracts/vendor/AddressAliasHelper.sol#L28) Solidity function.

3. Call the [`l2TransactionBaseCost`](https://github.com/matter-labs/v2-testnet-contracts/blob/b8449bf9c819098cc8bfee0549ff5094456be51d/l1/contracts/zksync/interfaces/IMailbox.sol#L129) function, passing the gas price and gas limit from previous steps. This function returns the base cost required to send a transaction.

Expand Down
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
Expand Up @@ -7,7 +7,7 @@ head:

# Send an L1 to L2 transaction

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.
The [zkSync Era smart contracts](https://github.com/matter-labs/era-contracts/tree/main/l1-contracts/contracts/zksync) allow the sender to request transactions on Ethereum L1 and pass data to zkSync Era L2.

## Common use cases

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

3. Apply an alias to the addresses in the request if the sender address is a contract.

If the sender is an EOA, no aliasing is required. Aliasing is implemented by the [`applyL1ToL2Alias`](https://github.com/matter-labs/era-contracts/blob/41c25aa16d182f757c3fed1463c78a81896f65e6/ethereum/contracts/vendor/AddressAliasHelper.sol#L28) Solidity function and called by the [JavaScript SDK](https://github.com/matter-labs/zksync-era/blob/48fe6e27110c1fe1a438c5375fb256890e8017b1/sdk/zksync-web3.js/src/utils.ts#L374).
If the sender is an EOA, no aliasing is required. Aliasing is implemented by the [`applyL1ToL2Alias`](https://github.com/matter-labs/era-contracts/blob/87cd8d7b0f8c02e9672c0603a821641a566b5dd8/l1-contracts/contracts/vendor/AddressAliasHelper.sol#L28) Solidity function and called by the [JavaScript SDK](https://github.com/matter-labs/zksync-era/blob/48fe6e27110c1fe1a438c5375fb256890e8017b1/sdk/zksync-web3.js/src/utils.ts#L374).

::: code-tabs
@tab Solidity
Expand Down Expand Up @@ -117,7 +117,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/era-contracts/blob/3a4506522aaef81485d8abb96f5a6394bd2ba69e/ethereum/contracts/zksync/interfaces/IMailbox.sol#L130) function with:
5. Get the base cost by calling the [`l2TransactionBaseCost`](https://github.com/matter-labs/era-contracts/blob/87cd8d7b0f8c02e9672c0603a821641a566b5dd8/l1-contracts/contracts/zksync/interfaces/IMailbox.sol#L131) function with:

- The gas price returned at step 2 as `_gasPrice`.
- The gas value returned at step 3 as `_l2GasLimit`.
Expand Down Expand Up @@ -169,7 +169,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/era-contracts/blob/3a4506522aaef81485d8abb96f5a6394bd2ba69e/ethereum/contracts/zksync/interfaces/IMailbox.sol#L120) 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/87cd8d7b0f8c02e9672c0603a821641a566b5dd8/l1-contracts/contracts/zksync/interfaces/IMailbox.sol#L121) 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
8 changes: 4 additions & 4 deletions docs/reference/concepts/bridging-asset.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ On the testnet environment, we automatically finalize all withdrawals, i.e., for

To build a custom bridge, create a regular Solidity contract which extends the correct interface for the layer. The interfaces provide access to the zkSync Era SDK deposit and withdraw implementations.

- L1: [IL1Bridge.sol](https://github.com/matter-labs/era-contracts/blob/main/ethereum/contracts/bridge/interfaces/IL1Bridge.sol)
- L1: [IL1Bridge.sol](https://github.com/matter-labs/era-contracts/blob/main/l1-contracts/contracts/bridge/interfaces/IL1Bridge.sol)

For more information, check out our example [L1 custom bridge implementation](https://github.com/matter-labs/era-contracts/blob/main/ethereum/contracts/bridge/L1ERC20Bridge.sol).
For more information, check out our example [L1 custom bridge implementation](https://github.com/matter-labs/era-contracts/blob/main/l1-contracts/contracts/bridge/L1ERC20Bridge.sol).

- L2: [L2ERC20Bridge.sol](https://github.com/matter-labs/era-contracts/blob/main/zksync/contracts/bridge/L2ERC20Bridge.sol)
- L2: [L2ERC20Bridge.sol](https://github.com/matter-labs/era-contracts/blob/main/l2-contracts/contracts/bridge/L2ERC20Bridge.sol)

For more information, check out our example [L2 custom bridge implementation](https://github.com/matter-labs/era-contracts/blob/main/zksync/contracts/bridge/L2ERC20Bridge.sol).
For more information, check out our example [L2 custom bridge implementation](https://github.com/matter-labs/era-contracts/blob/main/l2-contracts/contracts/bridge/L2ERC20Bridge.sol).
2 changes: 1 addition & 1 deletion docs/reference/concepts/fee-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Because the signature is unavailable prior to the transaction taking place, an i

In the case of a custom account with multiple signers, the account may wish to simulate signature validation for all the provided signers.

See the [DefaultAccount code](https://github.com/matter-labs/era-system-contracts/blob/main/contracts/DefaultAccount.sol) for more information.
See the [DefaultAccount code](https://github.com/matter-labs/era-contracts/blob/main/system-contracts/contracts/DefaultAccount.sol) for more information.

### Account abstraction considerations

Expand Down

0 comments on commit 558b5ef

Please sign in to comment.