-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.ts
46 lines (32 loc) · 1.18 KB
/
test.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
// import { ethers } from "ethers";
// import { randomBytes } from 'crypto'
// const n_one = randomBytes(32)
// const n_two = ethers.utils.randomBytes(32)
// console.log(`---TEST ONE::RAW---`)
// console.log(`n_one --> `, n_one)
// console.log(`n_two --> `, n_two)
// console.log(`---TEST TWO::HEX STRING---`)
// console.log(`n_one --> `, n_one.toString('hex'))
// console.log(`n_two --> `, ethers.BigNumber.from(n_two).toHexString())
import BaseKeyTracker from './BaseKeyTracker'
import KeyTrackerA from './KeyTrackerA'
import KeyTrackerB from './KeyTrackerB'
import KeyTrackerC from './KeyTrackerC'
import MultiSourceKeyTracker from './MultiSourceKeyTracker'
const keyTrackers : BaseKeyTracker[] = [
new KeyTrackerA(),
new KeyTrackerB(),
new KeyTrackerC(),
]
console.log(`TEST KEY TRACKERS`)
const showCounts = () => keyTrackers.forEach((keyTracker, index) => console.log(`${index}. count --> ${keyTracker.count}`))
showCounts()
keyTrackers.forEach((keyTracker, index) => keyTracker.more(10))
showCounts()
const mskt = new MultiSourceKeyTracker()
mskt.moreTypeA(10)
mskt.moreTypeB(10)
mskt.moreTypeC(10)
console.log(`mskt.count --> ${mskt.count}`)
keyTrackers.push(mskt)
showCounts()