All Questions

Filter by
Sorted by
Tagged with
1
vote
0answers
273 views

Is there a way to get the hash of a transaction from a contract? [duplicate]

I've found that tx.hash is not defined in contracts, is there a way to get or calculate the hash of the tx ? And if not, What is the reason for that? Is there a pattern to store information about a ...
1
vote
2answers
206 views

How (without libraries) can I get the public address from a private key?

I want to know a way to know the public address used for funds transfer from the private key. (As myetherwallet do when you get your wallet info by entering your private key) I don't care with wich ...
0
votes
1answer
184 views

How do I implement a deque in Solidity?

I have an array of finite size, say something like uint[100] Arr;. My question is, if I want to continually push to this array, what happens if it already has 100 uints in it and I push another one? ...
0
votes
1answer
252 views

Solidity Maps Content Listing using Loops

I am developing a test scenario in Remix (Solidity). I have seen a few sample codes, but am still unclear how this is done. I have attached a sample code (not complete) that would help clarify this. ...
0
votes
0answers
142 views

Using events and logs to get function returned value with a simple example

My question is related to this one: Can a contract function both change the state and return a value when it's called externally Question: How to read event/log content? I have a contract like:...
1
vote
1answer
933 views

No build method inside Web3j class

I'm trying to initialize web3j with following code: Web3j web3 = Web3j.build(new HttpService()); // defaults to http://localhost:8545/ Web3ClientVersion web3ClientVersion = null; try { ...
2
votes
1answer
826 views

How do I send a Hello, world! message to an ETH address through DATA? That is would be visible on Etherscan

How do I send a "Hello, world!" message to an ETH address through DATA? That is would be visible on Etherscan That's the whole question Is that possible in any way?
1
vote
1answer
3k views

mining with 2GB GPU with partial uploading

I see all older questions [*]. But I read in reddit Yes. But your efficiency is lowered. Use ethOS dagless mining. My question is whether this is true and which software allows this? I see ethOS ...
1
vote
1answer
1k views

Getting the Nonce for an Account [duplicate]

I know of three ways to get the nonce for an account. MyEtherWallet under the Offline Transactions tab. At the command line with Geth Manually count the number of outgoing transactions for an account ...
2
votes
0answers
643 views

Can I store data in an ERC20 token?

Can i store data, e.g. a string inside a token? If so, this data will follow the token around if I transfer it to someones wallet?
2
votes
3answers
502 views

Can a dapp support metamask as well as other means for keystore?

I am using Metamask for key storage in my dapp. My understanding is that the Metamask app injects a web3 object and handles all the signing functions where needed by itself. But Metamask currently ...
0
votes
1answer
47 views

How do I tell mist not to download geth, but use the system-wide version?

I run Manjaro Linux which is based on Arch, so I have a very up-to-date system version of geth. How do I tell mist not to download a per-user version of geth, but use the system-wide version instead?
14
votes
4answers
14k views

Solidity/Remix Error : The constructor should be payable if you send value. How to solve this?

pragma solidity ^0.4.16; contract MyToken { // This creates an array with all balances mapping (address => uint256) public balanceOf; // Initializes contract with initial supply tokens to ...
0
votes
2answers
2k views

Declare string inside function

I tried to declare string inside my function but it doesn't work. How to declare string inside function?
7
votes
3answers
10k views

Invalid JSON RPC response error for sendTransaction on Infura + Ropsten node + Truffle console

Calls work but transactions throw the error - Error: Invalid JSON RPC response: "" I am using web3 v0.19.0 & Truffle v3.4.9. Deploying contract using truffle, truffle migrate --network ...
0
votes
1answer
771 views

geth installation with homebrew stuck at Checking out tag v1.7.0

i am a complete newbie in the ethereum space and is trying to install geth on my mac using homebrew after the step : ==> Cloning https://github.com/ethereum/go-ethereum.git the process has stuck at ...
0
votes
1answer
262 views

mist configuration file

Does mist support reading default startup options from a configuration file? geth doesn't support configuration files, so when starting mist, I need to pass: --syncmode light --node-datadir "...
3
votes
2answers
3k views

Run mist without downloading blockchain

How do I prevent mist from ever downloading the blockchain? I have a small HDD and can't afford the disk space.
0
votes
1answer
1k views

Loading LevelDB in Java

I am trying to iterate through the ethereum ldb files. When I run this code my iterator believes there is nothing stored on the ropsten's testnet blockchain. There are no errors, and the iter gets to ...
4
votes
1answer
2k views

What does it mean by "msg.sender.call()"?

I'm reading the Function modifiers section of solidity doc. contract Mutex { bool locked; modifier noReentrancy() { require(!locked); locked = true; _; locked = false; } /// This ...
3
votes
0answers
2k views

geth vs parity: light client comparison

My computer is a laptop with a small SSD HDD, so I don't want to download the blockchain. Hence, I want to use --light to connect to other computers which do have a copy of the blockchain. Parity's ...
1
vote
1answer
774 views

Why is my MetaMask's account address same for both Kovan and Main network?

Aren't they created randomly and separately on each network?
0
votes
2answers
2k views

Ledger still shows that I have a balance of ETH, but I sent the entire amount twice to Bittrex

My Ledger is still showing my entire "balance" of ETH when I open the wallet, but it also shows the twice attempted transfer of the entire amount to Bittrex underneath it. Both times I tried to ...
0
votes
1answer
75 views

Occasionaly web3 returns contract old state even though transaction is mined

I have a method in my contract that is supposed to reset a list of items. bytes32[10] public items; function reset() { items = [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]; } In my app,...
2
votes
2answers
538 views

Ethereum C++ Contract ABI - any references?

I'm usually pretty good with but this has me stumped. I'm a fairly hard core C++14/17 embedded programmer attempting to learn the Ethereum blockchain. I'm starting with Solidity via a Pluralsight ...
2
votes
1answer
537 views

Implementing Events in Solidity (Remix)

I have a test code on Remix and have been getting ParseError: Expected Primary Expression. The error happens in function Enquiry -- at event definition - line. ParserError: Expected primary ...
1
vote
0answers
239 views

Parity warp sync termination on Ropsten

With the newest version of Parity (1.7.2beta), I cannot finish the warp sync process for Ropsten testnet. After getting nearly all the snapshots, getting this error: 2017-09-23 21:17:09 Syncing ...
4
votes
2answers
2k views

Web3js - "The returned value is not a convertible string"

Can someone please help me. While trying to invoke a constant function which returns string, I am getting "Promise RejectedError: ERROR: The returned value is not a convertible string:" ...
2
votes
2answers
941 views

Out Of Memory exception when using web3j in Android

I'm trying to integrate web3j in an android application. But the library gives an Out Of Memory exception when loading the wallet file: Credentials credentials = WalletUtils.loadCredentials("password"...
3
votes
2answers
598 views

Why ERC20 tokens dont use external keyword in the transferFrom function

I just realized that "external" keyword in a function declaration will cost less gas than "public" even if it can be only called from outside the contract. why not use that in the ERC20 token? ...
1
vote
1answer
679 views

How reliable is it to use Block number to calculate Time in Smart contract?

I have seen contracts use block numbers to manage when the crowdsale should start and stop. How reliable is this? I understand the average time in ethereum is 17secs between blocks, but can this be ...
1
vote
1answer
1k views

Solidity source code filename extension

I'm just starting coding in solidarity. I want my syntax highlighter Vim Solidity to make my code look pretty. What filename extension should I use for my source code? For example, Javascript uses ....
3
votes
3answers
2k views

How do I do the equivalent of Solidity's bytes32(a_signed_integer) in JavaScript?

I've got an app that takes various kinds of input via an HTML form, but always ends up sending it to a contract as bytes32. The expectation is that another contract that ultimately consumes the data ...
1
vote
2answers
2k views

What is the maximum number of blocks in a blockchain?

What is the maximum number of blocks in a blockchain?
0
votes
1answer
1k views

Port 30304/udp? Or is it 30301/udp?

I'm drawing a blank on a simple thing. I remember that I need to have 30303 open on tcp and udp for the listening and discovery. And I seem to remember that you need 30304/udp open. But I'm not ...
7
votes
1answer
1k views

why is the EVM stack limited to 1024?

Here you can see that if the EVM stack gets larger than 1024, it results in an error: Why is there this hard limit on the stack size? What is the justification for this not being parametrizable? ...
1
vote
1answer
215 views

Is a battleships implementation feasible?

A bunch of people created a chess system that runs on the EVM: here. I'd like to make a similar game of battleships but there seems to be an apparent difference. In battleships, you can't know what ...
1
vote
1answer
272 views

Security and Geth RPC

Sorry just a little confused. If the geth rpc node needs to be running on the live server (say you deploy your dapp to the world), does that mean everyone has access (via the web) to modify the ...
1
vote
0answers
236 views

System requirements for high capacity node?

I want to build a dedicated geth + parity machine that can have lots of connections to the network. What advice is there for system requirements if I want at most 100 connections? 1000 connections? ...
1
vote
1answer
601 views

Can you keep track of wallet address that trade your token on exchanges in smart contract?

Can you keep track of wallet address that trade your token on exchanges in smart contract after crowd sale ends? For example, I have token called OLG, it has been 100 days since ICO ends and many ...
2
votes
1answer
2k views

Optimizing Parity Peer Count

I would like to approx the max amounts of peers my box can handle and whether this max could be too much. Therefore: a) What is the main machine resource consumed by more peers besides network? CPU? ...
1
vote
2answers
53 views

How can i know my smart contract , compilar version.I cant verify my contract properly

I want to know compilar version of my smart contract.(https://i.stack.imgur.com/6K5sM.png)
0
votes
1answer
1k views

How to remove the contract storage associated with instance variables?

Reading the Solidity docs: delete a assigns the initial value for the type to a. So, it just clears or resets the value of a variable (e.g., an integer to 0)? I thought there was a way of removing ...
4
votes
1answer
1k views

Events not being detected in Nethereum

I have a function in one contract that looks like this: //Events event RequestReceived(bytes s); event WorldCreated(bytes32 indexed worldName, address indexed sender, address result ); ...
3
votes
1answer
5k views

Listening to Events from another smart contract [duplicate]

I want to listen to an event from inside another (deployed) smart contract. I am a complete noob to Ethereum and Solidity. So please excuse me for stupid questions, I might have misunderstood ...
2
votes
1answer
3k views

Is there a way to view or otherwise verify a contract's source code? [duplicate]

In token sales usually the source code for the contract is published. Is there a way to verify whether the published code is actually deployed in the given address?
2
votes
2answers
300 views

Can we apply modifier to an event in solidity just like function?

Let's say as per business I want to restrict certain users(addresses) from seeing the logs for a contract. I know there is "modifier" which can be set to function, to give access rights but Can we do ...
1
vote
0answers
180 views

Why do null topics affect the output of filter logs in geth?

I'm connected to a private chain with geth and this is the output I get when trying to retreive logs (first topic is function signature): > eth.filter({'fromBlock': 0, 'toBlock': 'latest', address:...
1
vote
1answer
2k views

Should INITIAL_SUPPLY & totalSupply be returned in Wei?

I was wondering if a token implementing ERC20 should return Values in Wei or Ether. Assuming I'm creating ABC token with a 100000 Token Supply & 500 ABC = 1 ETH. In the ERC20 protocol, for ...
0
votes
1answer
878 views

Can a contract function both change the state and return a value when it's called externally [duplicate]

Assume we have a test() function in our contract: contract { uint state; function test() returns (bool ){ state= 5; return true; } } I'm aware that if the test() function didn't have to ...

15 30 50 per page
1
610 611
612
613 614
792