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
var Web3 = require("web3"); | |
var web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:6020")); | |
var fs = require('fs'); | |
var test_code = fs.readFileSync('test.bin').toString(); | |
var test_abi = JSON.parse(fs.readFileSync('./test.abi').toString()); | |
var test_contract = web3.eth.contract(test_abi); | |
var test = test_contract.new({from: web3.eth.accounts[0], | |
data: test_code, |