Skip to main content

All Questions

Filter by
Sorted by
Tagged with
4 votes
1 answer
6k views

Can I send ethereum to a contract outside of its constructor?

How do I fund Solidity contracts with Ether? The example in the Solidity FAQ, http://solidity.readthedocs.io/en/develop/frequently-asked-questions.html#store-ether-in-a-contract, funds a contract via ...
glowkeeper's user avatar
5 votes
2 answers
905 views

return (bytes32,bytes32) , returns actual transaction address instead of the real data

I have attached my contract, which works fine on populus and compiles on geth. It is a simple source code: Test() function appends data into my linkedlist that is defined in my library. And get() ...
alper's user avatar
  • 8,404
4 votes
1 answer
936 views

When a contract calls another contracts, can it return values?

When a contract calls another contract, are values returned ? I've seen things like: function foo() external returns (bool success) { if( ... ) throw; return true; } But have read that calls ...
vera34's user avatar
  • 157
8 votes
1 answer
840 views

Why is my TX failing due to lack of gas even though the correct amount of gas was supplied?

Caveat: I tried to provide links to my transactions and addresses in etherscan.io, but I "need at least 10 reputation to post more than 2 links." I have an account that I want to sweep. I want to ...
vogelito's user avatar
  • 211
8 votes
3 answers
4k views

Reading values from a contract: When do I need transactions?

Since reading on the Blockchain does not need performance of other nodes, I wonder how I can get values from a Smart Contract without any transactions. I have created a little example contract: ...
Ba5t14n's user avatar
  • 213
5 votes
2 answers
1k views

calling a contract function from another contract [out of gas]

Consider the following two contracts A and B. Suppose I store these in a and b. Then when I make a call and try to pass two addresses as follows: a.reqswap(b.address,eth.accounts[0],eth.accounts[1]) ...
user813's user avatar
  • 331
7 votes
2 answers
3k views

How can I use "eth_sendTransaction" to invoke a contract and get logs?

I have deployed: contract test { function multiply(uint a) returns(uint d) { return a * 7; } } I can call the contract with "eth_call" : mpsp@ubuntu-slave2:~$ ...
Panda's user avatar
  • 153
1 vote
0 answers
60 views

Can two state-changing transactions be in a single block? [duplicate]

I don't know how Ethereum verifies the atomicity of the state of a contract in the mining process. Say I have a greet-counting contract. If two people call the greet function in (almost) the same ...
Q-chan's user avatar
  • 11
3 votes
1 answer
2k views

NodeJS+web3 - Reading from a contract works, how about writing to a contract? [duplicate]

In Mist you can call functions of contracts in two ways: On the left panel, to call functions that read from a contract (the result is immediate). On the right panel, to call functions that write ...
user1623521's user avatar
7 votes
1 answer
1k views

I created a wallet contract, sent ether to it and now cannot send to another account

While experimenting. I creating a wallet contract. Here is the address: https://etherscan.io/address/0xC23501aB1E8E5C5EDB0fFA83C5A4DcFb9c31a355 I sent some ether to it. Now I want to send the ether ...
Gianni D'Alerta's user avatar
3 votes
1 answer
104 views

Same functionality, new contract for new usage?

When different people use the same contract functionality, do they send to the same contract address? Or do they create their own new copies of the contract at a different address? If they use the ...
Wang's user avatar
  • 2,426
7 votes
1 answer
3k views

Passing ether with call to Solidity function

I have deployed a contract to testnet which appears to function. I have a function named contribute which gets the ether from the msg.value. The function is below and doesn't take any arguments. I ...
Bogdan's user avatar
  • 397
2 votes
1 answer
2k views

Understanding data payload on contract call [duplicate]

I'm running truffle's default example Metacoin: import "ConvertLib.sol"; contract MetaCoin { mapping (address => uint) balances; function MetaCoin() { balances[tx.origin] = 10000; } ...
Henrique Barcelos's user avatar
20 votes
2 answers
4k views

What happens when a smart contract gets several similar calls in the same block?

What happens when a smart contract gets several similar calls in the same block? Consider for instance this greeter: contract greeter { string name; function setName(string name_) { ...
Matias's user avatar
  • 1,109
5 votes
1 answer
462 views

Proper ethereum exchange workflow

I've recently found out, that there's no convenient way to monitor transactions to 'externally owned account' generated by some contract. I went to various forums and ethereum bugtrackers for an ...
curious's user avatar
  • 51
21 votes
1 answer
2k views

What is the order and concurrency behavior of multiple calls to a contract in a single transaction?

Suppose a contract has three call APIs that have side effects. What's the behavior if I try to: Call all three APIs from one address (i.e. issue three transactions if from nodejs). Are all three ...
Paul S's user avatar
  • 4,291
2 votes
2 answers
3k views

How can i sent ETH from a contract wallet to another account?

Use the mist wallet 0.3.9. The ETH from a pool is sent to a wallet address. How can I send the ETH from wallet to account? When I try to send from the wallet address to an exchange address, I saw ...
r-e's user avatar
  • 21
16 votes
1 answer
8k views

How much does it cost to use a contract?

Still new to ethereum and would like to know the price for a contract.
Patoshi パトシ's user avatar
195 votes
2 answers
60k views

What is the difference between a transaction and a call?

What is the difference between a transaction and a call? In some interfaces, I can interact with contracts via calls or via transactions. What is the difference between the two, and can contracts also ...
mKoeppelmann's user avatar
  • 7,636
12 votes
2 answers
997 views

What happens when two smart contracts recursively call each other?

As I understand it, a smart contract can "call" other smart contracts. So what happens when two smart contracts call each other in a recursive loop? Does the whole network break down and die?
Shelvacu's user avatar
  • 1,405
30 votes
4 answers
11k views

Does every node execute the contract code for each transaction?

This question was asked on Reddit a while ago: When a node sends a transaction to the network and has the receiver as a contract, does every node execute the contract bytecode with the inputs to ...
J-B's user avatar
  • 8,981
28 votes
2 answers
22k views

How do I know how much gas to use when calling a contract?

When I am calling (sending a transaction to) a contract how do I determine how much gas to use? Is there a way to calculate this upfront & what happens if I send too much / too few gas?
J-B's user avatar
  • 8,981
91 votes
9 answers
26k views

Can contracts pay the gas instead of the message sender?

Is it possible for a contract to pay the gas costs (or part of it) that result from the contract being called? Or does the sender of a message always pay the resulting gas costs no matter what?
mKoeppelmann's user avatar
  • 7,636

1 2
3