-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
fix: update links
1 parent
bcc7d35
commit f661742
Showing
16 changed files
with
105 additions
and
98 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ defer wsClient.Close() | |
|
||
Executes a log filter operation, blocking during execution, and returns all the results in one batch. This method is | ||
a replacement for `FilterLogs` because the returned `types.Log` type does not contain additional data specific to L2, | ||
as found in [`Log`](/sdk/go/types/types#log). The `FilterLogs` method is kept in order to be compatible with `bind.ContractBackend`, | ||
as found in [`Log`](/sdk/go/api/types/types#log). The `FilterLogs` method is kept in order to be compatible with `bind.ContractBackend`, | ||
and this method can be used, but additional L2 data won't be retrieved. | ||
|
||
#### Inputs | ||
|
@@ -95,7 +95,8 @@ for _, l := range zkLogs { | |
|
||
Creates a background log filtering operation, returning a subscription immediately, which can be used to stream the | ||
found events. This method is a replacement for `SubscribeFilterLogs` because the returned `types.Log` type does not | ||
contain additional data specific to L2, as found in [`Log`](/sdk/go/types/types#log). The `SubscribeFilterLogs` method is | ||
contain additional data specific to L2, as found | ||
in [`Log`](/sdk/go/api/types/types#log). The `SubscribeFilterLogs` method is | ||
kept in order to be compatible with `bind.ContractBackend`, and this method can be used, but additional L2 data | ||
won't be retrieved. | ||
|
||
|
@@ -105,7 +106,7 @@ won't be retrieved. | |
| --------- | --------------------------------------------------------------------------------------------- | -------------------------- | | ||
| `ctx` | `context.Context` | Context. | | ||
| `query` | [`ethereum.FilterQuery`](https://pkg.go.dev/github.com/ethereum/[email protected]#FilterQuery) | Filter query parameters. | | ||
| `ch` | [`chan<- zkTypes.Log`](/sdk/go/types/types#log) | Channel that receives Log. | | ||
| `ch` | [`chan<- zkTypes.Log`](/sdk/go/api/types/types#log) | Channel that receives Log. | | ||
|
||
```go | ||
SubscribeFilterLogsL2(ctx context.Context, query ethereum.FilterQuery, ch chan<- zkTypes.Log) (ethereum.Subscription, error) | ||
|
@@ -152,7 +153,7 @@ but never mined into the blockchain. | |
| Parameter | Type | Description | | ||
| ------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `ctx` | `context.Context` | Context. | | ||
| `msg` | [`zkTypes.CallMsg`](/sdk/go/types/types#callmsg) | Contains parameters for contract call using EIP-712 transaction. | | ||
| `msg` | [`zkTypes.CallMsg`](/sdk/go/api/types/types#callmsg) | Contains parameters for contract call using EIP-712 transaction. | | ||
| `blockNumber` | `*big.Int` (optional) | Selects the block height at which the call runs. It can be `nil`, in which case the code is taken from the latest known block. Note that state from very old blocks might not be available. | | ||
|
||
```go | ||
|
@@ -201,7 +202,7 @@ block height. | |
| Parameter | Type | Description | | ||
| ----------- | ---------------------------------------- | ---------------------------------------------------------------- | | ||
| `ctx` | `context.Context` | Context. | | ||
| `msg` | [`zkTypes.CallMsg`](/sdk/go/types/types#callmsg) | Contains parameters for contract call using EIP-712 transaction. | | ||
| `msg` | [`zkTypes.CallMsg`](/sdk/go/api/types/types#callmsg) | Contains parameters for contract call using EIP-712 transaction. | | ||
| `blockHash` | `common.Hash` | Block hash. | | ||
|
||
```go | ||
|
@@ -218,7 +219,7 @@ pending state. | |
| Parameter | Type | Description | | ||
| --------- | ---------------------------------------- | ---------------------------------------------------------------- | | ||
| `ctx` | `context.Context` | Context. | | ||
| `msg` | [`zkTypes.CallMsg`](/sdk/go/types/types#callmsg) | Contains parameters for contract call using EIP-712 transaction. | | ||
| `msg` | [`zkTypes.CallMsg`](/sdk/go/api/types/types#callmsg) | Contains parameters for contract call using EIP-712 transaction. | | ||
|
||
```go | ||
PendingCallContractL2(ctx context.Context, msg zkTypes.CallMsg) ([]byte, error) | ||
|
@@ -235,7 +236,7 @@ transactions may be added or removed by miners, but it should provide a basis fo | |
| Parameter | Type | Description | | ||
| --------- | ---------------------------------------- | ---------------------------------------------------------------- | | ||
| `ctx` | `context.Context` | Context. | | ||
| `msg` | [`zkTypes.CallMsg`](/sdk/go/types/types#callmsg) | Contains parameters for contract call using EIP-712 transaction. | | ||
| `msg` | [`zkTypes.CallMsg`](/sdk/go/api/types/types#callmsg) | Contains parameters for contract call using EIP-712 transaction. | | ||
|
||
```go | ||
EstimateGasL2(ctx context.Context, msg zkTypes.CallMsg) (uint64, error) | ||
|
@@ -1069,7 +1070,7 @@ Returns the fee for the transaction. | |
| Parameter | Type | Description | | ||
| --------- | ---------------------------------------- | ---------------------------------------------------------------- | | ||
| `ctx` | `context.Context` | Context. | | ||
| `msg` | [`zkTypes.CallMsg`](/sdk/go/types/types#callmsg) | Contains parameters for contract call using EIP-712 transaction. | | ||
| `msg` | [`zkTypes.CallMsg`](/sdk/go/api/types/types#callmsg) | Contains parameters for contract call using EIP-712 transaction. | | ||
|
||
```go | ||
EstimateFee(ctx context.Context, tx zkTypes.CallMsg) (*zkTypes.Fee, error) | ||
|
@@ -1102,7 +1103,7 @@ Estimates the amount of gas required to submit a transaction from L1 to L2. | |
| Parameter | Type | Description | | ||
| --------- | ---------------------------------------- | ---------------------------------------------------------------- | | ||
| `ctx` | `context.Context` | Context. | | ||
| `msg` | [`zkTypes.CallMsg`](/sdk/go/types/types#callmsg) | Contains parameters for contract call using EIP-712 transaction. | | ||
| `msg` | [`zkTypes.CallMsg`](/sdk/go/api/types/types#callmsg) | Contains parameters for contract call using EIP-712 transaction. | | ||
|
||
```go | ||
EstimateGasL1(ctx context.Context, tx zkTypes.CallMsg) (uint64, error) | ||
|
@@ -1137,7 +1138,7 @@ Estimates the amount of gas required for a transfer transaction. | |
| Parameter | Type | Description | | ||
| --------- | -------------------------------------------------- | -------------------------------------- | | ||
| `ctx` | `context.Context` | Context. | | ||
| `msg` | [`TransferCallMsg`](/sdk/go/types/accounts#transfercallmsg) | Contains parameters for transfer call. | | ||
| `msg` | [`TransferCallMsg`](/sdk/go/api/accounts/types#transfercallmsg) | Contains parameters for transfer call. | | ||
|
||
```go | ||
EstimateGasTransfer(ctx context.Context, msg TransferCallMsg) (uint64, error) | ||
|
@@ -1167,7 +1168,7 @@ Estimates the amount of gas required for a withdrawal transaction. | |
| Parameter | Type | Description | | ||
| --------- | ------------------------------------------------------ | ---------------------------------------- | | ||
| `ctx` | `context.Context` | Context. | | ||
| `msg` | [`WithdrawalCallMsg`](/sdk/go/types/accounts#withdrawalcallmsg) | Contains parameters for withdrawal call. | | ||
| `msg` | [`WithdrawalCallMsg`](/sdk/go/api/accounts/types#withdrawalcallmsg) | Contains parameters for withdrawal call. | | ||
|
||
```go | ||
EstimateGasWithdraw(ctx context.Context, msg WithdrawalCallMsg) (uint64, error) | ||
|
@@ -1197,7 +1198,7 @@ Estimates the amount of gas required for an L1 to L2 execute operation. | |
| Parameter | Type | Description | | ||
| --------- | ------------------------------------------- | ---------------------------------------------------------------- | | ||
| `ctx` | `context.Context` | Context. | | ||
| `msg` | [`zkTypes.CallMsg`](/sdk/go/types/accounts#callmsg) | Contains parameters for contract call using EIP-712 transaction. | | ||
| `msg` | [`zkTypes.CallMsg`](/sdk/go/api/accounts/types#callmsg) | Contains parameters for contract call using EIP-712 transaction. | | ||
|
||
```go | ||
EstimateL1ToL2Execute(ctx context.Context, msg zkTypes.CallMsg) (uint64, error) | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
--- | ||
title: Types | ||
description: | ||
title: Introduction | ||
description: Overview of the different type packages | ||
tags: ["go", "sdk", "types", "zksync"] | ||
--- | ||
|
||
Types are placed in three packages for different purposes: | ||
|
||
- [`types`](/sdk/go/types/types): Contains common and general types used to build basic features and other types. | ||
- [`eip712`](/sdk/go/types/eip712): Contains types used for EIP-712 implementation. | ||
- [`clients`](/sdk/go/types/clients): Contains types that are meant to be used along with [`Client`](/sdk/go/clients). | ||
- [`accounts`](/sdk/go/types/accounts): Contains types that are meant to be used along with an account, | ||
specifically with the [`Adapter`](/sdk/go/types/accounts) abstraction. | ||
Many types are similar to those from the `geth` library, but the `From` or `Signer` fields are omitted | ||
because these fields are inherited from `Adapter`, which already has an associated account. | ||
- [`types`](/sdk/go/api/types/types): Contains common and general types used to build basic features and other types. | ||
- [`eip712`](/sdk/go/api/eip712/eip712): Contains types used for EIP-712 implementation. | ||
- [`clients`](/sdk/go/api/clients/types): Contains types that are meant to be used along with [`Client`](/sdk/go/api/clients/introduction). | ||
- [`accounts`](/sdk/go/api/accounts/types): Contains types that are meant to be used along with an account, specifically | ||
with the [`Adapter`](/sdk/go/api/accounts/types) abstraction. Many types are similar to those from the `geth` library, but | ||
the `From` or `Signer` fields are omitted because these fields are inherited from `Adapter`, which already has an | ||
associated account. |
This file contains 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