Constructor parameters not being deployed on the blockchain issue #1118

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












this issue has been closed however I still see this in my code, contract deplyes, but the constructor does not see the args, I have tried this with both, version 1.0.0-beta-30 as well as 1.0.0-beta-36



here is my code, would appreciate any help...abi and bytecode are too long to paste here, but I can provide those if needed



`



let bContract = new web3.eth.Contract(abi);
let hexdata = bContract.deploy(
data: bytecode,
arguments: ["testbet", ["one", "two", "three" ], 123, 200],
);


let rawTx =
nonce: web3.utils.toHex(9),
gasPrice: web3.utils.toHex(web3.eth.gasPrice),
gasLimit: web3.utils.toHex(1000000),
data: "0x" + hexdata,
from: runENV.acctAddr,


let tx = new Tx(rawTx);
tx.sign(runENV.privateKeyBuffer);

let serialzedTx = tx.serialize();

web3.eth.sendSignedTransaction('0x' + serialzedTx.toString("hex"))
.on('receipt', console.log);









share|improve this question



























    up vote
    2
    down vote

    favorite












    this issue has been closed however I still see this in my code, contract deplyes, but the constructor does not see the args, I have tried this with both, version 1.0.0-beta-30 as well as 1.0.0-beta-36



    here is my code, would appreciate any help...abi and bytecode are too long to paste here, but I can provide those if needed



    `



    let bContract = new web3.eth.Contract(abi);
    let hexdata = bContract.deploy(
    data: bytecode,
    arguments: ["testbet", ["one", "two", "three" ], 123, 200],
    );


    let rawTx =
    nonce: web3.utils.toHex(9),
    gasPrice: web3.utils.toHex(web3.eth.gasPrice),
    gasLimit: web3.utils.toHex(1000000),
    data: "0x" + hexdata,
    from: runENV.acctAddr,


    let tx = new Tx(rawTx);
    tx.sign(runENV.privateKeyBuffer);

    let serialzedTx = tx.serialize();

    web3.eth.sendSignedTransaction('0x' + serialzedTx.toString("hex"))
    .on('receipt', console.log);









    share|improve this question

























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      this issue has been closed however I still see this in my code, contract deplyes, but the constructor does not see the args, I have tried this with both, version 1.0.0-beta-30 as well as 1.0.0-beta-36



      here is my code, would appreciate any help...abi and bytecode are too long to paste here, but I can provide those if needed



      `



      let bContract = new web3.eth.Contract(abi);
      let hexdata = bContract.deploy(
      data: bytecode,
      arguments: ["testbet", ["one", "two", "three" ], 123, 200],
      );


      let rawTx =
      nonce: web3.utils.toHex(9),
      gasPrice: web3.utils.toHex(web3.eth.gasPrice),
      gasLimit: web3.utils.toHex(1000000),
      data: "0x" + hexdata,
      from: runENV.acctAddr,


      let tx = new Tx(rawTx);
      tx.sign(runENV.privateKeyBuffer);

      let serialzedTx = tx.serialize();

      web3.eth.sendSignedTransaction('0x' + serialzedTx.toString("hex"))
      .on('receipt', console.log);









      share|improve this question















      this issue has been closed however I still see this in my code, contract deplyes, but the constructor does not see the args, I have tried this with both, version 1.0.0-beta-30 as well as 1.0.0-beta-36



      here is my code, would appreciate any help...abi and bytecode are too long to paste here, but I can provide those if needed



      `



      let bContract = new web3.eth.Contract(abi);
      let hexdata = bContract.deploy(
      data: bytecode,
      arguments: ["testbet", ["one", "two", "three" ], 123, 200],
      );


      let rawTx =
      nonce: web3.utils.toHex(9),
      gasPrice: web3.utils.toHex(web3.eth.gasPrice),
      gasLimit: web3.utils.toHex(1000000),
      data: "0x" + hexdata,
      from: runENV.acctAddr,


      let tx = new Tx(rawTx);
      tx.sign(runENV.privateKeyBuffer);

      let serialzedTx = tx.serialize();

      web3.eth.sendSignedTransaction('0x' + serialzedTx.toString("hex"))
      .on('receipt', console.log);






      solidity web3js






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 7 at 23:27

























      asked Sep 7 at 23:08









      satyendra

      555




      555




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          I think you want this:



          let hexdata = bContract.deploy(
          data: bytecode,
          arguments: ["testbet", ["one", "two", "three" ], 123, 200],
          ).encodeABI(); // <-- note this


          and then just:



          let rawTx = {
          ...
          data: hexdata,





          share|improve this answer




















          • worked..mucho gracias...
            – satyendra
            Sep 8 at 2:46










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "642"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fethereum.stackexchange.com%2fquestions%2f58313%2fconstructor-parameters-not-being-deployed-on-the-blockchain-issue-1118%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted










          I think you want this:



          let hexdata = bContract.deploy(
          data: bytecode,
          arguments: ["testbet", ["one", "two", "three" ], 123, 200],
          ).encodeABI(); // <-- note this


          and then just:



          let rawTx = {
          ...
          data: hexdata,





          share|improve this answer




















          • worked..mucho gracias...
            – satyendra
            Sep 8 at 2:46














          up vote
          3
          down vote



          accepted










          I think you want this:



          let hexdata = bContract.deploy(
          data: bytecode,
          arguments: ["testbet", ["one", "two", "three" ], 123, 200],
          ).encodeABI(); // <-- note this


          and then just:



          let rawTx = {
          ...
          data: hexdata,





          share|improve this answer




















          • worked..mucho gracias...
            – satyendra
            Sep 8 at 2:46












          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          I think you want this:



          let hexdata = bContract.deploy(
          data: bytecode,
          arguments: ["testbet", ["one", "two", "three" ], 123, 200],
          ).encodeABI(); // <-- note this


          and then just:



          let rawTx = {
          ...
          data: hexdata,





          share|improve this answer












          I think you want this:



          let hexdata = bContract.deploy(
          data: bytecode,
          arguments: ["testbet", ["one", "two", "three" ], 123, 200],
          ).encodeABI(); // <-- note this


          and then just:



          let rawTx = {
          ...
          data: hexdata,






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 7 at 23:28









          smarx

          16.4k1615




          16.4k1615











          • worked..mucho gracias...
            – satyendra
            Sep 8 at 2:46
















          • worked..mucho gracias...
            – satyendra
            Sep 8 at 2:46















          worked..mucho gracias...
          – satyendra
          Sep 8 at 2:46




          worked..mucho gracias...
          – satyendra
          Sep 8 at 2:46

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fethereum.stackexchange.com%2fquestions%2f58313%2fconstructor-parameters-not-being-deployed-on-the-blockchain-issue-1118%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?