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
68 lines (52 loc) · 1.92 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
const fs = require('fs');
const addresses = require('./addresses');
const addrResolverBuild = require('./build/contracts/PublicResolver');
const addrResolverData = {
abi: addrResolverBuild.abi,
bytecode: addrResolverBuild.bytecode,
address: {
rskMainnet: addresses.AddrResolver.rskMainnet,
rskTestnet: addresses.AddrResolver.rskTestnet,
},
};
fs.writeFileSync('./AddrResolverData.json', JSON.stringify(addrResolverData));
const chainAddrResolverBuild = require('./build/contracts/MultiChainResolver');
const chainAddrResolverData = {
abi: chainAddrResolverBuild.abi,
bytecode: chainAddrResolverBuild.bytecode,
address: {
rskMainnet: addresses.ChainAddrResolver.rskMainnet,
rskTestnet: addresses.ChainAddrResolver.rskTestnet,
},
};
fs.writeFileSync('./ChainAddrResolverData.json', JSON.stringify(chainAddrResolverData));
const resolverV1Build = require('./build/contracts/ResolverV1');
const resolverV1BuildData = {
abi: resolverV1Build.abi,
bytecode: resolverV1Build.bytecode,
address: {
rskMainnet: addresses.ResolverV1.rskMainnet,
rskTestnet: addresses.ResolverV1.rskTestnet,
},
};
fs.writeFileSync('./ResolverV1Data.json', JSON.stringify(resolverV1BuildData));
const proxyAdminBuild = require('./build/contracts/ProxyAdmin');
const proxyAdminBuildData = {
abi: proxyAdminBuild.abi,
bytecode: proxyAdminBuild.bytecode,
address: {
rskMainnet: addresses.ProxyFactory.rskMainnet,
rskTestnet: addresses.ProxyFactory.rskTestnet,
},
};
fs.writeFileSync('./ProxyAdminData.json', JSON.stringify(proxyAdminBuildData));
const proxyFactoryBuild = require('./build/contracts/ProxyFactory');
const proxyFactoryBuildData = {
abi: proxyFactoryBuild.abi,
bytecode: proxyFactoryBuild.bytecode,
address: {
rskMainnet: addresses.ProxyAdmin.rskMainnet,
rskTestnet: addresses.ProxyAdmin.rskTestnet,
},
};
fs.writeFileSync('./ProxyFactoryData.json', JSON.stringify(proxyFactoryBuildData));