File tree Expand file tree Collapse file tree 6 files changed +20
-23
lines changed Expand file tree Collapse file tree 6 files changed +20
-23
lines changed Original file line number Diff line number Diff line change 17
17
"@acala-network/contracts" : " 4.3.4" ,
18
18
"@acala-network/eth-transactions" : " workspace:*" ,
19
19
"bn.js" : " ~5.2.0" ,
20
- "dd-trace" : " ~4.16.0" ,
21
20
"ethers" : " ~5.7.0" ,
22
21
"graphql" : " ~16.0.1" ,
23
22
"graphql-request" : " ~3.6.1" ,
26
25
"devDependencies" : {
27
26
"@acala-network/api" : " ~6.0.4" ,
28
27
"@types/bn.js" : " ~5.1.0" ,
29
- "@types/dd-trace" : " ^0.9.0" ,
30
28
"@types/lru-cache" : " ~7.6.1" ,
31
29
"dotenv" : " ~10.0.0" ,
32
30
"jsdom" : " ^22.0.0" ,
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import { options } from '@acala-network/api';
2
2
3
3
import { ApiPromise , WsProvider } from '@polkadot/api' ;
4
4
import { BaseProvider , BaseProviderOptions } from './base-provider' ;
5
- import { BaseProviderWithTrace } from './base-provider-dd' ;
6
5
7
6
export class EvmRpcProvider extends BaseProvider {
8
7
constructor ( endpoint : string | string [ ] , opts ?: BaseProviderOptions ) {
@@ -18,18 +17,3 @@ export class EvmRpcProvider extends BaseProvider {
18
17
return new EvmRpcProvider ( endpoint , opt ) ;
19
18
}
20
19
}
21
-
22
- export class EvmRpcProviderWithTrace extends BaseProviderWithTrace {
23
- constructor ( endpoint : string | string [ ] , opts ?: BaseProviderOptions ) {
24
- super ( opts ) ;
25
-
26
- const provider = new WsProvider ( endpoint ) ;
27
- const api = new ApiPromise ( options ( { provider } ) ) ;
28
-
29
- this . setApi ( api ) ;
30
- }
31
-
32
- static from ( endpoint : string | string [ ] , opt ?: BaseProviderOptions ) : EvmRpcProviderWithTrace {
33
- return new EvmRpcProviderWithTrace ( endpoint , opt ) ;
34
- }
35
- }
Original file line number Diff line number Diff line change 1
1
import {
2
2
EvmRpcProvider ,
3
- EvmRpcProviderWithTrace ,
4
3
PROVIDER_ERRORS ,
5
4
PollFilterType ,
6
5
TX ,
@@ -13,6 +12,7 @@ import { hexValue } from '@ethersproject/bytes';
13
12
import EventEmitter from 'events' ;
14
13
import WebSocket from 'ws' ;
15
14
15
+ import { EvmRpcProviderWithTrace } from './wrapped-provider' ;
16
16
import { InvalidParams , MethodNotFound } from './errors' ;
17
17
import { validate } from './validate' ;
18
18
import { version } from './_version' ;
Original file line number Diff line number Diff line change 1
1
import './utils/tracer' ;
2
2
3
3
import { Eip1193Bridge } from './eip1193-bridge' ;
4
- import { EvmRpcProviderWithTrace } from '@acala-network/eth-providers ' ;
4
+ import { EvmRpcProviderWithTrace } from './wrapped-provider ' ;
5
5
import { Router } from './router' ;
6
6
import { monitorRuntime } from './utils/monitor-runtime' ;
7
7
import { yargsOptions as opts } from './utils' ;
Original file line number Diff line number Diff line change 1
- import { BaseProvider } from './base-provider' ;
1
+ import { ApiPromise , WsProvider } from '@polkadot/api' ;
2
+ import { BaseProvider , BaseProviderOptions } from '@acala-network/eth-providers/base-provider' ;
3
+ import { options } from '@acala-network/api' ;
2
4
import tracer from 'dd-trace' ;
3
5
4
6
const TRACE_METHODS = [
@@ -79,3 +81,18 @@ export class BaseProviderWithTrace extends BaseProvider {
79
81
}
80
82
}
81
83
}
84
+
85
+ export class EvmRpcProviderWithTrace extends BaseProviderWithTrace {
86
+ constructor ( endpoint : string | string [ ] , opts ?: BaseProviderOptions ) {
87
+ super ( opts ) ;
88
+
89
+ const provider = new WsProvider ( endpoint ) ;
90
+ const api = new ApiPromise ( options ( { provider } ) ) ;
91
+
92
+ this . setApi ( api ) ;
93
+ }
94
+
95
+ static from ( endpoint : string | string [ ] , opt ?: BaseProviderOptions ) : EvmRpcProviderWithTrace {
96
+ return new EvmRpcProviderWithTrace ( endpoint , opt ) ;
97
+ }
98
+ }
You can’t perform that action at this time.
0 commit comments