-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathprepareChainConfig.unit.test.ts
More file actions
54 lines (48 loc) · 1.3 KB
/
prepareChainConfig.unit.test.ts
File metadata and controls
54 lines (48 loc) · 1.3 KB
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
import { it, expect } from 'vitest';
import { ChainConfig } from './types/ChainConfig';
import { prepareChainConfig } from './prepareChainConfig';
const chainId = 69_420;
const vitalik: `0x${string}` = '0xd8da6bf26964af9d7eed9e03e53415d37aa96045';
it('creates chain config with defaults', () => {
const params = {
chainId,
arbitrum: {
InitialChainOwner: vitalik,
},
};
expect(prepareChainConfig(params)).toMatchSnapshot();
});
it('creates chain config with custom params', () => {
const params: ChainConfig = {
chainId,
homesteadBlock: 1,
daoForkBlock: null,
daoForkSupport: false,
eip150Block: 1,
eip150Hash: '0x1100000000000000000000000000000000000000000000000000000000000000',
eip155Block: 1,
eip158Block: 1,
byzantiumBlock: 1,
constantinopleBlock: 1,
petersburgBlock: 1,
istanbulBlock: 1,
muirGlacierBlock: 1,
berlinBlock: 1,
londonBlock: 1,
clique: {
period: 1,
epoch: 1,
},
arbitrum: {
EnableArbOS: false,
AllowDebugPrecompiles: true,
DataAvailabilityCommittee: true,
InitialArbOSVersion: 20,
InitialChainOwner: vitalik,
GenesisBlockNum: 1,
MaxCodeSize: 40 * 1024,
MaxInitCodeSize: 80 * 1024,
},
};
expect(prepareChainConfig(params)).toMatchSnapshot();
});