daily pastebin goal
9%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const thisContract = new web3.eth.Contract(abi);
  2. thisContract.deploy({  
  3.         data: bytecode,
  4.         arguments: [< parameters of the constructor>]
  5.     }).send({
  6.        from: "0x3455D7167A2EE2d660EE85F8e90C6b3B1cCB7163",
  7.        gas: 5000000 ,
  8.        gasPrice: '3000000000',
  9.        value: 5000 // here we determine the balance of the contract
  10.     },
  11.     function(error, transactionHash) {
  12.         console.log(error);
  13.         console.log(transactionHash);
  14.         console.log('function exec');
  15.     }).then(function(newContractInstance) {
  16.     console.log('Contract Instance:' + newContractInstance.options.address);
  17. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top