Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
//general:
const DAY = 86400;
const OWNER = "0xcbc7efe0bf2664198176defb7f2cfbc9675dc60e";
//SirinCrowdsale constructor params:
const startTime = 1513080000; //(Tue, 12 Dec 2017 12:00:00 GMT)
const endTime = startTime + 14 * DAY;
const wallet = "0x0012A1A4619bFdC0535Ab50E7c51D64d5C768d79";
const walletFounder = "0x0012A1A4619bFdC0535Ab50E7c51D64d5C768d79";
const walletOEM = "0x0012A1A4619bFdC0535Ab50E7c51D64d5C768d79";
const walletBounties = "0x0012A1A4619bFdC0535Ab50E7c51D64d5C768d79";
const walletReserve = "0x0012A1A4619bFdC0535Ab50E7c51D64d5C768d79";
var eth = new Eth(Eth.givenProvider || 'http://127.0.0.1:8545');
var SirinCrowdsaleCompiled;
processContract(process.argv[2])
.then(deployContract());
/*
*/
async function processContract(contractFilePAth) {
console.log("\nProcessing " + "\n----------\n" + CONTRACT_NAME + " (" + contractFilePAth + ")\n");
var copmiled = SOLC.compile(FS.readFileSync(contractFilePAth, 'utf8'), 1)
SirinCrowdsaleCompiled = copmiled.contracts[":" + CONTRACT_NAME];
var bytecode = SirinCrowdsaleCompiled.bytecode
var abi = SirinCrowdsaleCompiled.interface;
var ctorParamsEncoded = getCtorParams();
constructor(props) {
super(props);
try {
if (window.ethereum) {
this.eth = new Eth(window.ethereum);
} else {
this.eth = new Eth(Eth.givenProvider || "http://localhost:8545");
}
} catch (e) {
this.eth = new Eth("wss://mainnet.infura.io/ws");
}
//Hanle binds
this.handleActionChange = this.handleActionChange.bind(this);
this.handleChange = this.handleChange.bind(this);
const history = createBrowserHistory();
const hash = history.location.hash;
const action = hash && hash.substring(hash.indexOf("/")+1, hash.length);
if (hash !== "#/" && allowedActions.includes(action)) {
this.state = {
action