Most Popular

1500 questions
10
votes
1 answer

Geth: flag provided but not defined: -genesis

I'm trying to start an ethereum test net on windows 7, but I'm having trouble pointing geth at the genesis block. This is the command I'm trying: geth --identity "Anon" --genesis CustomGenesis.json --rpc --rpcport "8080" --rpccorsdomain "*"…
Sawyer
  • 300
  • 2
  • 9
10
votes
9 answers

Error : Could not connect to your Ethereum client with the following parameters:

Im creating my dapp with following below tutorial. http://www.dappuniversity.com/articles/the-ultimate-ethereum-dapp-tutorial however Im facing an error when I run truffle console it shows >truffle console Could not connect to your Ethereum client…
Trey
  • 103
  • 1
  • 1
  • 5
10
votes
3 answers

Is there a tool that creates a basic HTML interface from an ABI?

I am looking for a tool that builds a basic interface for a contract so that I can use this generated HTML as a starting point to build the front end. I am aware that Mist, https://chriseth.github.io/browser-solidity/ and…
mKoeppelmann
  • 7,616
  • 8
  • 36
  • 48
10
votes
1 answer

is the gas price on test net equal to main net?

I have 1 contract deploying on test net, let say it use 300,000 gas for executing 1 function. On main net, this contract will cost 300,000 gas per function also? Thanks
Alongkorn
  • 289
  • 2
  • 7
10
votes
2 answers

how to use unnamed parameters?

Solidity allows for unnamed function params, how to use them? contract C { // omitted parameters function func(uint k, uint ) returns(uint) { return k; } }
Roland Kofler
  • 11,638
  • 3
  • 44
  • 83
10
votes
2 answers

How to list all the contracts currently on the blockchain?

I know one way to interact with contracts is, in the geth interface, to use the command: eth.contract(ABI).at(Address) But for this I will need to know the ABI and address of the contract in advance. What if I want to browse the contracts currently…
Sukhmaninder
  • 491
  • 2
  • 6
  • 14
10
votes
2 answers

Is it safe to commit truffle build files to Github (open source)?

Regarding the json build files that Truffle produces based off of my smart contract, is it safe for this information to be treated as public? I just want to be sure it doesn't contain any sensitive cryptographic signatures reserved for the contract…
Jay Welsh
  • 543
  • 2
  • 7
10
votes
3 answers

Passing Struct as an argument in call

I am trying to pass a struct as an argument while calling the function of another contract: pragma solidity ^0.4.24; pragma experimental ABIEncoderV2; library Test { struct TStruct { int x; int y; } } contract A { function…
Suvam Mukherjee
  • 103
  • 1
  • 1
  • 5
10
votes
2 answers

Manually execute transactions using testrpc and truffle

I started doing a bit of work in the geth console: geth --dev console but have moved to developing using truffle. To debug in the geth console, I'm used to executing the following: eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1],…
timothyylim
  • 429
  • 4
  • 11
10
votes
1 answer

Unused variables warning in address.call return tuple (bool, bytes memory)

I have the following code fragment. function forward(address destination, bytes memory data) public { (bool res, bytes memory retData) = destination.call(data); assert(res); } Since retData is not used, I am getting the following warning…
ivicaa
  • 7,519
  • 1
  • 20
  • 50
10
votes
2 answers

About Abi Encoder V2

I came across the following code and found the term "pragma experimental ABIEncoderV2". Can anybody be specific in telling what this actually means? //pragma solidity ^0.5.2; pragma experimental ABIEncoderV2; contract test { struct document{ …
Sourav Kumar
  • 125
  • 1
  • 2
  • 9
10
votes
2 answers

How to resend a transaction not recognized by the network?

I've sent a simple transaction (no smart contract invocation) while my geth node had no peers attached. It created the transaction fine and returned a transaction identifier. Even with many nodes connected now, I cannot find this transaction on any…
q9f
  • 32,913
  • 47
  • 156
  • 395
10
votes
6 answers

address.transfer not working

pragma solidity ^0.4.23; contract ApprovalContract { address public sender; address public receiver; address public constant approver = 0x5AEDA56215b167893e80B4fE645BA6d5Bab767DE; constructor() public { // tbd } function deposit(address…
Sumeet_Pol
  • 201
  • 2
  • 4
10
votes
1 answer

How to check if a transaction is still in the blockchain?

Say we want to confirm that a value transaction tx has reached certain finality, which we define as waiting for 12 block confirmations. We do this to drop the probability of tx getting lost due a fork or it getting included in an uncle block. The…
randomguy
  • 459
  • 4
  • 13
10
votes
1 answer

Writing secure Smart Contracts in Solidity?

With the DAO hack, it becomes even more important for developers to write secure smart contracts and be aware of pitfalls. Are there any good reference points/links which can describe the best practices around security of Solidity based Smart…