Skip to content
This repository has been archived by the owner on Feb 14, 2021. It is now read-only.

Not able to deploy contract in step 5 #50

Open
mishaaaa opened this issue Aug 14, 2019 · 2 comments
Open

Not able to deploy contract in step 5 #50

mishaaaa opened this issue Aug 14, 2019 · 2 comments

Comments

@mishaaaa
Copy link

No description provided.

@mishaaaa
Copy link
Author

Command Given :
web3.eth.personal.unlockAccount(web3.eth.defaultAccount, "user").then(() => TokenDeployTransaction.estimateGas()).then(gas => TokenDeployTransaction.send({gasLimit: 5000000, from: web3.eth.defaultAccount})).then(contract => { console.log("Address of new contract: " + contract.options.address); TokenContract = contract; }).catch(err => console.log(err));
Error:
Promise {
,
domain:
Domain {
domain: null,
_events:
[Object: null prototype] {
removeListener: [Function: updateExceptionCapture],
newListener: [Function: updateExceptionCapture],
error: [Function: debugDomainError] },
_eventsCount: 3,
_maxListeners: undefined,
members: [],
[Symbol(kWeak)]: WeakReference {} } }

Error: Returned error: The execution failed due to an exception.
at Object.ErrorResponse (/home/krishnan/pwasm-tutorial/node_modules/web3-core-helpers/src/errors.js:29:16)
at /home/krishnan/pwasm-tutorial/node_modules/web3-core-requestmanager/src/index.js:140:36
at XMLHttpRequest.request.onreadystatechange (/home/krishnan/pwasm-tutorial/node_modules/web3-providers-http/src/index.js:96:13)
at XMLHttpRequestEventTarget.dispatchEvent (/home/krishnan/pwasm-tutorial/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
at XMLHttpRequest._setReadyState (/home/krishnan/pwasm-tutorial/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
at XMLHttpRequest._onHttpResponseEnd (/home/krishnan/pwasm-tutorial/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14)
at IncomingMessage. (/home/krishnan/pwasm-tutorial/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61)
at IncomingMessage.emit (events.js:203:15)
at IncomingMessage.EventEmitter.emit (domain.js:466:23)
at endReadableNT (_stream_readable.js:1129:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
parity version :
Parity Ethereum
version Parity-Ethereum/v2.6.0-beta-e38293b-20190708/x86_64-linux-gnu/rustc1.36.0

@mishaaaa
Copy link
Author

I have avoided the estimate gas command and given a new command.
The new command is
web3.eth.personal.unlockAccount(web3.eth.defaultAccount, "user").then(gas => TokenDeployTransaction.send({gasLimit: 500000000, from: web3.eth.defaultAccount})).then(contract => { console.log("Address of new contract: " + contract.options.address); TokenContract = contract; }).catch(err => console.log(err));
Error is
Promise {
,
domain:
Domain {
domain: null,
_events:
[Object: null prototype] {
removeListener: [Function: updateExceptionCapture],
newListener: [Function: updateExceptionCapture],
error: [Function: debugDomainError] },
_eventsCount: 3,
_maxListeners: undefined,
members: [],
[Symbol(kWeak)]: WeakReference {} } }

Error: The contract code couldn't be stored, please check your gas limit.
at Object.callback (/home/krishnan/pwasm-tutorial/node_modules/web3-core-method/src/index.js:333:46)
at sendTxCallback (/home/krishnan/pwasm-tutorial/node_modules/web3-core-method/src/index.js:484:29)
at /home/krishnan/pwasm-tutorial/node_modules/web3-core-requestmanager/src/index.js:147:9
at XMLHttpRequest.request.onreadystatechange (/home/krishnan/pwasm-tutorial/node_modules/web3-providers-http/src/index.js:96:13)
at XMLHttpRequestEventTarget.dispatchEvent (/home/krishnan/pwasm-tutorial/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
at XMLHttpRequest._setReadyState (/home/krishnan/pwasm-tutorial/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
at XMLHttpRequest._onHttpResponseEnd (/home/krishnan/pwasm-tutorial/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14)
at IncomingMessage. (/home/krishnan/pwasm-tutorial/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61)
at IncomingMessage.emit (events.js:203:15)
at IncomingMessage.EventEmitter.emit (domain.js:466:23)
at endReadableNT (_stream_readable.js:1129:12)
at process._tickCallback (internal/process/next_tick.js:63:19)

Even changing the gaslimit to 8000000 didnt solve the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant