Skip to content
This repository was archived by the owner on May 11, 2024. It is now read-only.

Commit 4614b95

Browse files
committed
add blob tx
1 parent 9a96b3f commit 4614b95

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pkg/rpc/txblob_test.go

+8-3
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ func TestBlockTx(t *testing.T) {
1616
ctx, cancel := context.WithCancel(context.Background())
1717
defer cancel()
1818

19-
l1Client, err := NewEthClient(ctx, os.Getenv("L1_NODE_WS_ENDPOINT"), time.Second*20)
19+
url := "https://rpc.ankr.com/eth_goerli" //os.Getenv("L1_NODE_WS_ENDPOINT")
20+
l1Client, err := NewEthClient(ctx, url, time.Second*20)
2021
assert.NoError(t, err)
2122

22-
sk, err := crypto.ToECDSA(common.FromHex(os.Getenv("L1_PROPOSER_PRIVATE_KEY")))
23+
priv := os.Getenv("L1_PROPOSER_PRIVATE_KEY")
24+
sk, err := crypto.ToECDSA(common.FromHex(priv))
2325
assert.NoError(t, err)
2426

2527
chainID, err := l1Client.ChainID(ctx)
@@ -30,11 +32,14 @@ func TestBlockTx(t *testing.T) {
3032
opts.Context = ctx
3133
//opts.NoSend = true
3234

35+
balance, err := l1Client.BalanceAt(ctx, opts.From, nil)
36+
assert.NoError(t, err)
37+
t.Logf("address: %s, balance: %s", opts.From.String(), balance.String())
38+
3339
tx, err := l1Client.TransactBlobTx(opts, []byte("s"))
3440
assert.NoError(t, err)
3541

3642
receipt, err := bind.WaitMined(ctx, l1Client, tx)
3743
assert.NoError(t, err)
3844
t.Log(receipt)
39-
4045
}

0 commit comments

Comments
 (0)