1
- // Copyright © 2020 Weald Technology Trading
1
+ // Copyright © 2020, 2021 Weald Technology Trading
2
2
// Licensed under the Apache License, Version 2.0 (the "License");
3
3
// you may not use this file except in compliance with the License.
4
4
// You may obtain a copy of the License at
@@ -23,38 +23,6 @@ import (
23
23
"github.com/wealdtech/ethdo/util"
24
24
)
25
25
26
- // A mock Ethereum 2 client service that returns supplied deposit information.
27
- type depositETH2Client struct {
28
- address []byte
29
- chainID uint64
30
- networkID uint64
31
- }
32
-
33
- // Name returns the name of the client implementation.
34
- func (c * depositETH2Client ) Name () string {
35
- return "deposit mock"
36
- }
37
-
38
- // Address returns the address of the client.
39
- func (c * depositETH2Client ) Address () string {
40
- return "mock"
41
- }
42
-
43
- // DepositContractAddress provides the Ethereum 1 address of the deposit contract.
44
- func (c * depositETH2Client ) DepositContractAddress (ctx context.Context ) ([]byte , error ) {
45
- return c .address , nil
46
- }
47
-
48
- // DepositContractChainID provides the Ethereum 1 chain ID of the deposit contract.
49
- func (c * depositETH2Client ) DepositContractChainID (ctx context.Context ) (uint64 , error ) {
50
- return c .chainID , nil
51
- }
52
-
53
- // DepositContractNetworkID provides the Ethereum 1 network ID of the deposit contract.
54
- func (c * depositETH2Client ) DepositContractNetworkID (ctx context.Context ) (uint64 , error ) {
55
- return c .networkID , nil
56
- }
57
-
58
26
// A mock Ethereum 2 client service that returns spec information.
59
27
type specETH2Client struct {
60
28
address []byte
@@ -88,31 +56,13 @@ func TestNetworks(t *testing.T) {
88
56
name : "Nil" ,
89
57
err : "no Ethereum 2 client supplied" ,
90
58
},
91
- {
92
- name : "MainnetDeposit" ,
93
- service : & depositETH2Client {
94
- address : testutil .HexToBytes ("0x00000000219ab540356cbb839cbe05303d7705fa" ),
95
- chainID : 0 ,
96
- networkID : 0 ,
97
- },
98
- network : "Mainnet" ,
99
- },
100
59
{
101
60
name : "MainnetSpec" ,
102
61
service : & specETH2Client {
103
62
address : testutil .HexToBytes ("0x00000000219ab540356cbb839cbe05303d7705fa" ),
104
63
},
105
64
network : "Mainnet" ,
106
65
},
107
- {
108
- name : "UnknownDeposit" ,
109
- service : & depositETH2Client {
110
- address : testutil .HexToBytes ("0x1111111111111111111111111111111111111111" ),
111
- chainID : 0 ,
112
- networkID : 0 ,
113
- },
114
- network : "Unknown" ,
115
- },
116
66
{
117
67
name : "UnknownSpec" ,
118
68
service : & specETH2Client {
0 commit comments