Questions tagged [address.transfer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
39 views

Transfer Ownership of a contract from one adress to another problem

I am Digital Desginer and i wanted to sell my Designs as of NFT, so that I found a guy to write me an smart contract on polygon network for me to able to publish my arts on blockchain . so After he ...
BitcoinBrothers's user avatar
1 vote
1 answer
36 views

Creating an ICO contract

I'm creating a simple ICO contract, it sends the amount of the token bought to the buyer as soon as the contract receives ether, and then sends the received ether to a different wallet, I've been ...
Santos's user avatar
  • 17
1 vote
0 answers
23 views

Can I trust that the value of address(this).balance is up-to-date if the function that transfers eth based on it is under a re-entrancy attack?

Is this function a secure way of transferring the locked value to the winner? function resolve(bool _chooseHead, uint _randomNumber) public { require(msg.sender == partyA); require(keccak256(...
Mila A's user avatar
  • 202
1 vote
1 answer
554 views

when ever i request for testnet goerli or sepolia i receive the testnet some random address it been received from me

this address is receiving all my testnet eth 0x000ED96F3C5636BBB1A4fa59B96C2CCD042e5000 without my permission and approve has you can see the second i receive the eth its been send to that address i ...
sammed-21's user avatar
0 votes
1 answer
70 views

UNBLOCK ADDRESS

I trust you are well. I tried transferring my VRA to my address and I am facing this error Fail with error 'ERC20MintablePausableBlocklistable: account is blocked' Here below is my transaction ID/TX ...
Gregory's user avatar
  • 11
1 vote
1 answer
40 views

Error While trying to Use provider.getAddress Module

When I try to run this module, it giveas an error "TypeError: provider.getAddress is not a function". const fs = require('fs') const Web3 = require('web3') function loadAccount (...
Vidhan Mangla's user avatar
0 votes
1 answer
86 views

How can I set amount value in address(this).balance

Like i want to Insert the value that how much ethers are transfer from my smart contract. I tried this second day but it's not working so i'm looking for solution any help is highly appriciated here ...
MindCoder's user avatar
1 vote
1 answer
64 views

"Converting Address to Address Payable - Need Assistance"

below is my code : function withdraw() external isOwner() { address payable owner = address(uint160(getOwner())); owner.transfer(address(this).balance); } what is wrong in the ...
Baby's user avatar
  • 29
1 vote
1 answer
333 views

Why I can't import private key to metamask?

I'm new. Sorry for the question. Please, help me to understand why I can't import a similar private key to metamask: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE8AF48A04CBFD47E8CB0366361 how I can fix this?...
Vincent's user avatar
  • 11
0 votes
3 answers
124 views

Can an ETH transfer get blocked?

I minted 3 NFTs on www.cosmicpace.com because a guy dm'd me on IG asking to buy them there. That went fine, but when I tried o withdraw the funds, I received an email from internalrevenueserviceirs@my....
user112591's user avatar
0 votes
0 answers
192 views

transfer tokens from smart contract to wallet

I want to transfer tokens from my smart contract to my wallet, but it isn't working. My smart contract (Which I deploy to Mumbai testnet with hardhat): // SPDX-License-Identifier: MIT pragma solidity ^...
Dani S's user avatar
  • 21
0 votes
2 answers
314 views

What is causing this invalid opcode error when I call the transfer function?

I am working through the process of developing a simple ERC-20 token to learn more about smart contract development. I am running into an issue on my coin sale contract, however. When I wish to end ...
ho88it's user avatar
  • 21
2 votes
3 answers
76 views

Inconsistent NFT transfers?

I am fairly new to the blockchain. My understanding of an ERC-721 NFT is that it should be passed atomically between addresses. In particular, if I track the "from" and "to" ...
Bill Bradley's user avatar
0 votes
2 answers
132 views

Please explain why my account balance is almost 0

I sent some ethereum to an account and the incoming transaction shows up. Also there is an outgoing transaction of a small amount of ethereum, but the final balance of the account is close to zero. ...
mybinaryromance's user avatar
0 votes
1 answer
23 views

Connect Recipient Wallet - 'receive' function not defined

sorry to bother, trying to get an acknowledgment that my sender(msg.sender) address is sending to the receive() external payable. compiles fine, doesn't deploy correctly to show +1ETH in recipient ...
alastair wright's user avatar
0 votes
1 answer
510 views

How to transfer custom ERC-20 token with Ethereum in one transaction

I would like to send custom ERC-20 token with Ethereum in one transaction. I know how to send both of them alone... How to do it it one transaction? SEND CUSTOM ERC-20 TOKEN (There USDC): <script ...
david751's user avatar
0 votes
1 answer
141 views

I sent my friend Ethereum back to the address where he originally sent it to me from, but it went to "Coinbase Wallet 3" instead. Help me understand?

I am new to crypto. I understand that I will probably never get my money back, but I would really just like to understand how/why this happened. My friend sent me ETHER from a coinbase mobile wallet ...
Abby's user avatar
  • 1
1 vote
1 answer
28 views

Paycheck contract keeps trying to send to a new random contract address/not working properly

I'm very new to Solidity and facing a dumb problem. I'm trying to create a contract that pays my employee Mike (ex). Here, withdraw() function worked as expected. It returns ETH to my wallet again ...
SushiGirl's user avatar
0 votes
1 answer
217 views

Gnosis safe transfer function `Approve Hash` but does not transfer erc20 token

I am using the gnosis-safe core SDK here to create transactions to transfer Eth out of a deployed safe proxy. Doc: https://github.com/safe-global/safe-core-sdk/tree/main/packages/safe-core-sdk#...
chibro2's user avatar
  • 103
0 votes
1 answer
212 views

My contract is not getting paid with TETHER. (Cannot transfer)

I am creating a Smart contract that produces X Coins. If they send 1 USDT to the contract, I want to give 1 X Coin, which they can withdraw whenever they want. The reason why I want to use ...
AhmetE's user avatar
  • 1
0 votes
1 answer
94 views

Solidity: Neither address.send nor address.transfer nor address.call is working

Problem Whenever I call the paytest function (please see code snippet below) from javascript (please see code snippet below) i receive the below posted error message. Whether i use address.send, ...
PupSt4r's user avatar
  • 47
0 votes
1 answer
182 views

address.transfer() fails, while address.call{}() works fine in reentrancy attack. Why?

I was trying to learn reentrancy attacks and how to save the contracts against them. I previously user address.transfer() to withdraw the amount, but the function reverted when performing the attack. ...
Shubham Sharma's user avatar
0 votes
0 answers
20 views

How can I transfer this ROI value inside RateOI function value to the contract itself and the contract Balance gets updated

contract RATE { function contractBalance() public returns(uint){ return address(this).balance ; // store = address(this).balance; // console.log(store); // store =...
new programmer's user avatar
3 votes
1 answer
1k views

How to send ether to a contract (even if the contract doesn't implement receive or fallback functions)? [duplicate]

If the contract doesn't implement the receive or fallback function as payable, it can't receive funds?
Eric Nordelo Galiano's user avatar
0 votes
1 answer
87 views

Send ether from one address to another every month (like EMI payment)

I want to send some amount of ether(let say 0.1 ether) on every 1st of month to another address. I have a smart contract to send ethers from one address to another but it's a manual process. For every ...
Chandan Kumar's user avatar
1 vote
3 answers
465 views

Transfer function reverts

I just started learning solidity and i am stuck with address.transfer() Reverts when using send(). Works fine if i use msg.value but reverts when using uint256 amount to address.transfer(). // SPDX-...
Pemba Norsang Sherpa's user avatar
0 votes
0 answers
84 views

Why huge difference between number of address transfers and token transactions on etherscan?

I am trying to use the etherscan API to get the list the most traded tokens in a day.I came accross this endpoint, but as shown above, it does not contain all the token transactions (as shown in the ...
OrganicMustard's user avatar
0 votes
1 answer
56 views

auto generated functions by solidity

send and transfer are automatically generated function to send ether(wei) to some address. I tried to search a list of such functions in solidity documentation but to no avail, can someone help here? ...
user98056's user avatar
3 votes
2 answers
1k views

Cannot tranfer() ETH to Gnosis Safe

I'm praying to the blockchain gods that somebody answers us.   I'm with a NFT collection. We ran our pre-sale the last 2 days and collected 56.925 ETH. The smart contract address with the withdraw ...
jremi's user avatar
  • 141
0 votes
1 answer
102 views

How do I split the Eth received from the minting of a ERC20 token

I have an ERC20 token with a mint function that looks like this: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract ...
John Devitt's user avatar
0 votes
0 answers
43 views

Transfer condition modification

I am trying to add a condition that when the token is sold, change the fees to 7, in case it is a purchase, leave it at 1. Would the code shown be correct? In any case, what would be the best practice?...
Jhonatanbsc's user avatar
0 votes
1 answer
520 views

What is the "bytes memory" in (bool success, bytes memory) = some_address.call{value: some_amount}("")

I understand that the success tells if the receive/fallback methods returned successfully but what does the memory give?
tythereum's user avatar
1 vote
0 answers
179 views

Remix: Test Failed and the Message is " Transaction is reverted"

I am sending ETher from the test contract and then checking the balance but I am getting the message, Test Failed and Transaction is reverted. My contracts are: //pragma solidity >=0.4.22 <0.9.0;...
zak100's user avatar
  • 1,406
1 vote
1 answer
59 views

Converting to address payable not working

address payable constant public pillowInc = address(uint160(0x4B38016118FDE970e2371740F849840aEc745c7B)); address payable constant public pillowInc = 0x4B38016118FDE970e2371740F849840aEc745c7B; ...
Michael's user avatar
  • 51
0 votes
3 answers
53 views

Did my tokens land in an exchange walllet... or in a black hole?

About a month ago I misread a blog on Binance.us which stated that they now support Polygon (Matic). I assumed that meant I could send any token on the Polygon network to my binance account. So... I ...
Walterd's user avatar
0 votes
0 answers
165 views

Transfer or swap?

I'm newbie in crypto, and I think I made a "mistake"... I mine a coin who haven't got any exchange or swap ! Is there a way to use smart contract to help me ? Like a function tranfer or swap ...
Arnaud's user avatar
  • 1
0 votes
0 answers
87 views

Ronin wallets being compromised

I want to format or configure my ronin wallet in a way that if any ETH comes into the address, it will automatically be sent to another address. I have the feeling that my private key is being ...
vic brosas's user avatar
1 vote
1 answer
362 views

Transfer to multiple addresses without a Loop

I an in search way to send tokens from a contract to a list of all addresses (an array or mapping) without using a loop(as I know gas fees for this can become a huge issue). I have a contract, that ...
Larry t's user avatar
  • 11
0 votes
1 answer
88 views

Issue with assigning arbitrary values to .call{value: msg.value}

Just learning Solidity here. I am trying to pass an receiving address, and an arbitrary amount (other than msg.value) to my transfer function, but it is just not working for me. This is the code: ...
Controlla22's user avatar
0 votes
1 answer
730 views

Solidity: ERC-20 TransferFrom reverts after approval

i am trying to code a smart contract which takes the tokens of the player who enters. function enterToken(address token, uint amount) public { uint _amount = amount * 10 ** 18; IERC20 ...
Royal.Flush's user avatar
0 votes
2 answers
39 views

Calling a function[A] that in turn calls a function[B] from another Contract

I have two Contracts, Domain and Serial deployed separately. NOTE: Most of the code is ommited for simplicity. contract Serial { Domain DOMAIN; //Domain contract is imported and set by ...
Sky's user avatar
  • 2,144
1 vote
0 answers
74 views

Issue executing function transferOwnership(address newOwner) for ERC-20 token contract

I'm trying to execute the function transferOwnership(address newOwner), to change the owner of an ERC-20 token contract to a new owner address (I have access to the current owner address & the ...
SHLA's user avatar
  • 11
0 votes
1 answer
213 views

How can I view with web3.js all the ETH transfers to an ethereum address? [duplicate]

How could I list with Web3.js all the ETH transactions to an address? Thank you
JTCon's user avatar
  • 683
0 votes
0 answers
13 views

Need help identifying where coin transfer is and how to get it back [duplicate]

I Transferred some ENJ coins from my DeFI wallet to what I thought was my Trading account wallet. Long story short the address it I was sent too was off by one number. About 3/4 of the way into the ...
MickeyDubya's user avatar
0 votes
0 answers
87 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 ...
Arif Malik's user avatar
3 votes
0 answers
761 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: //...
Simone Tosatto's user avatar
1 vote
1 answer
490 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 ...
zak100's user avatar
  • 1,406
0 votes
1 answer
945 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 ...
Alexander Herranz's user avatar
0 votes
1 answer
116 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 ...
GreyShadow94's user avatar
0 votes
1 answer
262 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!
wei wang's user avatar
  • 437