Skip to content

Commit f7ef55c

Browse files
committedFeb 9, 2023
compile: Add remaining sources
1 parent e2c97e0 commit f7ef55c

File tree

1 file changed

+53
-3
lines changed

1 file changed

+53
-3
lines changed
 

‎compile.js

+53-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,64 @@ const path = require("path");
22
const fs = require("fs");
33
const solc = require("solc");
44

5-
const contractPath = path.resolve(__dirname, "contracts", "Pigify.sol");
6-
const source = fs.readFileSync(contractPath, "utf8");
5+
const contractPath = path.resolve(__dirname, "contracts");
76

87
const input = {
98
language: "Solidity",
109
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+
},
1158
"Pigify.sol": {
12-
content: source
59+
content: fs.readFileSync(
60+
path.resolve(contractPath, "Pigify.sol"),
61+
"utf8"
62+
)
1363
}
1464
},
1565
settings: {

0 commit comments

Comments
 (0)