-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8fff266
Showing
14 changed files
with
14,406 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
.next/ | ||
*.log |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const path = require('path'); | ||
const solc = require('solc'); | ||
const fs = require('fs-extra'); | ||
|
||
const buildpath = path.resolve(__dirname, 'build'); | ||
fs.removeSync(buildpath); | ||
const donatePath = path.resolve(__dirname, 'Contract', 'contract.sol'); | ||
const source = fs.readFileSync(donatePath, 'utf8'); | ||
const output = solc.compile(source, 1).contracts; | ||
|
||
fs.ensureDirSync(buildpath); | ||
console.log(output); | ||
for (let contract in output) { | ||
fs.outputJsonSync(path.resolve(buildpath, contract.replace(':', '') + '.json'), output[contract]); | ||
|
||
} | ||
|
Oops, something went wrong.