-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright (c) 2024 IoTeX Foundation | ||
// This source code is provided 'as is' and no warranties are given as to title or non-infringement, merchantability | ||
// or fitness for purpose and, to the extent permitted by law, all liability for your use of the code is disclaimed. | ||
// This source code is governed by Apache License 2.0 that can be found in the LICENSE file. | ||
|
||
package action | ||
|
||
import ( | ||
"math/big" | ||
|
||
"github.com/ethereum/go-ethereum/common" | ||
"github.com/ethereum/go-ethereum/core/types" | ||
) | ||
|
||
// BlobTx represents an EIP-4844 transaction | ||
type BlobTx struct { | ||
types.BlobTx | ||
} | ||
|
||
func (tx *BlobTx) Nonce() uint64 { | ||
return tx.BlobTx.Nonce | ||
} | ||
|
||
func (tx *BlobTx) Gas() uint64 { | ||
return tx.BlobTx.Gas | ||
} | ||
|
||
func (tx *BlobTx) GasPrice() *big.Int { | ||
return tx.BlobTx.GasFeeCap.ToBig() | ||
} | ||
|
||
func (tx *BlobTx) Value() *big.Int { | ||
return tx.BlobTx.Value.ToBig() | ||
} | ||
|
||
func (tx *BlobTx) To() *common.Address { | ||
tmp := tx.BlobTx.To | ||
return &tmp | ||
} | ||
|
||
func (tx *BlobTx) Data() []byte { | ||
return tx.BlobTx.Data | ||
} | ||
|
||
func (tx *BlobTx) AccessList() types.AccessList { | ||
return tx.BlobTx.AccessList | ||
} |