@@ -2,14 +2,64 @@ const path = require("path");
2
2
const fs = require ( "fs" ) ;
3
3
const solc = require ( "solc" ) ;
4
4
5
- const contractPath = path . resolve ( __dirname , "contracts" , "Pigify.sol" ) ;
6
- const source = fs . readFileSync ( contractPath , "utf8" ) ;
5
+ const contractPath = path . resolve ( __dirname , "contracts" ) ;
7
6
8
7
const input = {
9
8
language : "Solidity" ,
10
9
sources : {
10
+ "@openzeppelin/contracts/token/ERC20/IERC20.sol" : {
11
+ content : fs . readFileSync (
12
+ path . resolve ( __dirname , "node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol" ) ,
13
+ "utf8"
14
+ )
15
+ } ,
16
+ "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol" : {
17
+ content : fs . readFileSync (
18
+ path . resolve ( __dirname , "node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol" ) ,
19
+ "utf8"
20
+ )
21
+ } ,
22
+ "@openzeppelin/contracts/utils/Context.sol" : {
23
+ content : fs . readFileSync (
24
+ path . resolve ( __dirname , "node_modules/@openzeppelin/contracts/utils/Context.sol" ) ,
25
+ "utf8"
26
+ )
27
+ } ,
28
+ "@openzeppelin/contracts/token/ERC20/ERC20.sol" : {
29
+ content : fs . readFileSync (
30
+ path . resolve ( __dirname , "node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol" ) ,
31
+ "utf8"
32
+ )
33
+ } ,
34
+ "interfaces/IERC20Minimal.sol" : {
35
+ content : fs . readFileSync (
36
+ path . resolve ( contractPath , "interfaces" , "IERC20Minimal.sol" ) ,
37
+ "utf8"
38
+ )
39
+ } ,
40
+ "PigifyTokenRegistrar.sol" : {
41
+ content : fs . readFileSync (
42
+ path . resolve ( contractPath , "PigifyTokenRegistrar.sol" ) ,
43
+ "utf8"
44
+ )
45
+ } ,
46
+ "PigifyTokenPool.sol" : {
47
+ content : fs . readFileSync (
48
+ path . resolve ( contractPath , "PigifyTokenPool.sol" ) ,
49
+ "utf8"
50
+ )
51
+ } ,
52
+ "PigifyNativeToken.sol" : {
53
+ content : fs . readFileSync (
54
+ path . resolve ( contractPath , "PigifyNativeToken.sol" ) ,
55
+ "utf8"
56
+ )
57
+ } ,
11
58
"Pigify.sol" : {
12
- content : source
59
+ content : fs . readFileSync (
60
+ path . resolve ( contractPath , "Pigify.sol" ) ,
61
+ "utf8"
62
+ )
13
63
}
14
64
} ,
15
65
settings : {
0 commit comments