https://github.com/zt-9/goblob
golang utils for generating Ethereum blob transaction
https://github.com/zt-9/goblob
Last synced: 9 months ago
JSON representation
golang utils for generating Ethereum blob transaction
- Host: GitHub
- URL: https://github.com/zt-9/goblob
- Owner: zt-9
- Created: 2024-03-19T02:25:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-19T18:57:05.000Z (over 2 years ago)
- Last Synced: 2025-02-09T01:51:41.708Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# goblob
utils for generating Ethereum blob transaction
function `CreateSidecarAndVersionedHashes` creates the `sidecar` and `BlobHashes` fields in the blob transaction.
`sidecar` struct contains the blobs, kzg commitments and kzg proofs.
The data that needs to be sent to Ethereum in the blob transaction will be transformed into blobs first.
The kzg commitment and proof are generated for each blob.
Blobhashes contain the unique versioned hashes for each blob attached in the blob transaction. It's the sha256 hash of a version prefix and blob's kzg commitment.
function `CreateBlobTx` creates the blob transaction with the given data.
example: a blob on-chain [transaction](https://sepolia.etherscan.io/tx/0x2b780e9fe5aba6272a6059b4b449bd74e667599ae1fe06ae0840c894217a0c0d)