This repository has been archived by the owner on Nov 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
datagen.js
81 lines (62 loc) · 2.17 KB
/
datagen.js
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
const fs = require('fs');
const addresses = require('./addresses');
const rskOwnerBuild = require('./build/contracts/RSKOwner');
const rskOwnerData = {
abi: rskOwnerBuild.abi,
bytecode: rskOwnerBuild.bytecode,
address: {
rskMainnet: addresses.RSKOwner.rskMainnet,
rskTestnet: addresses.RSKOwner.rskTestnet,
},
};
fs.writeFileSync('./RSKOwnerData.json', JSON.stringify(rskOwnerData));
const namePriceBuild = require('./build/contracts/NamePrice');
const namePriceData = {
abi: namePriceBuild.abi,
bytecode: namePriceBuild.bytecode,
address: {
rskMainnet: addresses.NamePrice.rskMainnet,
rskTestnet: addresses.NamePrice.rskTestnet,
},
};
fs.writeFileSync('./NamePriceData.json', JSON.stringify(namePriceData));
const fifsRegistrarBuild = require('./build/contracts/FIFSRegistrar');
const fifsRegistrarData = {
abi: fifsRegistrarBuild.abi,
bytecode: fifsRegistrarBuild.bytecode,
address: {
rskMainnet: addresses.FIFSRegistrar.rskMainnet,
rskTestnet: addresses.FIFSRegistrar.rskTestnet,
},
};
fs.writeFileSync('./FIFSRegistrarData.json', JSON.stringify(fifsRegistrarData));
const fifsAddrRegistrarBuild = require('./build/contracts/FIFSAddrRegistrar');
const fifsAddrRegistrarData = {
abi: fifsAddrRegistrarBuild.abi,
bytecode: fifsAddrRegistrarBuild.bytecode,
address: {
rskMainnet: addresses.FIFSAddrRegistrar.rskMainnet,
rskTestnet: addresses.FIFSAddrRegistrar.rskTestnet,
},
};
fs.writeFileSync('./FIFSAddrRegistrarData.json', JSON.stringify(fifsAddrRegistrarData));
const renewerBuild = require('./build/contracts/Renewer');
const renewerData = {
abi: renewerBuild.abi,
bytecode: renewerBuild.bytecode,
address: {
rskMainnet: addresses.Renewer.rskMainnet,
rskTestnet: addresses.Renewer.rskTestnet,
},
};
fs.writeFileSync('./RenewerData.json', JSON.stringify(renewerData));
const bytesUtilsBuild = require('./build/contracts/BytesUtils');
const bytesUtilsData = {
abi: bytesUtilsBuild.abi,
bytecode: bytesUtilsBuild.bytecode,
address: {
rskMainnet: addresses.BytesUtils.rskMainnet,
rskTestnet: addresses.BytesUtils.rskTestnet,
},
};
fs.writeFileSync('./BytesUtilsData.json', JSON.stringify(bytesUtilsData));