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 [ethereumj]

For questions regarding the installation or use of EthereumJ, a Java library that implements the Ethereum protocol.

1
vote
2answers
15 views

How to convert smallest unit of ERC20 with less than 18 decimals to full coins without rounding errors?

I can just use web3's fromWei function for all token that have 18 decimal places but I'm not sure how to convert token to full token without having to worry about rounding errors. For example convert ...
0
votes
0answers
47 views

How can I store every credit or debit card payment transaction on an Ethereum blockchain? [on hold]

pragma solidity 0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ ...
0
votes
0answers
12 views

How to completely empty an Ethereum wallet using W3.py

I have an ethereum wallet, I need to calculate the amount to completely empty the wallet. So currently i calculate the needed gas like this, needed_gas = w3.eth.gasprice * 210000 amount_to_send = ...
0
votes
0answers
28 views

Query Ethereum Blockchain for functions return value of a Specified Smart Contract

I want to get smart contract functions return value sent by a specified smart contract within a range of blocks. I found a [manual] working method to achieve this: async function getTxsByAccount(...
0
votes
1answer
26 views

Truffle test failing

i am learning solidity contracts and ethereum dapps. I have created a smart contract for creating a ERC20 token on using truffle dev environment. pragma solidity ^0.5.0; contract LearnTokens { ...
0
votes
1answer
28 views

How to get the same SHA3 hash as soliditySHA3(ethereumjs-abi) returns using web3.sha3 in js?

I'm trying to hash a message as shown here: function constructPaymentMessage(contractAddress, amount) { return ethereumjs.ABI.soliditySHA3( ["address", "uint256"], [contractAddress, amount],...
0
votes
0answers
54 views

Encryption with Ethereum Keys for all Clients (iOS,Android,Web)

I was trying to encrypt data with Ethereum Key pairs. So far, I have managed to encrypt and decrypt data with these keys using ECIES schema on eth-crypto. Eth-crypto is a package which is built on top ...
1
vote
2answers
57 views

Pass specific address in Web3J send method

How to pass specific address in send method in Web3J? For example, using web3 javascript library, we can pass from address like below. contract.someMethod().send({ from: this.props.accounts[0] }) ...
0
votes
0answers
33 views

Zero balance and double entrance

I am unable to set balance to zero to all of the subscriber except the winner so that winners gets the complete pool prize and other gets zero balance. Also how can I prevent a subcriber for a double ...
1
vote
1answer
9 views

Token Transferring issue to the respective winner

My code has a function which randomly select a subscriber from the list and all of the sum of the tokens should transfer to the winner account address. but unfortunately it is not working for me. ...
0
votes
0answers
39 views

Deploying Smart Contract through EthereumJ (Java)

I have been stuck here for a while now. I am tried to deploy my smart contract using the EthereumJ library. here are my codes: pragma solidity ^0.4.22; contract MyNotaryEntry { string fileName; ...
1
vote
0answers
39 views

How to write a mock method for getting ether balance using Web3j Api. I am trying to mock Web3j and callig EthGetBalance method but I am getting Null

public static BigInteger OriginalMethod(){ // connect to node Web3j web3 = Web3j.build(new HttpService()); // defaults to http://localhost:8545/ // send asynchronous requests to get balance ...
0
votes
1answer
35 views

Unable ts start Bootnode, am new to private blockchian, Can anyone tell me what am i missing

bootnode : The term 'bootnode' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path ...
1
vote
1answer
343 views

Could not find artifacts for ./Election from any sources

I tried solutions provided in ethereum stack, but nothing worked for me. My smart contract file: pragma solidity ^0.4.15; contract Election { string public candidate; function Eletion () ...
1
vote
1answer
97 views

How do I call the burnFrom() function once my contract is deployed?

I'm using the Openzeppelin library in my contract where MyToken is StandardBurnableToken. Once I deploy that and I want to burn a set amount of the initial supply how do I call the function? I don't ...
0
votes
1answer
101 views

web3j.ethSendRawTransaction wait until the transaction is successfully mined - Web3j

Im trying to send 0 ether to the same account with Web3j, however when i run this code it give me directly the transaction hash, even if the transaction has not been mined yet and still pending. I can'...
0
votes
1answer
103 views

retry mechanism for transactions in web3j

In my Java-web-application I have (with one click) to send about 120 transactions after each other from the same address to the same smartcontract. My question: is there any java libraries or ...
0
votes
1answer
56 views

Run solidity bytecode with ethereumj

I am a newbie to Ethereum and I would like to run some simple smart contract code written in Solidity locally with my ethereumj virtual machine. I am aware of how to use EVM and aleth-vm to run some ...
1
vote
1answer
127 views

Cannot connect to parity JSONRPC from local machine

Here is my parity config: [rpc] disable = false port = 8545 interface = "all" cors = ["*"] apis = ["web3", "eth", "pubsub", "net", "parity", "parity_pubsub", "traces", "rpc", "shh", "shh_pubsub"] ...
0
votes
2answers
21 views

Struct Properties Cannot Be Identified

I have been learning Solidity and I have run into a scoping issue with the structs. I thought by default, all properties of a struct are put into storage. When I try to add the battles variable as an ...
3
votes
2answers
49 views

Dual blockchain

Could anybody please help me to understand how dual blockchains work? There are many Dapps which are built on dual blockchains, especially using the combination of Ethereum and Hyperledger. But I am ...
0
votes
1answer
41 views

LoadCredentials function returns file not found exception

I am using the following code to deploy my contract: @RequestMapping("/") public String index() throws Exception { Web3j web3j = Web3j.build(new HttpService("https://rinkeby.infura.io/v3/...
1
vote
0answers
53 views

Ethj spring boot blockchain transaction app error the method subscribe is undefined for the type object

package org.web3j.web3jspringbootstarter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure....
1
vote
1answer
64 views

How can I increase the nonce in Smart Contract?

We all know that the nonce of smart contract can be added 1 time when one subcontract is created using solidity. I'd like to know if the creation of subcontract is the only way to increase nonce. If ...
0
votes
0answers
20 views

Is there a way to force truffle (web3.js v0.20) to execute a failing transaction

In truffle/web3, when a transaction will fail, it refuses to send the transaction to the network. Is there a way to force it to send the transaction (and use the gas) even if you know it will fail. [...
0
votes
0answers
95 views

Unable to pass an array of addresses to a contract from js

I am trying to write a test for an airdrop contract, which takes in an array of addresses and sends a number of tokens to them. The test code is as follows: it("should airdrop 20 tokens to 3 ...
0
votes
0answers
133 views

Transfer tokens among multiple accounts in single function

I want the user to transfer tokens to an wallet instead of smart contract. function getTokens () public { require (token.transferFrom(msg.sender, address(this), amount)); require (token....
0
votes
0answers
14 views

Ethereumj FrameCodec vs Geth multiwriter - single and chunked packets

In trying to understand the RLPx encryption process, I notice that in Ethereumj the FrameCodec WriteFrame method takes the padded RLP payload and splits that into 256 byte chunks, updating the egress ...
1
vote
0answers
57 views

Why transaction hash isn't available inside solidity function call

I recently bumped into this Is it possible to get the transaction hash from within a Solidity function call? while I was looking for a way to save the transaction hash inside my contract. And ...
1
vote
2answers
644 views

How to get public key from private key in Web3j

I am developing Dapp by web3j and I attempt to convert private key to public key. I found this question this question that provides a way converting private key to public key in class ECKey, but I ...
0
votes
1answer
96 views

Gas refund uint8 array vs uint256 array

I am trying to understand how gas refunds work. I made this toy contract that fills in an array and separately does some work (loop a ton of times) and then deletes from the array to save on gas. See ...
1
vote
0answers
49 views

Out of Gas Exception

I have a smart Contract which generates a random number within a range and then check if the number is equal to the user's input. For the same input sometimes it works and sometimes it gives me ...
0
votes
0answers
61 views

How to find sha256 of multiple values?

How to find sha256 of multiple values of different datatypes? Ex: How to find sha256(1,4,"abc");
1
vote
1answer
115 views

DApp owner pays for the transaction without invoking smart contract

I am working on a chrome extension (crypto wallet) that lets you use one of our custom ERC20 token to make a purchase on websites. Most of the users of the extension don't have Ethereum in their ...
0
votes
0answers
118 views

Usage of Ethereum & Hyperledger Fabric on Medicalchain project

Please refer to this previous question of mine. Storing data on IPFS using KMS and ethereum I am unable to comment on the same post so posting a follow-up question on a different thread. Thanks ...
1
vote
2answers
303 views

Storing data on IPFS using KMS and ethereum

I am trying to build a blockchain on ethereum but keeping the data related to blocks in some distributed file storage system like IPFS or Storj and storing the hash of data in blocks. But we need our ...
5
votes
4answers
340 views

Why do you want to use different implementations of EVM?

Currently there are many implementations of EVM (Java, C++, Python, Go, etc). For example: I will be using Solidity to write DApp on the top of EVM-Java and EVM-Python, why would I want to use EVM-...
1
vote
1answer
256 views

How to generate deterministic keypairs using ed25519

I am trying to implement my wallet using ed25519 curve, i was using tweetnacl from this link "https://github.com/dchest/tweetnacl-js" its working, But i want to generate deterministic key-pair ...
0
votes
1answer
31 views

Smart Contract (SC) - Is it a Block itself?

Is SC a block itself on the Ethereum Block chain or it's just a storage? I know SC has its own hash address, it's own data stored in State variables, but does it has nonce and gas limit?
2
votes
2answers
886 views

How to use Solidity solc to compile A.sol that imports B.sol file?

I know how to install solc via "npm install --save solc" then use solc.compile to compile one sol file. But now I've got A.sol file that imports B.sol file, and when I run node compile.js, no error in ...
1
vote
1answer
192 views

Sending tokens via ethereumj. How create data block for transaction?

I am trying to send Plasma tokens in testnet but unfortunately misunderstand how I should create transaction properly. I try to create tx like this: String privateKeyString = "xxx"; BigInteger ...
1
vote
0answers
59 views

How to get transactions history details of specific account using Ethereum API [duplicate]

How to get transactions history details of specific account using Ethereum API currently i am using Ethereum API got get list of transactions based on ontract address, but i need full details of ...
0
votes
2answers
350 views

After truffle init I don't see MetaCoin.sol and other files expected to be there?

I have Truffle installed on an Ubuntu 14.04 LTS box. Here are my Truffle and Solidity version numbers: Truffle v4.0.6 (core: 4.0.6) Solidity v0.4.19 (solc-js) I am following along the Blockgeeks "...
1
vote
1answer
88 views

How to make user sign up and login on my decentralized application?(on production it should work without metamask)

Assuming that user who is going to signup is not having any ethereum account so how can I generate a public, private key and address for ethereum and make use of it to make further transactions. Users ...
0
votes
4answers
478 views

how much does using ethereum services cost

Lets say im creating my own cryptocurrency and my own blockchain on ethereum, what would be the basic costs for setting all this up if i am developing on Ethereum
1
vote
3answers
544 views

How to access ethereum smart contract(already deployed) in a Java application via its address using web3j?

I have an existing Smart contract address,abi,binary code. I need to access it from a Java application.Is it possible to do this without creating a java wrapper class?
0
votes
3answers
687 views

Implementing a Simple Voting DApp on Ethereum Blockchain

I am new to Ethereum, Truffle and Solidity. I am looking for a good resource to get started on implementing a DApp for Voting on Ethereum Blockchain. Could you please point me to the correct resource? ...
6
votes
1answer
1k views

How to get all ethereum address list which have my token?

I want a list of all ethereum address which have my ERC20 token in their account. Anyone have an idea how to get list address. beause i want give divided to each account which have my ERC20 token.
1
vote
1answer
517 views

Go can't find common and types package when building Geth client node project?

I am trying to build the Ethereum Geth client node on an Ubuntu 14.04 LTS box. I am using the 2017.3 Goland client. When I try to compile the project I get the errors below: interfaces.go:25:2: ...
0
votes
2answers
252 views

Metamask Rinkeby Ether Balance missing

I got some Rinkeby ethers from the Rinkeby faucet, after a minute or so, it showed up in my MetaMask Rinkeby network. But then after a while, my MetaMask shows 0 balance for the Rinkeby network. How ...