Skip to content

Commit

Permalink
add test for ChainWriter.SetClaimerFor
Browse files Browse the repository at this point in the history
  • Loading branch information
ricomateo committed Jan 7, 2025
1 parent a0cf13a commit db65174
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions chainio/clients/elcontracts/writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/Layr-Labs/eigensdk-go/testutils"
"github.com/Layr-Labs/eigensdk-go/testutils/testclients"
"github.com/Layr-Labs/eigensdk-go/types"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -151,3 +152,14 @@ func TestChainWriter(t *testing.T) {
assert.True(t, receipt.Status == 1)
})
}

const SUCCESS_STATUS = uint64(1)

func TestSetClaimerFor(t *testing.T) {
testClients, _ := testclients.BuildTestClients(t)
claimerAddress := common.HexToAddress("5eb15C0992734B5e77c888D713b4FC67b3D679A2")
waitForReceipt := true
receipt, err := testClients.ElChainWriter.SetClaimerFor(context.Background(), claimerAddress, waitForReceipt)
assert.NoError(t, err)
assert.True(t, receipt.Status == SUCCESS_STATUS)
}

0 comments on commit db65174

Please sign in to comment.