Constructor parameters not being deployed on the blockchain issue #1118
Clash 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);
solidity web3js
add a comment |Â
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);
solidity web3js
add a comment |Â
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);
solidity web3js
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
solidity web3js
edited Sep 7 at 23:27
asked Sep 7 at 23:08
satyendra
555
555
add a comment |Â
add a comment |Â
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,
worked..mucho gracias...
â satyendra
Sep 8 at 2:46
add a comment |Â
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,
worked..mucho gracias...
â satyendra
Sep 8 at 2:46
add a comment |Â
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,
worked..mucho gracias...
â satyendra
Sep 8 at 2:46
add a comment |Â
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,
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,
answered Sep 7 at 23:28
smarx
16.4k1615
16.4k1615
worked..mucho gracias...
â satyendra
Sep 8 at 2:46
add a comment |Â
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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password