Skip to main content

Questions tagged [transfer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
742 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
442 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
15 views

Why msg.value is not transferred to the owner?

I've deployed a simple wallet contract. The withdraw function goes like this.. function withdraw() external payable { require(msg.sender == owner, "Only Owner can withdraw"); ...
2 votes
1 answer
297 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 ...
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
1 answer
25 views

what is the way to find out if a selected token will revert at 0 transfer

How can I find out if the selected token will revert to 0 transfer? Is there a list of tokens that revert at 0 transfer. As far as I understand USDC is one of them, is that correct ? Thanks in advance!...
0 votes
3 answers
684 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 ...
1 vote
1 answer
365 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 ...
1 vote
2 answers
647 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
380 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 ...
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 ...
2 votes
2 answers
780 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
1 answer
365 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
596 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
15 views

Contract interaction failed [duplicate]

I tried to launch a smart contract with remix eth... Meta mask said failed but funds are gone. Verified on either scan transaction is there still but no funds? Anybody have any clue what I did wrong ...
0 votes
2 answers
39 views

How to further improve Safemoon's reflection token transfer? (ERC20/BEP20)

We all know Safemoon's iconic reflection token code, giving every holder a percentage of every fee on buy / sell. I've already simplified and improved the gas efficiency and the token logic quite a ...
1 vote
4 answers
449 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 ...
0 votes
2 answers
42 views

Approve does not increase the allowences

I'm encountering an issue with my Solidity smart contract where the allowance values for token transfers are not changing even after I've approved them. Here's the scenario: When I call the ...
3 votes
1 answer
588 views

Why does Uniswap V2 use `_safeTransfer` to transfer tokens?

I'm looking into Uniswap V2 code and found that it uses _safeTransfer function to transfer ERC20 tokens in the Pair contract. function _safeTransfer(address token, address to, uint value) private {...
0 votes
1 answer
37 views

transfer token from one address to another through a contract using solidity

I am trying to transfer a token from any address to my contract or another address using solidity but it is not working. the TransferTokenAddress function is the one I'm running. // SPDX-License-...
0 votes
1 answer
2k 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
0 answers
16 views

Scan transfers of token on ethereum using web3.py

I am trying getting specific token transfers value using web3.py library. I succeeded getting all transactions where in the transaction there is the token transferred. My problem is that the value ...
0 votes
2 answers
19 views

The tokens were transferred to another wallet, while my wallet received a transfer of 0 tokens

The function used is Function: transfer(address recipient,uint256 amount) And my wallet seems to be correct, but the funds were received by another wallet. Is this a contract issue ? The tx id is ...
0 votes
1 answer
845 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
566 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
355 views

Transfer someone else's NFT asset with an approve

I got this NFT marketplace smart contract. Still at the proof of concept stage, so I got 2 options to go with, I was just wondering if someone tried, or has knowledge about it: Here is the deal, I was ...
1 vote
1 answer
735 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 ...
0 votes
0 answers
11 views

metamask transfer amount different to etherscan amount

bought a erc-20 token on uniswap using my ledger account on metamask. when i got tokens i transferred them to another account on the same wallet. the amount that appeared was much less that was sent ...
0 votes
1 answer
746 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 ...
1 vote
1 answer
26 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 ...
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 ...
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
46 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 ...
0 votes
1 answer
22 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
18 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
2 answers
42 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(...
0 votes
1 answer
47 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
187 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
0 answers
44 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
38 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
30 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
96 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
14 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
104 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
460 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
27 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
183 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 ...
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
40 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
2 answers
772 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: ...

1
2 3 4 5 6