forked from smartcontractkit/external-adapters-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fixtures.ts
81 lines (80 loc) · 2.03 KB
/
fixtures.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import nock from 'nock'
export const mockCRPCCallResponseSuccess = (): nock =>
nock('http://localhost:8545', {
encodedQueryParams: true,
})
.post('/', {
method: 'getblockchaininfo',
id: /^\d+$/,
jsonrpc: '2.0',
})
.reply(
200,
(_, request) => ({
result: {
chain: 'main',
blocks: 729721,
headers: 729721,
bestblockhash: '0000000000000000000575c9424c923de0130aca78069d266965fbe5cbcec028',
difficulty: 27452707696466.39,
mediantime: 1648654099,
verificationprogress: 0.9999990692999605,
initialblockdownload: false,
chainwork: '00000000000000000000000000000000000000002b2b671eadd87008ebb889cc',
size_on_disk: 452435721489,
pruned: false,
softforks: {
bip34: {
type: 'buried',
active: true,
height: 227931,
},
bip66: {
type: 'buried',
active: true,
height: 363725,
},
bip65: {
type: 'buried',
active: true,
height: 388381,
},
csv: {
type: 'buried',
active: true,
height: 419328,
},
segwit: {
type: 'buried',
active: true,
height: 481824,
},
taproot: {
type: 'bip9',
bip9: {
status: 'active',
start_time: 1619222400,
timeout: 1628640000,
since: 709632,
min_activation_height: 709632,
},
height: 709632,
active: true,
},
},
warnings: '',
},
error: null,
id: 1,
}),
[
'Content-Type',
'application/json',
'Connection',
'close',
'Vary',
'Accept-Encoding',
'Vary',
'Origin',
],
)