Created
September 25, 2018 21:22
-
-
Save merlox/4ff7f87077e4f51879a0129a878d2a1f to your computer and use it in GitHub Desktop.
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
Contract = web3.eth.contract(abi) | |
contractInstance = Contract.new({ | |
value: web3.toWei(valueSelected), | |
data: bytecode.object, | |
gas: 7e6 | |
}, (err, result) => { | |
// This callback will be called twice, the second time includes the contract address | |
if(!result.address) { | |
console.log('wait until the block is mined with the contract creation transaction') | |
} else { | |
console.log("here's the contract address just deployed", result.address) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment