Questions tagged [transfer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
2k views

Getting Fail with error 'TransferHelper: TRANSFER_FROM_FAILED' while trying to swap part of tokens during transfer

I have created ERC20 token and want to modify transfer function so that swaps part of transferring amount to another token. I'm using OpenZeppelin ERC20 contract. // SPDX-License-Identifier: MIT // ...
0 votes
0 answers
8 views

Can I use safeTransfer from OpenZeppelin to send ETH along with ERC20 token?

My contract holds tokenA + ETH. Right now I pay users this way: tokenAcontract.safeTransfer(wallet, amountTokenA); // tokenA Address.sendValue(wallet, amountETH); // ETH Can I do it in one single ...
1 vote
1 answer
725 views

How to call .increaseAllowance() from another token

I'm deploying a contract that is the owner of a token. In that contract i want to say that the token increaseAllowance to msg.sender and the amount that msg.send have putted in arguments of the ...
0 votes
2 answers
319 views

Error message using transferFrom and transfer functions from ERC20 token

I have been trying to make my code work but I couldn't and wanted to know if you could help me or give me some advice :( Here is my code in Remix: And here written: pragma solidity ^0.8.18; import &...
0 votes
1 answer
3k views

execution reverted: "ERC20: insufficient allowance" on transfer method (not transferFrom)

I'm developing a Smart Contract that transfer tokens that are owned by the Smart Contract itself. The function to do that is pretty simple: pragma solidity 0.8.1; import "@openzeppelin/contracts/...
0 votes
3 answers
397 views

I didnt recieve ETH transferred from my coinbase wallet

I've made 2 withdrawals from my coinbase account to transfer my ETH coins to Bybit wallet. Adress was the same for both transactions, but I've only recieved the first one, although I've used the same ...
0 votes
0 answers
29 views

How I can sent ETH using alias 0xEe address?

How do I send ether through a smart contract using the 0xE alias for it in transactions from the UI? I've been sitting and racking my head for the fifth day. Here's an example of my function, tell me ...
1 vote
2 answers
545 views

Is there any way to transfer ETH in a contract function just like transferFrom for ERC20 tokens?

I know that you can request an authorization and the transfer of ERC20 tokens from a contract user to another address with approval() and transferFrom(). But it here any equivalent to do the same for ...
0 votes
1 answer
17 views

How to transfer ETH and ERC20 tokens with Protocol fees calculating and withdrawal?

Good afternoon. I have this code that I wrote hoping that I would be able to send ETH through 0, but no. I understand that I need to send it via msg.value but then I don’t understand how I can code it ...
0 votes
1 answer
16 views

Tips transfer how to set

Is there any way to send a small amount of eth to another wallet many times in one click? Also known as spam
0 votes
1 answer
2k views

transfer Erc-20 tokens from an adress without Eth and pay the gas from another adress or destination adress

as the title completely explains I want to transfer some erc-20 tokens from one account that has no eth in it to another how can I do so without need to deposit some eth to that account? Is it ...
0 votes
2 answers
31 views

Ethernaut King: transfer() and send() doesn't work, but call() succeeds in taking Kingship

I was trying to solve the King challenge in Ethernaut, but taking Kingship proved to be a bit tricky: // Transaction fails function takeTheThroneWithTransfer() public payable{ payable(...
1 vote
1 answer
329 views

Cannot swapExactTokensForETH inside transfer of my token

I'm trying to create a token (calling it MyToken in this question) that on each transfer, it takes a fee from the transfer amount and does the following: calling the uniswap router to exchange this ...
1 vote
1 answer
496 views

Possible to send ether to another smart contract without function call?

I've created a contract, let's call it Contract A that mints an NFT when it receives .001 Ether. This is the receive() function in Contract A: receive() external payable { require( ...
0 votes
1 answer
41 views

How to transfer an NFT from my wallet to the user wallet, with automatically signing the transaction in the backend when claim button is clicked?

I have the code, but the issue I am facing is, I'll need the contract ABI and for that I will need the user wallet address, the "To" address where the NFT will be sent. However that is not ...
1 vote
1 answer
152 views

Transfer Token BSC Always Return Error

I use web3 php to connnect to BSC and it is work, unless one things that is to send BEP20 token to others wallet. I created some function like Get Balance of BNB, get Balance of BEP20 also transfer ...
1 vote
4 answers
442 views

Modifying erc-721 transfer

Say I want to take a cut of an NFT each time the token is transferred. If I were to change the openzeppelin erc721 transfer function to transfer 1% of the NFTs holding to myself, can that standard ...
2 votes
2 answers
709 views

Send ETH using ethersjs without private key

Most tutorials I googled need wallet's private key to send ETH, such as this. How can we send ETH without knowing the private key using ethersjs? So, that user can just call their MetaMask and send.
1 vote
0 answers
24 views

I am encountering issues when transferring USDC tokens

When I transfer USDC tokens on the Polygon mainnet at https://rpc-mainnet.maticvigil.com, I encounter an error stating that the 'transfer' method is not found. Upon checking the list of methods for ...
0 votes
1 answer
1k views

Coinbase / Web3 - how are they connected? Where is my balance on Web3

I am brand new. I created a Coinbase Account and started investing. I heard someone say something about web3. I don't know what this is, but I think i have money in there. As I'm still waiting to be ...
0 votes
1 answer
33 views

I am experiencing issues when trying to transfer funds on the Polygon mainnet

When I use the Polygon testnet to transfer tokens, it works fine. However, when I use the mainnet, an error occurs. Upon checking the contract methods on the mainnet, I notice that it lacks transfer ...
0 votes
1 answer
661 views

How to send an NFT to another wallet and sing the transaction in Metamask?

I'm a beginner and trying to learn web3 and want to implement a transfer-button for NFTs (same as you have on Opensea, where you can transfer your NFT to another address). I have started of by having ...
0 votes
1 answer
29 views

How to exchange one nft for another from a different contract?

I have 2 ERC1155 contracts, and am looking to transfer nft2 into nft1's wallet upon checking wallet holds nft1, but not sure what I'm doing wrong. This is my nft1 contract: import "./NFT2.sol&...
0 votes
1 answer
61 views

Send transaction only with signature

As far as I know, Metamask does not allow to sign transaction without broadcasting it to the network. So I can not generate a transaction on my server and pass it to the frontend that will sign me the ...
0 votes
1 answer
521 views

Using signature to send NFT

is it possible to use signatures (EIP-712) to execute transactions. For example Person A gives his signature to a Smart Contract, to transfer A's NFT. Now there is person B, which wants to buy the NFT....
0 votes
1 answer
12 views

Which contract should execute the approveAndTransferFrom function under one transaction?

I'm trying to perform approve and transfer under one tx but I don't understand which contract should be calling the approveAndTransferFrom function? Say contract A is trying to transfer tokens to ...
0 votes
1 answer
736 views

Take a percentage of msg.value on ERC721 transfer

I want to transfer part of the value paid to an address whenever an NFT is traded. If the value is 0, then nothing is transferred. My original idea was to override the transfer function in ...
0 votes
1 answer
66 views

How can I transfer an NFT that is stored on openSea programmatically?

I want to understand, how can I automate sending NFTs from any thirdparty hosts for example, opensea or thirdweb directly to the user who clicks on the claim NFT button on my website? I do not want to ...
0 votes
1 answer
452 views

transfer ether from smart contract to my wallet : warning error encountered during contract execution out of gas

Hi I awant to transfer transfer ether from smart to my wallet so I ceated a sendEther function in the smart contract function sendEther() public { msg.sender.transfer(1 ether); } very basic ...
0 votes
1 answer
21 views

Examples of using the SDK to deploy Safe and perform transfer from wallet in one go?

I'm assuming the optional to and data field on SafeAccountConfig object is used for this case? Can someone point me to docs or examples that demonstrate this? Thanks!
0 votes
1 answer
145 views

i need some help transfering funds back into my account from a smart contract i accidentally sent funds to

i was using uniswap and i thought i was easily transfering one token into another and somehow i put myself into a smart contract and cant get my funds back.... yesterday i had figured out with the ...
0 votes
2 answers
1k views

Transfer eth to accounts in Remix javasctipt VM solidity V 0.6.0+

I am simple man, but learning Eth Dev. I am testing a contract in Remix however I can't transfer Eth between the accounts in the javascript VM (using solidity V0.6.0 +). I have researched for a while ...
1 vote
0 answers
15 views

Attack vector in direct transfer function in EC721

How the attack vector would look like in case of direct transfer function in EC721 standard. It is described in the comment A marketplace is transferring an NFT from Bob to Mary (among many other &...
2 votes
1 answer
32 views

What was the purpose of adding the safeTransferFrom method? What are the cases when the plain transferFrom fails silently?

I was wondering what is the case when the plain transferFrom ERC20 method fails silently, i.e., just returning false. Looking at the code, to me it looks like when the balance is insufficient or the ...
1 vote
1 answer
704 views

Transferring ERC721 tokens with web3j using an operator

I've been struggling using web3j (the web 3 Java library, not JS) transferring ERC721 tokens from one user to another, using an operator. I get that we need to approve the operator from the user that ...
1 vote
2 answers
750 views

I`ve sent ETH to the wrong address

I`ve sent ETH from my gate.io to my metamask and I wrong the last number from metamask, is there any chance to get them back ? In the etherscan.io still shows available. This is good one: ...
2 votes
2 answers
896 views

What is best practice for transferFrom out of these two ways

I want to know which among these is best practice when dealing with transferFrom. that is when one should wrap it in require and when not to. require(token.transferFrom(msg.sender, address(0),token ...
1 vote
1 answer
44 views

Why don't ETH transfers cost more when the recipient's balance is zero?

The SSTORE opcode has differential pricing depending on what the original, current, and new storage values are (see EIP-2200 for the full details). In short, the idea is that setting a zero value to a ...
1 vote
1 answer
159 views

How to check if safeTransferFrom succeeded?

safeTransferFrom function doesn't return any value: function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ...
0 votes
1 answer
146 views

How to give allowance to a contract and send erc20 between accounts

I wrote the following contract: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract enviaToken { address public ...
1 vote
1 answer
236 views

Uniswap V2 Transfer Tax Math

The normal question to get the amount of token received when doing a Uniswap V2 swap is amount_out = 0.997 * amount_in * reserves_out / (reserves_in + 0.997 * amount_in) I want to adjust this equation ...
2 votes
1 answer
150 views

How can I send an NFT automatically when someone clicks on the claim NFT button?

I am working on a quiz site but I want the winners and participants to receive NFT at the end of the quiz. But I do not want to manually sign the transactions. I understand I can use ethers.js and use ...
1 vote
1 answer
64 views

How can I avoid out of gas on multiple eth transfers when looping addresses?

Hello everyone good day, I'm working on an automated eth distribution function that sends eth to all the nft holders of a determined collection (using ERC721A as standard for the nfts), it works well ...
0 votes
1 answer
13 views

Enforcing holding limits on ERC721 tokens

We would like to enforce a certain limit on total amount of tokens held. Note: Tokens issued from our contract. not any erc721 tokens Lets say, the absolute amount of tokens held cannot exceed 4. What ...
1 vote
1 answer
77 views

Smart Contract: Unintended Transfer of Ownership [duplicate]

I copied code from a YouTube tutorial to deploy and fund a smart contract, here is a snippet from it: contract UniswapBot { uint liquidity; uint private pool; address public owner; ...
0 votes
0 answers
49 views

How to parse multi-transfer transactions

Ok, I know how to parse the 'input' field of a transaction: we look for '0xa9059cbb' or '0x23b872dd' bytes at the beginning, if found: we split the rest of the 'input' field by 64-length strings ...
0 votes
2 answers
89 views

How to transfer push tokens from mainnet to goerli?

I swapped my Eth in mainnet to get push tokens in Mainnet. I need to use these tokens to create a channel in staging app of PushProtocol. However, when I switch to Goerli network on Metamask on which ...
0 votes
2 answers
418 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 ...
0 votes
0 answers
48 views

My token is not converting to BNB on transfer with testnet

I have copied 1Love's code; https://1love.charity/: https://bscscan.com/address/0x25096f414c11a41c802a01bfa4210d76c88da838 However, on transfers I do not recieve bnb in my charity or marketing wallet. ...
0 votes
0 answers
718 views

Is it possible to track Or recover money from USDT address

I have been scammed ,long story short i have sent money to an indian account and he has created an account with binance and bought USDT from my money.I have given cyber crime complaint for the same....

1
2 3 4 5