kopia lustrzana https://github.com/bugout-dev/moonstream
41 wiersze
1.2 KiB
Go
41 wiersze
1.2 KiB
Go
package cmd
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/common"
|
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
|
)
|
|
|
|
type Transaction struct {
|
|
Type hexutil.Uint64 `json:"type"`
|
|
|
|
// Common transaction fields:
|
|
Nonce *hexutil.Uint64 `json:"nonce"`
|
|
GasPrice *hexutil.Big `json:"gasPrice"`
|
|
MaxPriorityFeePerGas *hexutil.Big `json:"maxPriorityFeePerGas"`
|
|
MaxFeePerGas *hexutil.Big `json:"maxFeePerGas"`
|
|
Gas *hexutil.Uint64 `json:"gas"`
|
|
Value *hexutil.Big `json:"value"`
|
|
Data *hexutil.Bytes `json:"input"`
|
|
V *hexutil.Big `json:"v"`
|
|
R *hexutil.Big `json:"r"`
|
|
S *hexutil.Big `json:"s"`
|
|
To *common.Address `json:"to"`
|
|
|
|
// Access list transaction fields:
|
|
ChainID *hexutil.Big `json:"chainId,omitempty"`
|
|
// AccessList *AccessList `json:"accessList,omitempty"`
|
|
|
|
// Only used for encoding:
|
|
Hash common.Hash `json:"hash"`
|
|
}
|
|
|
|
type PendingTransaction struct {
|
|
From string `json:"from"`
|
|
Nonce uint64 `json:"nonce"`
|
|
Transaction *Transaction `json:"transaction"`
|
|
}
|
|
|
|
type PendingTransactions struct {
|
|
Transactions PendingTransaction `json:"transactions"`
|
|
}
|