forked from snapshot-labs/snapshot-strategies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vp.test.ts
59 lines (56 loc) · 1.06 KB
/
vp.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { getVp } from '../src/utils/vp';
const address = '0xeF8305E140ac520225DAf050e2f71d5fBcC543e7';
const space = 'cvx.eth';
const network = '1';
const snapshot = 15354134;
const strategies = [
{
name: 'erc20-balance-of',
params: {
symbol: 'CVX',
address: '0x72a19342e8F1838460eBFCCEf09F6585e32db86E',
decimals: 18
}
},
{
name: 'eth-balance',
network: '100',
params: {}
},
{
name: 'eth-balance',
network: '1',
params: {}
},
{
name: 'eth-balance',
network: '10',
params: {}
}
];
describe('', () => {
it('getVp without delegation', async () => {
const scores = await getVp(
address,
network,
strategies,
snapshot,
space,
false
);
expect(scores).toMatchSnapshot();
console.log(scores);
}, 20e3);
it('getVp with delegation', async () => {
const scores = await getVp(
address,
network,
strategies,
snapshot,
space,
true
);
expect(scores).toMatchSnapshot();
console.log(scores);
}, 20e3);
});