@@ -20,11 +20,6 @@ type Providers struct {
2020 testnetChainIDs []uint64
2121 mainnetStringChainIDs []string
2222 testnetStringChainIDs []string
23-
24- // Deprecated
25- // TODO: remove in the future
26- authChain * ethrpc.Provider
27- testAuthChain * ethrpc.Provider
2823}
2924
3025type ChainInfo struct {
@@ -57,16 +52,6 @@ func NewProviders(cfg Config, opts ...ethrpc.Option) (*Providers, error) {
5752 providers .byID [details .ID ] = p
5853 providers .byName [name ] = p
5954 providers .configByID [details .ID ] = details
60-
61- if (details .AuthChain && ! details .Testnet && providers .authChain != nil ) || (details .AuthChain && details .Testnet && providers .testAuthChain != nil ) {
62- return nil , fmt .Errorf ("duplicate auth chain providers detected in config" )
63- }
64- if details .AuthChain && ! details .Testnet {
65- providers .authChain = p
66- }
67- if details .AuthChain && details .Testnet {
68- providers .testAuthChain = p
69- }
7055 }
7156 if len (providers .byID ) != len (providers .byName ) {
7257 return nil , fmt .Errorf ("duplicate provider id or name detected" )
@@ -121,38 +106,10 @@ func (p *Providers) GetByChainName(chainName string) *ethrpc.Provider {
121106 return p .byName [chainName ]
122107}
123108
124- func (p * Providers ) GetAuthChain () * ethrpc.Provider {
125- return p .authChain
126- }
127-
128- func (p * Providers ) GetTestAuthChain () * ethrpc.Provider {
129- return p .testAuthChain
130- }
131-
132- func (p * Providers ) GetAuthProvider () * ethrpc.Provider {
133- return p .authChain
134- }
135-
136- func (p * Providers ) GetTestnetAuthProvider () * ethrpc.Provider {
137- return p .testAuthChain
138- }
139-
140109func (p * Providers ) ProviderMap () map [uint64 ]* ethrpc.Provider {
141110 return p .byID
142111}
143112
144- func (p * Providers ) LookupAuthProviderByChainID (chainID uint64 ) * ethrpc.Provider {
145- details , ok := p .configByID [chainID ]
146- if ! ok {
147- return nil
148- }
149- if details .Testnet {
150- return p .testAuthChain
151- } else {
152- return p .authChain
153- }
154- }
155-
156113func (p * Providers ) ChainList () []ChainInfo {
157114 return p .allChainsList
158115}
0 commit comments