From eaa4a7b155c1ccf569b9a77170ba4c36f7438bf5 Mon Sep 17 00:00:00 2001 From: danijelTxFusion Date: Wed, 6 Nov 2024 03:23:33 +0100 Subject: [PATCH] docs: fix the errors --- README.md | 12 ++++++------ clients/client.go | 2 +- types/call_msg.go | 2 +- types/transaction.go | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b7b6688..2551854 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ fmt.Printf("%+v\n", block) ```ts privateKey := os.Getenv("PRIVATE_KEY") -w, err := accounts.NewWallet(common.Hex2Bytes(privateKey), &client, ethClient) +w, err := accounts.NewWallet(common.Hex2Bytes(privateKey), client, ethClient) if err != nil { log.Panic(err) } @@ -108,7 +108,7 @@ if err != nil { ### Check account balances ```go -balance, err := w.Balance(context.Background(), utils.EthAddress, nil) // balance on ZKsync Era network +balance, err := w.Balance(nil, utils.EthAddress) // balance on ZKsync Era network if err != nil { log.Panic(err) } @@ -131,7 +131,7 @@ chainID, err := client.ChainID(context.Background()) if err != nil { log.Panic(err) } -receiver, err := accounts.NewRandomWallet(chainID.Int64(), &client, ethClient) +receiver, err := accounts.NewRandomWallet(chainID.Int64(), client, ethClient) if err != nil { log.Panic(err) } @@ -169,9 +169,9 @@ Transfer funds from L2 to L1 network. ```ts tx, err := w.Withdraw(accounts.WithdrawalTransaction{ - To: w.Address(), - Amount: big.NewInt(1_000_000_000_000_000_000), - Token: utils.EthAddress, + To: w.Address(), + Amount: big.NewInt(1_000_000_000_000_000_000), + Token: utils.EthAddress, }) if err != nil { log.Panic(err) diff --git a/clients/client.go b/clients/client.go index 4a0793f..576a14e 100644 --- a/clients/client.go +++ b/clients/client.go @@ -28,7 +28,7 @@ import ( ) // Client provides RPC methods on ZKsync Era node. -// Interface contains same methods as ethclient.Client except for FeeHistory method. +// Contains same methods as ethclient.Client except for FeeHistory method. // Additionally, it has extra methods capable of working with EIP712 transactions. // It is designed to be compatible with bind.ContractBackend interface, enabling support for // smart contracts generated using the abigen tool. diff --git a/types/call_msg.go b/types/call_msg.go index 11a8a4c..8ac14d5 100644 --- a/types/call_msg.go +++ b/types/call_msg.go @@ -7,7 +7,7 @@ import ( "math/big" ) -// CallMsg contains parameters for contract call using EIP-712 transaction. +// CallMsg contains parameters for contract call using L2 transaction. type CallMsg struct { From common.Address // The sender of the 'transaction'. To *common.Address // The destination contract (nil for contract creation). diff --git a/types/transaction.go b/types/transaction.go index 4476790..120c536 100644 --- a/types/transaction.go +++ b/types/transaction.go @@ -17,7 +17,7 @@ import ( // TxType represents a L2 transaction type. const TxType = `0x71` -// Transaction provides support for ZKsync Era-specific features +// Transaction provides support for ZKsync specific features // such as account abstraction and paymasters. // Smart contracts must be deployed with this transaction type. type Transaction struct {