Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [web3js-v0.x]

For questions specifically about version 0.x of the web3js Javascript API and library for Ethereum

0
votes
2answers
17 views

Why web3.version.api shows undefined for web3 1.0 and not undefined for web3 0.20.3?

I'm trying to use MetaMask and web3js to talk to my smart contract. Below are my test codes. This is without defining a web3 js file and I get the result "0.20.3" at console. <script> window....
0
votes
2answers
45 views

Solc error invalid opcode, but works in truffle

I am trying to compile solidity code in solc(nodejs) but unsuccessful so far. I have created a sample app for demo. Here is sample's directory structure (node.js and truffle combined): │ app.js │ ...
0
votes
1answer
238 views

How to wait until transaction is confirmed web3 0.20.3?

I am new to web3. I am trying to connect UI with web3. Metamask version is 6.0.1 and web3 version injected by (don't know who), but it is 0.20.3. Following is my code to send ethers to a function of ...
0
votes
0answers
22 views

Contract's Mapping variable state change fails when called from web3 js javascript program

I am running into a strange issue with following contract- pragma solidity ^0.4.25; contract ApprovedPOCreateAndOwnershipTransferContract { struct PO{ bytes32 bill_to_location; ...
0
votes
0answers
20 views

Sending raw transaction to the contract 0.20.7 [duplicate]

Is it possible to send a raw, state-changing transaction to the contract using web3js version 0.20.7 or lower?
0
votes
1answer
158 views

How to get private key with web3 v0.2.x?

web3 version 1.x has the decrypt method, which decrypts a keystore v3 JSON. By using it the following way, I can get the private key easily: web3.eth.accounts.decrypt(keystoreJsonV3, password); But ...
1
vote
1answer
34 views

How to register an account in web3.js v0.x

I want to create a new account using web3.js < v1.0 In web3.js 1.0.x we have this method: web3.eth.accounts.create(); or at least this method: web3.eth.accounts.privateKeyToAccount(myPrivateKey)...
1
vote
1answer
226 views

web3.js Contract return null instead of string

Here is contract: pragma solidity ^0.4.17; contract Demo{ string public data; function Demo()public{ data = "Jiu Wei"; } function getData() public view returns (string) { return ...
0
votes
1answer
321 views

Calling a “view” function using web3js

--- HEAVILY EDITED --- Solidity contract: pragma solidity ^0.4.24; contract PatientRecords { struct Patient { string ID; string weight; string height; string diseasehistory; ...