-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathconstants.ts
More file actions
127 lines (125 loc) · 3.88 KB
/
constants.ts
File metadata and controls
127 lines (125 loc) · 3.88 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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import { type Address, zeroAddress } from 'viem'
import { calibration, mainnet } from '../../chains.ts'
export const PRIVATE_KEYS = {
key1: '0x1234567890123456789012345678901234567890123456789012345678901234',
key2: '0x4123456789012345678901234567890123456789012345678901234567890123',
}
export const ADDRESSES = {
client1: '0x2e988A386a799F506693793c6A5AF6B54dfAaBfB' as Address,
zero: zeroAddress,
serviceProvider1: '0x0000000000000000000000000000000000000001' as Address,
serviceProvider2: '0x0000000000000000000000000000000000000002' as Address,
payee1: '0x1000000000000000000000000000000000000001' as Address,
mainnet: {
warmStorage: mainnet.contracts.storage.address,
multicall3: mainnet.contracts.multicall3.address,
pdpVerifier: mainnet.contracts.pdp.address,
endorsements: mainnet.contracts.endorsements.address,
},
calibration: {
warmStorage: calibration.contracts.storage.address,
multicall3: calibration.contracts.multicall3.address,
pdpVerifier: calibration.contracts.pdp.address,
payments: calibration.contracts.payments.address,
endorsements: calibration.contracts.endorsements.address,
usdfcToken: calibration.contracts.usdfc.address,
filCDN: zeroAddress,
viewContract: calibration.contracts.storageView.address,
spRegistry: calibration.contracts.serviceProviderRegistry.address,
sessionKeyRegistry: calibration.contracts.sessionKeyRegistry.address,
},
}
export const PROVIDERS = {
providerNoPDP: {
providerId: 1n,
providerInfo: {
serviceProvider: ADDRESSES.serviceProvider1,
payee: ADDRESSES.payee1,
name: 'Provider 1',
description: 'Test provider 1',
isActive: true,
},
products: [],
},
provider1: {
providerId: 1n,
providerInfo: {
serviceProvider: ADDRESSES.serviceProvider1,
payee: ADDRESSES.payee1,
name: 'Provider 1',
description: 'Test provider 1',
isActive: true,
},
products: [
{
productType: 0,
isActive: true,
offering: {
serviceURL: 'https://provider1.example.com',
minPieceSizeInBytes: 1024n,
maxPieceSizeInBytes: 32n * 1024n * 1024n * 1024n,
ipniPiece: false,
ipniIpfs: false,
storagePricePerTibPerDay: 1000000n,
minProvingPeriodInEpochs: 30n,
location: 'us-east',
paymentTokenAddress: ADDRESSES.calibration.usdfcToken,
},
},
],
},
provider2: {
providerId: 2n,
providerInfo: {
serviceProvider: ADDRESSES.serviceProvider2,
payee: ADDRESSES.payee1,
name: 'Provider 2',
description: 'Test provider 2',
isActive: true,
},
products: [
{
productType: 0,
isActive: true,
offering: {
serviceURL: 'https://provider2.example.com',
minPieceSizeInBytes: 1024n,
maxPieceSizeInBytes: 32n * 1024n * 1024n * 1024n,
ipniPiece: false,
ipniIpfs: false,
storagePricePerTibPerDay: 1000000n,
minProvingPeriodInEpochs: 30n,
location: 'us-east',
paymentTokenAddress: ADDRESSES.calibration.usdfcToken,
},
},
],
},
providerIPNI: {
providerId: 2n,
providerInfo: {
serviceProvider: ADDRESSES.serviceProvider2,
payee: ADDRESSES.payee1,
name: 'Provider 2',
description: 'Test provider 2',
isActive: true,
},
products: [
{
productType: 0,
isActive: true,
offering: {
serviceURL: 'https://provider2.example.com',
minPieceSizeInBytes: 1024n,
maxPieceSizeInBytes: 32n * 1024n * 1024n * 1024n,
ipniPiece: true,
ipniIpfs: true,
storagePricePerTibPerDay: 1000000n,
minProvingPeriodInEpochs: 30n,
location: 'us-east',
paymentTokenAddress: ADDRESSES.calibration.usdfcToken,
},
},
],
},
}