Linked Questions

17
votes
3answers
5k views

send VS call - differences and when to use and when not to use

Can somebody please explain the differences between using a send and call for contracts and when to use and not use these different methods? For example : msg.sender.send(number); msg.sender....
5
votes
3answers
13k views

How to transfer Ether between accounts in Solidity?

I'd like get ether balance of account in solidity. I tried the following, but it didn't work. Could you tell me how to do it? contract MultiplyContract{ address public buyer; address public ...
13
votes
3answers
6k views

Contract address.transfer method gas cost

Who will pay the gas in the following scenario? Lets say we have the following simple function. That sends an amount from the contract back to the sender.. just an example. function withdraw() ...
3
votes
2answers
552 views

Explain working of address.send function in solidity

I have been trying to get documentation for address.send() function, but i am unable to do so. Can someone please explain how address.send() function works, and how it can be used to send currency ...
1
vote
1answer
710 views

How send eth from a smart cotract

For example, I have 10 eth on my smart contract. How I send eth on another address?
1
vote
1answer
558 views

Call address.transfer() with Gas Limit and Price from another function

I have a smart contract where user can transfer ETH to an ICO. Like this function buyICO(paymentAddress, amount) { // do some other important things // transfer the amount to the payment address ...
0
votes
1answer
169 views

The constructor should be payable if you send value - contract sending ether to another contract throwing an error?

I'm trying to implement re-entrancy hack for my own contract. Here is a great article that explains the method: https://medium.com/@gus_tavo_guim/reentrancy-attack-on-smart-contracts-how-to-identify-...
0
votes
1answer
131 views

Are there any security issues to send token in fallback function?

I want to have a contract that releases an erc-20 token as soon as someone pays ether to contract. Let's call this contract Bid Contract. The abstract code goes like: function askForTokens() public ...
1
vote
1answer
82 views

Why can't we use Transfer() to get a fallback from a contract?

Does this discussion imply that we cannot call transfer() to some contract and call its fallback function and can only do the same by using call() and setting gas?
0
votes
3answers
26 views

how to send ether from contract to Ethereum account

I have 100 ether in my smart contract now I want to transfer the ether from contract to account automatically
0
votes
1answer
23 views

How Do I Write a Smart Contract to Put a Bounty on Something? [on hold]

For example, if I want to send 1 ETH to the first person to beat the Guinness world record of push-ups in one minute, how do I do that? What if I want to send the 0.001 ETH to someone for routing a ...