Questions tagged [ethereum]

0

votes
1

answer
20

Views

The contract is supposed to be private but every node can access the ledger

I am trying to follow this tutorial https://truffleframework.com/tutorials/building-dapps-for-quorum-private-enterprise-blockchains. I configured 2_deploy_simplestorage.js at is mentionned and the command deployer.deploy(SimpleStorage, 42, {privateFor: ['ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc...
MS B
0

votes
0

answer
3

Views

Node: How Can I Import Web3 To Node.js?

I'm trying to import the web3 library in Node.js so that I can handle Ethereum smart contract events, however I can't get the import to work. I'm running Babel on each file to convert to es5, and the import in Node's index.js file looks like this: import Web3 from web3; When I add that 'import Web3...
Steve
1

votes
1

answer
393

Views

How can I inject and use this javascript library (web3) with JavascriptCore

I have been trying to use the web3 library with JavascriptCore in Swift. A web3 instance is created by running var web3 = new Web3(new Web3.providers.HttpProvider('[the provider im using]')) This is the code I am trying to do this in Swift with: if let url = Bundle.main.url(forResource: 'web3', with...
user1113569
1

votes
2

answer
301

Views

Returning Struct Array in solidity

This is my contract code. Here I'm trying to store the coordinates of a particular trip. While storing the information contract executing fine. But When I retrieve the data, It should give the array of coordinates. But it is throwing an error. reason: 'insufficient data for uint256 type' contract Tr...
Vivek Aasaithambi
1

votes
1

answer
107

Views

Bit shifting fails after the 20th time (Solidity)

my goal is to bit shift a maxed uint256 so that zeros are iteratively added to the right side: ...1111111111111... becomes ...1111111111000... I the use the new shifted position as a mask. After about 20 something iterations my code stops working properly. Does anyone have any insight on the matt...
Sam Sendelbach
1

votes
0

answer
464

Views

Fatal error: runtime:out of memory during install of geth

# make geth build/env.sh go run build/ci.go install ./cmd/geth >>>/usr/lib/golang/bin/go install -ldflags -X main.gitCommit= -v github.com/ethereum/go-ethereum/dashboard # github.com/ethereum/go-ethereum/dashboard fatal error: runtime: out of memory runtime stack: util.go:45: exit status 2 exit s...
Jerry Hu
1

votes
0

answer
93

Views

Server, get data from a ethereum smart contract

I have a server where a javascript application runs. Now a user can get access to a smart contract via web3 to get data from it. Since only writing to the contract and not reading is critical, I want the read out of the data buffered from the server, but I actually don't know what the best approach...
HansPeterLoft
1

votes
0

answer
58

Views

Cannot find functions in call graph

I am beginning with Solidity and have begun experiencing this problem in my Contract. I created a test case to show the issue(pictured below with console log included) that is also getting the same error. Functions and events are not being recognized in the call graph and I am not quite sure why bec...
Ryan Cocuzzo
1

votes
1

answer
174

Views

Etherscan.io websocket sending old transactions

looking to get the most recent transactions from an address using the etherscan websocket api. For some reason the websocket is sending me transactions that are 2-3 hours old. For instance: // Subscribing to binance address (as its an address with a lot of transactions): socketData.ether.send(JSON....
NCal
1

votes
0

answer
847

Views

Sending a signed transaction to deploy a contract (Ethereum)

My goal is to send a signed transaction to create a smart contract, however, I am facing an issue I have not been able to solve for few days: When I send the transaction (on a private chain), there are two different ending: - 1 Web3js tells me it worked, I can see the transaction on the block. Howe...
Andromelus
1

votes
0

answer
785

Views

Ethereum Error: Transaction was not mined within 50 blocks

info: Error: Transaction was not mined within 50 blocks, please make sure your transaction was properly send. Be aware that it might still be mined! at /opt/bkzcoin_project/bkzcoin-backend/node_modules/web3-core-method/src/index.js:375:45 at tryCatcher (/opt/bkzcoin_project/bkzcoin-backend/node_mod...
Elisabeth Shevtsova
1

votes
2

answer
788

Views

How to generate Ethereum wallets(private/public keys) for users using PHP/JS?

I need to generate Ethereum wallets for each user of my site. I need to get private and public keys. How to do it using PHP or Javascript? For Ethereum I found web3.js library which I can use for getting access to an ethereum nodes, but I see examples only for checking balances or sending transactio...
Valentine Murnik
1

votes
0

answer
549

Views

web3 connect to testnetwork

I try to connect with web3.php to a smart contract, published in the ropsten test network via metamask. I used the following web3.php library: (https://github.com/sc0Vu/web3.php). To create an rpc server, I used ethereum go and run the following commands: geth --testnet removedb geth --testnet --rpc...
HansPeterLoft
1

votes
0

answer
293

Views

web3j replaying all contracts events

Question regarding Web3j library. How can I replay all the logs from the blockchain using web3j ? I know there is a method to replay all the logs from a particular contract: EthFilter filter = new EthFilter(DefaultBlockParameterName.EARLIEST, DefaultBlockParameterName.LATEST, '0xafc785653c...') web3...
RB_
1

votes
1

answer
458

Views

Transfer ERC20 token with Oraclize and Metamask

I'm a beginner and I've been exploring ERC20 tokens. Since a couple of days I have been looking for a solution to this, but in vain. The problem is the following. I am creating a contract, conforming to the ERC20 protocol. I want to add an extra functionality in the form of an oracle query. I.e., I...
user3708847
1

votes
1

answer
354

Views

Obtain public key byte array from Json Web Key

I have a Json Web Key that contains public key information and I'd like to get the public key as byte array. My goal is to eventually derive ethereum address from it, using Keccak hash. I understand the process of getting the address from the public key byte array, but I don't know how to obtain thi...
Tomislav Markovski
1

votes
0

answer
310

Views

Error When Creating an ERC20 Token Using Remix IDE

I've been going at it for hours trying to create my token, but everytime I click 'create' on Remix, it says: Invalid JSON RPC response: {'id':11,'jsonrpc':'2.0','error':{'code':-32603}} I've done this before and it worked. I'm getting really annoyed! I hate using Truffle as well, so I try to use th...
Cooper C.
1

votes
1

answer
208

Views

How does it the geth ethereum platform to automatically connect to the nodes that are in the main network of Ethereum?

I have tried to make connection between several nodes in my private network, but I do it with a direction enode, but Ethereum network does it without knowing my address enode, I want to know what kind of p2p communication protocols used so that all nodes are communicate with each other, and if that...
Astrid Villanueva
1

votes
0

answer
391

Views

web3.eth.getAccounts returns only limited addresses

In my website, there are more than 4700+ addresses currently. When I try to get all accounts using 'web3.eth.getAccounts' it only returns 3360 addresses. I don't know why this happens. For the remaining addresses which are not listed in getAccounts, I have tried 'getBalance' to check if address is v...
Deepak M
1

votes
0

answer
690

Views

Create, Sign and send ethereum Transaction

I am new in Ethereum. How can I sign an ethereum transaction. I am using Blockcypher php-client library. It works fine for Bitcoin. I have changed the network to eth.main and it works for ethereum too. But I can not sign ethereum transaction. The exception arises here in Blockcypher/Crypto/CoinSymbo...
Meysam Valuyan
1

votes
1

answer
169

Views

Data duplication between internal database and Solidity

There is a flow I want to achieve in my dapp, and I would appreciate some opinion. Flow: User sees a list of products and picks one to buy it. The user has their metamask unlocked and has enough balance. Setup: Rails on the backend, React on the frontend, ganache-cli, truffle, metamask (web3js). Dat...
Maximus S
1

votes
0

answer
361

Views

Legder Nano S - invalid sender

I'm trying to sign ethereum transaction with Ledger Nano S from NodeJS. It generates hexed transaction, but when I try to send it to the testnet Rinkeby, it returns error 'invalid sender'. I'm building an app with elecrtonJS. I tried to send this way MEW-generated and the same Ledger-sined hex and i...
1

votes
1

answer
122

Views

CMD log to file not working for Geth.exe

I'm using the below code to log output of a cmd call to a file however it's not working at times. System.Diagnostics.Process process = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); startInfo.WindowStyle = System.Diagnost...
JD_
1

votes
2

answer
250

Views

Get token balance as of x Date

I'm working on a project where I need to validate that a token holder had possession of tokens at a certain date in the past and then after that lookup the token balance as of that date. Is this possible? Here's a question that asks for something similar but without taking a date parameter. https:...
Marty
1

votes
1

answer
71

Views

how can let the smart contract send a transaction to a node

I am writing a smart contract which create a document signed by two parties and then let the smart contract send the signed document to someone to save it and do some analysis. Now I have the signed document by party A and B, how I can let the smart contract invoke a function to send this document...
sheemar
1

votes
1

answer
230

Views

What contract is used in Istanbul consensus mechanism in JP Morgan Quorum?

In '7nodes' installation example from JPMorgan Quorum github is used such a genesis file ('istanbul-genesus.json'): { 'alloc': { '0x0000000000000000000000000000000000000020': { 'code': '0x606060405236156100c45760e060020a60003504631290948581146100c9578063284d163c146100f957806342169e481461013057806348...
Nick Kernel
1

votes
1

answer
586

Views

Truffle contract works with Ganache but not on Testnet

I was able to create and deploy a contract locally to Ganache using Truffle. I could set and get a value successfully as well. I deployed this contract to both Rinkeby and Ropsten and was able to call the get function, but the set function failed with the error: Error: Invalid JSON RPC response: ''...
Seth Sacher
1

votes
1

answer
101

Views

Dynamically get an Ethereum node

I'm writing a web application using Ethereum at the moment and realize only now that I have to specific a web3.provider's IP address to tap into the blockchain. If I have to specify an IP address, how are web apps. (dApps) considered decentralized? I recognize the data may be ... but the utility of...
Charles Saag
1

votes
0

answer
324

Views

Why does admin.addPeer() work from certain nodes but not others?

I noticed that with a node on my AWS instance and geth node on my laptop, my AWS node can add my laptop as a peer, but my laptop cannot add my AWS instance. Both nodes use a similar geth command line to the following: geth --identity 'node2' --rpc --rpcport '8000' --rpccorsdomain '*' --datadir './'...
Coalited
1

votes
1

answer
305

Views

Error in generating Java Wrapper in Web3j

I am trying to generate java Wrapper for a smart contract, but it failed because of this error: Exception in thread 'main' java.lang.IllegalArgumentException: not a valid name: Main.sol:main at com.squareup.javapoet.Util.checkArgument(Util.java:64) at com.squareup.javapoet.TypeSpec$Builder.(TypeSpec...
sheemar
1

votes
0

answer
273

Views

How can I generate smart contracts to send arbitrary ERC20 tokens with Web3j?

I'm writing an android wallet similar in functionality to MyEtherWallet, and I can't seem to find any example of how to generate a contract using Web3j to send arbitrary ERC20 tokens. Does anyone have a good example of that or do I need to generate a separate contract for each token I'd want to send...
aknuck
1

votes
1

answer
400

Views

Ethereum private blockchain empty blocks mining

I have set up a private block chain with 2 nodes 1 being a miner node . However we are seeing lots of empty blocks being mined . i tried the solution suggested at this link https://ethereum.stackexchange.com/questions/3151/how-to-make-miner-to-mine-only-when-there-are-pending-transactions . But stil...
redeemed
1

votes
1

answer
349

Views

ERC 223 Token Standard is not Working

I am trying to create a new tokens using ERC223 standard. The tokens are created but when i am trying to transfer tokens to other wallet, the transaction hash is created and the transaction has failed. The tokens are deducted from my wallet and not added to destination wallet. This is my transaction...
Kishore
1

votes
1

answer
307

Views

How to create raw transaction using web3swift?

I'm working on a project related to blockchain and need to figure out how raw transaction can be possible. I got no reference for this as of now. I have tried matterinc/web3swift but unable to get exact thing.
Abhishek Thapliyal
1

votes
0

answer
82

Views

BlockCypher Account nonce too far behind transaction

I'm currently working on a DApp that involves sending transactions. I'm using BlockCypher to send the transactions since the API is fairly straight forward. One issue I'm finding is that when I run my API locally and call the send transaction method I receive the transaction hash and I'm able to che...
SwimmingG
1

votes
1

answer
190

Views

Gas required exceeds limit: 3000000.

pragma solidity ^0.4.16; contract createNewToken { uint256 total_ether_to_send; address private owner; //constructor function createNewToken() public{ owner = msg.sender; } // client request for tokens by sending ether. function requestForToken() public payable{ address sender = msg.sender; uint val...
Harsh
1

votes
0

answer
245

Views

Not able to get Metamask popup to appear

I have managed to write the following code. The idea is to be able to get a pop up asking how much ETH I want to send. But I am not able to get the pop-up. I have spent hours to fix this and not able to reach a conclusion. I am able to get the popup sometimes but only when I refresh the page. MetaM...
AddyTiger
1

votes
1

answer
57

Views

How to get the total amount sent to an Etherum address

I'm a noob at Ethereum and need to make statistics from blockchain data. I have a full node up and running with RPC ready, but can't find a clue in the doc on how to query : Total number of transactions in/out for a contract/address Total number of ether sent/received for a contract/address The onl...
simon
1

votes
1

answer
388

Views

Web3.js Ethereum - Is it possible to call 2 functions in one transaction?

Perhaps it's a silly question. But I'd like to know if it's possible to put 2 (or more) smart contract methods calls in one single transaction in Ethereum. The part of my code for one function call in a single transaction: var data = self.MyContract.MyFunc1.getData( param1); const options = { gasPri...
Alsofter
1

votes
1

answer
94

Views

Why do you need an browser extension like MetaMask to make transactions on Ethereum?

What is stopping web apps from accessing and making transactions directly on the blockchain?
Ali Abdelhadi

View additional questions