This file contains hidden or 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
const Web3 = require('web3'); | |
const compiledContract = require('./../build/MyContract.json'); | |
const rpcEndpoint = 'rpc-END-POINT'; | |
// you will get from ganache-GUI | |
// Setting up the provider | |
const provider = new Web3.providers.HttpProvider(rpcEndpoint); | |
const web3 = new Web3(provider); |
This file contains hidden or 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
var path = require('path'); | |
var solc = require('solc'); | |
var fs = require('fs-extra'); | |
const buildPath = path.resolve(__dirname, 'build'); | |
fs.removeSync(buildPath); | |
fs.mkdirSync(buildPath); | |
fs.readdir(path.resolve(__dirname, 'contracts'), function (err, files) { | |
//listing all files using forEach |
NewerOlder