Documentation
¶
Overview ¶
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Index ¶
- Variables
- func CreateRawTransaction(rpcURL, to, data, privateKey string, gasLimit, wei uint64) (string, error)
- func GetBlob(blockRootOrSlotNumber, kzgCommitment string) (string, error)
- func GetNonce(address, rpcUrl string) (uint64, uint64, error)
- func SendBlobTX(rpcURL, toAddress, data, privateKey, saveBlobDir string) (string, error)
- func SendRawTransaction(rawTx, rpcURL string) (string, string, error)
- func SendTransaction(rpcURL, to, data, privateKey string, gasLimit, wei uint64) (string, error)
- func SignETHMessage(message, privateKey string) (string, error)
- func TryEstimateGas(rpcUrl, from, to, data string, value uint64) (uint64, error)
- func VerifySig(signature, address, message string) (bool, error)
- type SignatureResponse
- type Trace
- type Transaction
- type TxReceipt
Constants ¶
This section is empty.
Variables ¶
var TxCmd = &cobra.Command{ Use: "tx", Short: "Manage transactions, including creation, signing, submitting and tracing", Long: ``, Run: func(cmd *cobra.Command, args []string) { cmd.Help() }, }
TxCmd represents the tx command
Functions ¶
func CreateRawTransaction ¶
func CreateRawTransaction(rpcURL, to, data, privateKey string, gasLimit, wei uint64) (string, error)
CreateRawTransaction creates a raw Ethereum transaction.
func SendBlobTX ¶
func SendRawTransaction ¶
SendRawTransaction sends a raw Ethereum transaction.
func SendTransaction ¶
SendTransaction sends an Ethereum transaction.
func SignETHMessage ¶
SignETHMessage signs a message using the provided private key.
func TryEstimateGas ¶
TryEstimateGas tries to estimate the gas needed to execute a specific transaction based on the current pending state of the backend blockchain. There is no guarantee that this is the true gas limit requiremen
Types ¶
type SignatureResponse ¶
type SignatureResponse struct {
Address string `json:"address,omitempty"`
Msg string `json:"msg,omitempty"`
Sig string `json:"sig,omitempty"`
Version string `json:"version,omitempty"`
}
SignatureResponse represents the structure of the signature response.
type Trace ¶
type Transaction ¶
type Transaction struct {
Type string `json:"type"`
ChainID string `json:"chainId"`
Nonce string `json:"nonce"`
To string `json:"to"`
Gas string `json:"gas"`
GasPrice string `json:"gasPrice,omitempty"`
MaxPriorityFeePerGas string `json:"maxPriorityFeePerGas"`
MaxFeePerGas string `json:"maxFeePerGas"`
Value string `json:"value"`
Input string `json:"input"`
AccessList []string `json:"accessList"`
V string `json:"v"`
R string `json:"r"`
S string `json:"s"`
YParity string `json:"yParity"`
Hash string `json:"hash"`
TransactionTime string `json:"transactionTime,omitempty"`
TransactionCost string `json:"transactionCost,omitempty"`
}
Transaction represents the structure of the transaction JSON.
type TxReceipt ¶
type TxReceipt struct {
Type uint64 `json:"type"`
Root string `json:"root"`
Status uint64 `json:"status"`
CumulativeGasUsed uint64 `json:"cumulativeGasUsed"`
LogsBloom string `json:"logsBloom,omitempty"`
Logs []interface{} `json:"logs,omitempty"`
TransactionHash string `json:"transactionHash"`
ContractAddress string `json:"contractAddress,omitempty"`
GasUsed uint64 `json:"gasUsed"`
EffectiveGasPrice uint64 `json:"effectiveGasPrice"`
TransactionCost uint64 `json:"-"`
BlockHash string `json:"blockHash"`
BlockNumber uint64 `json:"blockNumber"`
TransactionIndex uint64 `json:"transactionIndex"`
TransactionURL string `json:"-"`
}
func CreateContract ¶
func (*TxReceipt) UnmarshalJSON ¶
UnmarshalJSON customizes the unmarshalling of a TxReceipt.
Source Files
¶
- call.go
- createContract.go
- createRaw.go
- estimateGas.go
- getBlob.go
- getNonce.go
- handleCall.go
- handleCreateContract.go
- handleCreateRaw.go
- handleEstimateGas.go
- handleGetBlob.go
- handleGetNonce.go
- handleSend.go
- handleSendBlobTx.go
- handleSendRaw.go
- handleSignMessage.go
- handleSimulate.go
- handleTraceTx.go
- handleVerifySig.go
- send.go
- sendBlobTx.go
- sendRaw.go
- signMessage.go
- simulate.go
- traceTx.go
- tx.go
- verifySig.go