Commit 69b0f46d authored by Mark Tyneway's avatar Mark Tyneway

indexer: fix build

parent 9225d8bb
...@@ -5,23 +5,27 @@ import ( ...@@ -5,23 +5,27 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"github.com/google/uuid"
"github.com/ethereum-optimism/optimism/indexer/database" "github.com/ethereum-optimism/optimism/indexer/database"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/google/uuid"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )
// MockBridgeView mocks the BridgeView interface // MockBridgeView mocks the BridgeView interface
type MockBridgeView struct{} type MockBridgeView struct{}
const (
guid1 = "8408b6d2-7c90-4cfc-8604-b2204116cb6a"
guid2 = "8408b6d2-7c90-4cfc-8604-b2204116cb6b"
)
// DepositsByAddress mocks returning deposits by an address // DepositsByAddress mocks returning deposits by an address
func (mbv *MockBridgeView) DepositsByAddress(address common.Address) ([]*database.DepositWithTransactionHash, error) { func (mbv *MockBridgeView) DepositsByAddress(address common.Address) ([]*database.DepositWithTransactionHash, error) {
return []*database.DepositWithTransactionHash{ return []*database.DepositWithTransactionHash{
{ {
Deposit: database.Deposit{ Deposit: database.Deposit{
GUID: uuid.New(), GUID: uuid.MustParse(guid1),
InitiatedL1EventGUID: "mockEventGUID1", InitiatedL1EventGUID: guid2,
Tx: database.Transaction{}, Tx: database.Transaction{},
TokenPair: database.TokenPair{}, TokenPair: database.TokenPair{},
}, },
...@@ -35,8 +39,8 @@ func (mbv *MockBridgeView) WithdrawalsByAddress(address common.Address) ([]*data ...@@ -35,8 +39,8 @@ func (mbv *MockBridgeView) WithdrawalsByAddress(address common.Address) ([]*data
return []*database.WithdrawalWithTransactionHashes{ return []*database.WithdrawalWithTransactionHashes{
{ {
Withdrawal: database.Withdrawal{ Withdrawal: database.Withdrawal{
GUID: uuid.New(), GUID: uuid.MustParse(guid2),
InitiatedL2EventGUID: "mockEventGUID2", InitiatedL2EventGUID: guid1,
WithdrawalHash: common.HexToHash("0x456"), WithdrawalHash: common.HexToHash("0x456"),
Tx: database.Transaction{}, Tx: database.Transaction{},
TokenPair: database.TokenPair{}, TokenPair: database.TokenPair{},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment