Linked Questions

1 vote
1 answer
3k views

What is the core difference between send and transfer method of address payable in solidity? [duplicate]

I'm learning solidity I got two methods for transferring ether <address payable>.send(1 ether) <address payable>.transfer(1 ether) Both are used to transferring ether to the recipient ...
Rathore's user avatar
  • 115
0 votes
0 answers
25 views

What is the recommended way to implement `withdraw` to a Gnosis Safe? [duplicate]

I recently implemented a withdraw function from my smart contract to a Gnosis Safe address, and I ran into many problems because the Tx was failing due to out of gas. After many research I finally ...
eightyfive's user avatar
6 votes
4 answers
37k 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 ...
Toshi's user avatar
  • 2,357
18 votes
3 answers
16k 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() ...
Cody Popham's user avatar
20 votes
2 answers
9k views

Is transfer() still safe after the Istanbul update?

In other words, is using transfer() safe? function transfer(address contractB) public { contractB.transfer(1000); //balances[msg.sender] -= 1000; } How about using call.gas? function ...
Robert Ggg's user avatar
19 votes
3 answers
10k 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....
Alex Darby's user avatar
19 votes
1 answer
4k views

How much computation can be done in a fallback function?

Simply sending Ether to a contract, will run the contract's code. In Solidity, this code maps to what it calls the fallback function. How much work can be done in a fallback function?
eth's user avatar
  • 85.7k
1 vote
0 answers
3k views

How to use transfer(), send() and msg.value?

When I deploy a contract with a function with receiver.transfer(), receiver.send() or a msg.value function, the function can't get executed when I try to interact with it (MyEtherWallet and web3 via ...
criplingtrader's user avatar
3 votes
2 answers
806 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 ...
Shoaib Iqbal's user avatar
1 vote
1 answer
2k 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 ...
Panda Power's user avatar
0 votes
1 answer
2k views

When is hashing used when creating a smart contract?

I was going through the solidity docs and in a contract example given I have seen keccak256 used. // Perform checks to determine if transferring a token to the // `OwnedToken` contract should proceed ...
YulePale's user avatar
  • 1,843
-1 votes
2 answers
2k views

how to transfer a specific balance from a smart contract?

Whenever someone buys a smart-contract the amount (in Wei) get stored in SC(Smart Contract) address(this) += msg.value. Now I am trying to create a function to redeem the balance of the SC ...
iamsujit's user avatar
  • 203
1 vote
1 answer
1k 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?
blanry's user avatar
  • 93
2 votes
1 answer
751 views

Is the "transfer" call in Solidity asynchronous?

I'm asking myself if the call to a function like transfer in solidity is asynchronous. In other words, I'm working with the following contract function count_and_pay() public { if (lockCon == true)...
macros's user avatar
  • 23
2 votes
1 answer
712 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?
Aleksandr's user avatar
  • 149

15 30 50 per page