All Questions

Filter by
Sorted by
Tagged with
0
votes
2answers
2k views

Returning dynamic array not works

I'm trying to build a function that, when called, returns a mapping as two different array. The problem that I have a mapping (address => uint) content2view and I have to get this value outside ...
0
votes
1answer
54 views

Latest block of multiple mining nodes

Lets say I have a private chain with 3 nodes (all mining) A, B and C. I want to get the latest block of my chain. I connect to node A and get this information with getBlock("latest"). Lets imagine ...
0
votes
0answers
528 views

“callback contain no result Error: Error: base fee exceeds gas limit” when call selfdestruct function (using Remix IDE)

I'm testing this simple contract. All the functions works well, but when I call the kill() function I'm getting this error: callback contain no result Error: Error: base fee exceeds gas limit I'm ...
0
votes
1answer
75 views

How get private key or password from my keystore [duplicate]

I had wallet from 2016, but i'm forget password login by keystore. Current i just had keystore, how i can get private key or password keystore? Thank so much
0
votes
2answers
909 views

create ethereum wallet in Api

I want to create an Ethereum wallet, and I need an address and a private key, but I am unable to generate both. Please suggest a way to generate key pairs.
0
votes
1answer
148 views

How to retrieve transactions' info such as gaslimit and gasprice from Etherscan?

This link shows the latest 500k transactions, and by clicking each one it opens a page with its info including gaslimit, gasprice, usedgas etc. https://etherscan.io/txs How can i retrieve the ...
0
votes
1answer
323 views

How to add peers to a private blockchain network without using IP address?

I have created a private blockchain network and added peers to that network using the admin.addPeers() command. But the problem is, in that method I have to give the local IP address of the system ...
0
votes
2answers
547 views

Why is string getter returning an empty response?

This is a sequence of another question I asked. I have the following contract contract User { string publicKey; function setPublicKey(string _publicKey) onlyOwner { ...
0
votes
1answer
869 views

how to check if my testnet geth node has mined some ether?

As per the instructions detailed in this post, I've created an account: and started running my geth node: how can I check if it's mined any ether yet? the answer of @lungj resulted in this:
0
votes
1answer
41 views

Error: Member “func” not found or not visible after argument-dependent lookup in address

I am trying replicate the program given at the following link: What is a function Selector However, I am not using the function selector. I am using the name of the function explicitly to invoke it ...
0
votes
0answers
115 views

If I stored an encrypted variable in a smart contract, how long would it take to crack?

Just trying to get some information... Lets say I did this. state = b'MySecretKey' _state = bcrypt.hashpw(state, bcrypt.gensalt()) _state = _state.decode('utf-8') And then stored that in the ...
0
votes
1answer
188 views

Creating an offline address creator for Ethereum

I found this Bitcoin Paper Wallet: https://bitcoinpaperwallet.com/bitcoinpaperwallet/generate-wallet.html I would like to add it Ethereum just for fun. On this question, they show how to create ...
0
votes
2answers
374 views

Can you obtain the ABI of a smart contract using the contract address and contract code?

I have an ABI I'm trying to use to execute a withdraw of Ethereum from a smart contract via MyEtherWallet, but I'm receiving an error of "Please enter a valid ABI." I'm concerned the ABI I have is ...
0
votes
1answer
62 views

How to return the change to the sender?

In this answer, @pabloruiz55 provides the following code for sending ether. SmartContract.sol function transferToOwner() payable returns (bool) { //Sender should forward at least 1 ether. ...
0
votes
1answer
553 views

Cannot connect to testrpc

I have a testrpc running on a virtual machine (Ubuntu 16.04) and it works properly when I interact with it using the truffle console. My only goal is to call a smart contract that simply sends ether ...
0
votes
1answer
111 views

Problem with meteor server side call to Ethereum node

I try to interact with Ethereum node via web3 lib. (meteor add ethereum:web3) Meteor 1.5.4.1 lib.js if (typeof web3 === ‘undefined’){ web3 = new Web3(new Web3.providers.HttpProvider(‘http://127.0.0....
0
votes
1answer
1k views

ETH wallet error

I want to download the ETH wallet and make light synchronization on my PC. I downloaded ethereum wallet, but after launch, the Checksum mismatch in downloaded node crashes! MD5: 308 ... Please install ...
0
votes
1answer
64 views

Node error when I deployed smart contract - Web3.js

I get this error when I deployed smart contract to my private chain. Error: Node error: {"code":-32000,"message":"unknown account"} This is my web3.js code. const bytecode = "...
0
votes
2answers
133 views

ethreum sent to my wrong adress im worried it wont be recovered [duplicate]

hi all I'm new to trading I'm hoping someone can help me out here I purchased a good bit of ethreum on the coinbase platform I made a ether wallet I had all the accounts and my security accounts ...
0
votes
1answer
417 views

What is the gas cost of keccak256(“abc”)?

According to this answer, the gas cost of keccak256 is: 30 gas + 6 gas for each word (rounded up) for input data to a SHA3 Keccak-256 operation I'm assuming that the size of a word is 256 bits and ...
0
votes
1answer
2k views

How to decrypt private key form keystore file, without using third party applications? [duplicate]

I would like to write a piece of code that takes input as UTC key store file and password, and returns decrypted Private Key. I am aware of options like "MyEtherWallet" but I would like to do using my ...
0
votes
2answers
5k views

Faster way to generate DAG?

From the Ethereum official documentation: The DAG is totally different every 30000 blocks (a 100 hour window, called an epoch) and takes a while to generate. Since the DAG only depends on block ...
0
votes
1answer
402 views

Upgrading to solidity version 0.5.0 getting deployment failed error with same smartcontract perfectly deployed on 0.4.24

The same smart contract is running smoothly in solidity version 0.4.24 but now when I update the solidity version and solving a lot of bugs inside my smart contract I intended to deploy that in ...
0
votes
3answers
1k views

How do I get the return value of a solidity function with web3?

The docs mention using MyContract.methods.myFunction().call().then(console.log); but methids methods I get the error then I get the error that the function is undefined. The code below doesn't ...
0
votes
1answer
213 views

How to get all the contracts deployed by a specific ethereum address?

It is anyhow possible to get all the contracts deployed by a specific ethereum address in lifetime? If yes, is it possible to get ABI details of the contract by their address?
0
votes
1answer
47 views

I am trying to add ether to one of my ethereum account using smart contract

function Execution (address _from, address _to) { _from.transfer(price); _to.getBalance(_to) += price; } 1) I think it is duplicate but i gone through but nothing helped 2) I ...
0
votes
1answer
399 views

How to setup parity light client?(warp sync is slow)

I have a full node synced using --warp but since I have a hdd, the final bit of the sync never catches up(due to the high transaction IO). How do I switch to a light clent on parity if I already have ...
0
votes
1answer
367 views

Setting values of an byte array dynamically

If I set the values of an array as follows, am I wrong? uint256 n = 0; bytes32[n] example; function getArraySize(uint256 arraySize) public returns(uint256 size) { size = arraySize; return size; }...
0
votes
1answer
474 views

Transaction signing fails Invalid RLP.“,”data“:”RlpExpectedToBeList"

I'm trying to sign and push a transaction using ethereumjs and Infura. It seems to be working and I'm getting a transaction hash back, but the transaction is not visible on Etherscan, and when I'm ...
0
votes
2answers
295 views

Calculate integer input length

I need to get the length of input which is an integer in bytes function mine(string s , uint i ) public view returns () { return (length of i); }
0
votes
0answers
142 views

How require() and assert() work in solidity?

I'm trying to validate a condition using require(). If the condition is false for the first time, the contract is stopped and reverted to its initial state. On the other hand, if the condition is true ...
0
votes
1answer
190 views

How can I send array of structs as arguments?

I want to send to my contract an array of currency and its price so it will store it: pragma solidity ^0.4.24; contract ExchangeContract { enum CurrencyType { USD, TWOKEY, BTC, ETH, DAI, USDT, ...
0
votes
3answers
939 views

Concurrent calls to a contract - state changes

So user a and user b both call a function (transaction) on a deployed contract with the code as bellow. uint numberA; uint numberB; address playerA; address playerB; function playANumber(uint number)...
0
votes
1answer
2k views

Transfer ERC20 Token using Ropsten Infutra with Web3

I created a contract token using the Ethereum.org token solidity code. It has a function called transfer to send tokens between accounts: function transfer(address _to, uint256 _value) I need to now ...
0
votes
2answers
185 views

Gas issue on sendRawTransaction on the rinkeby network

I'm facing a gas issue on rinkeby network on sendRawTransaction. Tested with various gas value to experiment and getting either insufficient funds for gas * price + value or exceeds block gas limit. ...
0
votes
1answer
260 views

Can't set gas limit for oraclize callback function higher than the default 200000

Could you please help me with the following. I am using OraclizeIt (https://github.com/oraclize/ethereum-api) to retrieve a JSON from some other service via REST. Basically the smart contract method ...
0
votes
3answers
2k views

calling smart contract functions from app.js

I deployed a smart contract to ganache network using truffle from account1. The code of smart contract is as follows. pragma solidity ^0.4.0; import "./strings.sol"; import "./safemath.sol"; ...
0
votes
1answer
166 views

Unable to input address[] parameter in remix

I need help for deploy below smart contract on remix IDE. I have facing a problem as I need to input to 'setgrantaddress' as address[], How to input data in it? There is two file name owned.sol and ...
0
votes
1answer
459 views

Truffle Exec Gets Stuck [closed]

I want to exec a script in the truffle console. script const artifacts = require('./build/contracts/Message.json') const contract = require('truffle-contract') const Message = contract(artifacts); ...
0
votes
1answer
170 views

Why I do not get returned value of function of my smart contract using testRPC and a Graphical User Interface?

I have a smart contract that is tested with remix and it works well. Its code is as follows : contract Weechain: pragma solidity ^0.4.15; // --------------------------------------------------------...
0
votes
1answer
783 views

Disable block mining reward in private testnet

Is there a way I can disable the generation of block reward in a private network during creation? Any parameter in genesis.json can do so?
0
votes
1answer
229 views

How to connect with Metamask and Smart contract?

I am ready with my frontend design. I have only 3 files HTML, CSS, and JAVASCRIPT. So, I didn't create any project or DAPP to have other files. Now next step is to connect with metamask and smart ...
0
votes
1answer
71 views

Gas is 0 when executing CALL opcode?

I wrote a very simple smart contract like this: contract Test{ function test1(address payable addr, uint256 value) payable public { addr.transfer(value); } } And I compiled it using ...
0
votes
1answer
121 views

Issue in creating App using Monax :- Contract not found in JSON

I am trying to create applications using Monax. I am using the reference given in Monax for developing app https://github.com/monax/hello-doug. I have created hello-chain as mentioned in their Read-me....
0
votes
2answers
35 views

Oraclize: Mismatching queryId and myid

I have the following contract that uses Oraclize: contract Test is usingOraclize { bytes32 public query; mapping (bytes32=> address) senderAddress; address public resultAddress; function ...
0
votes
2answers
129 views

How to send ETH to address(0) from msg.sender address using multiple token's contracts, with Solidity 5.x?

I need the safest way for an user to send any amount of Ethereum to address(0). The amount is calculated by the contract, and there is no limit (assuming there is enough funds). All the code I could ...
0
votes
2answers
596 views

Public struct array variable getter

I create a struct array and map it to an address: contract MyContract { struct something { bytes32 test1; bytes32 test2; bytes32 test3; } mapping (address => ...
0
votes
1answer
287 views

Problem of deploying contract with “testRPC” and “remix” : “creation of contract pending …”

When I try to deploy a contract using testRPC and remix, I receive: creation of contract pending ... I tried even the default contract of http://remix.ethereum.org. Steps: First I open cmd. Then ...
0
votes
2answers
134 views

Is it possible to see contract raw code from TxHash?

I created a contract. https://ropsten.etherscan.io/tx/0x74426948905cd6e70e8b9d64a660b3c179b7c8a224ca5cd0234842768eb501db I can see the input Data in hex on etherscan. How can I decode from this? I ...
0
votes
0answers
225 views

Cannot sign a message with web3js (invalid from address)

So I am trying to create a signature of a string, but I cannot do that, as I always get error stating MetaMask - RPC Error: Error: WalletMiddleware - Invalid "from" address. (code: -32603). I am ...

15 30 50 per page