Questions tagged [address.transfer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

What's the difference between Binance ERC20 and Coinbase ERC20 …?

As a newbie I made a mistake whilst transferring btc to from Binance and Coinbase. My mistake was I didn't check the receive address with Coinbase and it defaults to eth and I wanted to send btc to ...
0
votes
0answers
36 views

Safe implementation on Solidity 0.8.0 of a withdrawal and a refund

I'm here for asking of a SECURE way to implement on solidity 0.8.0 two functions: 1-Withdrawal() which sends all the ether of the smart contract to the owner address. My current implementation is: //...
0
votes
1answer
19 views

How to calculate the gas cost of Solidity's 'transfer'?

I have read that the gas cost of transfer function is 2300Ether. I have got the following contract having a function, testFunc(…), only containing transfer method as shown below, because I want to ...
0
votes
1answer
56 views

How to transfer any ERC20 token trough a function with Metamask?

I'm developing a function that accepts any kind of ERC20 token, and transfer it to the provided address. The idea is to execute the function connecting Metamask address, and transferring the desired ...
0
votes
1answer
32 views

Trying first transfer contract in solidity

So i´ve been experimenting with Solidity and Remix and i wanted to and a simple while loop to the .transfer and .balance method. While being able to deploy the contract, I can´t seem to be able to ...
0
votes
1answer
33 views

Sending a transaction to a non-existent address

What happens if you initiate a transaction to a non-existent address in geth? Is there any way to determine if an account exists as a legal address? Hope you can give me some help, thanks!
0
votes
1answer
19 views

How to pass msg.value as an argument?

I am trying to implement deposit functionality in my contract in the sense whoever calls the function below needs to deposit some ether. For example: Contract A calls the function below and again, ...
1
vote
1answer
133 views

How to deposit to WETH in Solidity 0.6 and above?

Solidity 0.6.0 introduced a breaking change in how ETH transfers are performed. The following doesn't work anymore: weth.deposit.value(amount)(); What is the latest syntax for depositing ETH into the ...
0
votes
0answers
127 views

trying to transfer HEX token from my mobile(android) metamask wallet to my laptop(chrome) metamask wallet

Didn't comprehend what a headache MetaMask (android) was going to be. Long story short, gave up trying to stake HEX tokens from my mobile device. I went to my laptop and discovered the android/chrome ...
0
votes
1answer
35 views

refund function in smart contract [closed]

I am looking to add a Refund function in my smart contract. Like If User A deposited 1 ETH in the contract, and uses refund function, he gets 1 ETH - Gas Fee back. I can do the transfer(address....
0
votes
0answers
18 views

Obtain ALL historical token transfer events for an address using Python [duplicate]

I would like to exhaustively obtain all token transactions for a specific address. Etherscan's API returns only the last 10,000 transactions in this way: Get a list of "ERC20 - Token Transfer ...
1
vote
1answer
42 views

Request a transaction amount in a function

I'm trying to have a function generate a request such that it pops up a Metamask request. I know I can do: require(msg.value == amount); to require the function call has a certain value. But this ...
0
votes
0answers
33 views

Failing to send() 1 wei from one contract to another

The following code is supposed to send 1 wei from the current contract to a newly created contract. The recipient contract gets created successfully and the sending contract has a positive balance, ...
3
votes
1answer
114 views

safeTransferFrom is undefined in buidler test

I have started using buidler for testing/compiling my contracts. In one test i have setup a scenario that a owner attempts to transfer a token to another wallet address. My contract is inheriting from ...
0
votes
1answer
34 views

Understanding addresses of contracts (when they deployed twice)

I just have a quick question about addresses of contracts. If I want to make a contract to transfere tokens, how do I get the correct addresses of the token I want? For Exsample: function transfer() ...
-2
votes
1answer
36 views

Depriving Address of my own wallet created? [closed]

I want to derive Address of my own wallet developed using web3 frameworks without looking onto etherscan for the Address. var Web3 = require("web3"); var url = 'https://ropsten.infura.io'; ...
0
votes
1answer
63 views

How can a Smart Contract pull an amount of Ether equal to its own balance from an External Account?

I'm writing a 2 Player Game. Rules: Player 1 must place a bet (and send some ether to the contract). Then, Player 2 must match the bet placed by Player 1, and send the same exact amount of ether to ...
0
votes
0answers
66 views

Move Ethereum from my contract to a new wallet on Ledger S (using MyCrypto?)

A few years ago, I bought 10 ETH and had it set up on a laptop using the standard software at the time, which I think was Mist. I then moved 1 ETH to a new contract that I set up within Mist, not ...
0
votes
1answer
454 views

How to forward tokens without paying a gas [closed]

I'm working on a project and I need to know if this statement is possible: I have 10 registered users. Each user has an erc20 wallet. It is possible that when user A, C, E, or whoever deposit their ...
0
votes
1answer
69 views

Transfer money between contracts

I'm quite new at smart contracts/Solidity, which I'm learning for a postgraduate course. In one of the assignments, we have to implement a little competitive game (something like the game of Seven ...
0
votes
1answer
129 views

Sending ETH from contract to EOA

OK, I'm baffled guys. maybe it's the amount of gas the function is using up that is causing this not to work. when I call the function: I get the following in response but no movement of Eth from my ...
0
votes
0answers
35 views

'VM Exception while processing transaction: revert\n' Error Processing transaction

I have read in various posts that this error occurs when there is a problem with executing function. So I'm asking about this error in regards to the code I have written. Please see below: contract ...
0
votes
0answers
101 views

Remix contract balance transfers Failing (Metamask / JS VM)

There is an issue with my smart contract not transferring any funds to any other address on the connected ganache instance. Regardless if I choose "JavaScript VM" or connect to my Remix, the ...
1
vote
0answers
72 views

WWarning! Error encountered during contract execution [Bad instruction]

When I invoke toll function, it encountered "Error encountered during contract execution [Bad instruction] " warning. Who knows why? thx pragma solidity ^0.4.24; /// 使用0.4.24是为了moac链 - www.moac.io //...
3
votes
2answers
76 views

Regular address turns into a contract after receiving a transfer?

To accept payments in ether myself, I first tried how others have implemented it. So I bought an item in a store that uses Coinbase Commerce to accept crypto payments and paid for my item with ether. ...
3
votes
2answers
1k views

Using “.value(…)” is deprecated. Use “{value: …}” instead

This works fine in Remix but when trying to work in VSCode (for compiling purposes; DApp course, trying to build .json through compile.js ) it throws the error Using ".value(....
0
votes
0answers
46 views

No transfer of ether

My Code below ( Following an Online Course, absolute beginner here ^_^) pragma solidity >=0.4.17 <0.7.0; contract CampaignFactory{ Campaign[] public deployedCampaigns; function ...
0
votes
0answers
16 views

get statistics by event filters or normal blockchain traversal

I want to ask what's the better approach among the following two: Filter events using address.eventFilter function or traversing the local blockchain block by block and getting events statistics. I ...
0
votes
1answer
28 views

using .call(): contradictory recommendations

Solidity documentation: You should avoid using .call() whenever possible when executing another contract function as it bypasses type checking, function existence check, and argument packing. ...
1
vote
1answer
41 views

tracing new address on new wallet in Ethereum [closed]

I am just wondering how the new addresses are anonymous in Ethereum. Suppose that I have a wallet A including many addresses on it. Then I have a new wallet, say wallet B, and opening new address on ...
1
vote
0answers
48 views

transfer(amount) failed even when it is not a contract

address payable receiver; receiver.transfer(amount); The receiver is NOT an contract, and the amount is only 0.4 ether, the contract is holding sufficient ether in its balance. I understood that ...
2
votes
2answers
132 views

Instantiating a contract with ether

I have a factory contract that I need to be able to deploy with some ETH. I'm getting an error TypeError: Member "transfer" not found or not visible after argument-dependent lookup in address. I ...
0
votes
2answers
676 views

Transfer ether from one account to another using smart contract

I`m trying to transfer ether from account A to a smart contract and from the smart contract to account B. I wrote some code that approximately works on Remix IDE, but I completely got lost with the ...
0
votes
3answers
750 views

Sending entire contract balance to address

I am trying to establish a basic reversed auction in solidity using the Remix IDE. In the last function i want to pay back the whole contract balance to a certain address. My approach with .transfer(...
0
votes
1answer
46 views

How to transfer ether to wallet addresses in an array?

address[] emp = [address1,address2]; amount = total/emp.length; for(uint256 i=0;i<employees.length;i++) { wallet = emp[i]; wallet.transfer(amount); } So This is the error I get. TypeError:...
0
votes
1answer
282 views

address payable type error

Just upgraded truffle to version 5 and having a problem with this new address payable type. contract Test { ERC721Full public tokenAddress; constructor(address _address) public { ...
2
votes
1answer
375 views

0x0000000000000000000000000000000000000000 address behaviour

I have a question about the possibly strange behaviours of address: 0x0000000000000000000000000000000000000000 We know that: ETH + ERC20 tokens sent there are burnt Upon creation of a new smart ...
1
vote
1answer
75 views

How can I send ether [duplicate]

Hey guys I am a beginer on Solidity. I write a function and try to send ether on remix accounts and check balances this accounts. But I can't connect accounts I think because when I check balance of ...
1
vote
1answer
123 views

How can I verify that two specific wallet addresses were involved in a transaction?

Given I have and know WalletAddress A (sender), WalletAddress B (receiver), the Transaction Hash and the amount ETH sent. How can I verify that those values were indeed involved in the given ...
1
vote
1answer
244 views

Is it possible for send() in Solidity to fail if value is sent to a valid external account?

I want to use something like the following as a fallback for failed transfers: if (!recipientAddress.send(amount)) { ownerBalance += amount; } After reading about using transfer versus send, it ...
0
votes
1answer
56 views

Web3 event listener - timing issue when immediately retrieving contract values

I'd like to be able to immediately get a struct value from a mapping after calling a function that updates the struct, however, when testing with Ganache, sometimes the event arrives to the listener ...
4
votes
2answers
3k views

Solidity: “send” and “transfer” are only available for objects of type “address payable”, not “address” [duplicate]

I'm trying to compile my smart contract with the solidity version 0.5.0. with the code below: function unbond(address wallet, bytes32 specifier, uint quantity) internal { bondage = ...
0
votes
1answer
43 views

3 level ether transfer

contract foster{ vulnerable v = new vulnerable(); attacker a = new attacker(address(v)); constructor() public payable{ // a.deposit(address(v)); // transferring 3 ethers to ...
0
votes
0answers
13 views

Transfer function not working properly with calculations

function payWorker1(address schoolId) public payable returns(bool){ require(Schools[schoolId].moneySent == false); require(Schools[schoolId].verified == true); Schools[schoolId]...
0
votes
1answer
122 views

.transfer fails

Trying to call .transfer() within a function makes it fail. I am aware that the difference between .send() and .transfer() is that .send dont throw. The function works properly when using .send(), but ...
1
vote
1answer
49 views

6 transfer functions result to out of gas

I have a function that in first call just counts values and in next calls transfer some amount of ETH. It's like: function() public { ... if (val !=0) { address1.transfer(val.mul(part1).div(...
1
vote
1answer
213 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
1answer
81 views

Which `EVM` bytecode is actually used to “deposit” the transferred Ether?

A quick question. Which EVM opcode is actually used to "deposit" the transferred Ether into the contract? From the EVM opcode list, there are only two opcodes related to the fund transfer: balance and ...
0
votes
1answer
106 views

buytoken function with erc20 interface

I was following a tutorial that can buy erc20 tokens and I'm now stuck with transferring tokens to a buyer account which I need more clarification. So basically, a buyer account is trying to purchase ...
1
vote
2answers
2k views

How to add an address for which I have the corresponding private key into MEW?

I'm quite new to Ethereum, so, pls, forgive me if I say something wrong. How can I see the balance of one already existing address, for which I have the corresponding private key, in MyEthereumWallet?...