Questions tagged [transfer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
9 views

Give certain address permission to transfer ownership

I'm trying to create a contract and give a certain address, that is not the owner, permission to transfer ownership, or to atleast have the transferOwnership function public but only be able to ...
0
votes
1answer
12 views

Sending balance to contract fails

I'm playing ethernaut, the king of the hill level. I made a practice target contract and an attacking contract. I want to send value to the attacking contract (this works) then I want to send the ...
0
votes
0answers
5 views

Testing external transfers

When an erc721 token is resold on a site (like OpenSeas) my understanding is the transfer function of my contract is executed, is that correct? I assume any events emitted would be caught by an app ...
1
vote
2answers
48 views

How to send ether from msg.sender to another address from within the contract

I'm new to solidity and I'm currently experimenting with smart contracts. As shown in the code below (only a part), I want to write a contract that lets you borrow money by paying a fee. I implemented ...
0
votes
0answers
18 views

Contract getFunds call which should send wrapped ERC20 token to owner reverts, why?

My smart contract holds a few WETH. I have this function in my contract: function getFunds(address tokenAddress) external onlyOwner{ IERC20 token = IERC20(tokenAddress); uint ...
0
votes
1answer
21 views

Using transfer function always exceeds balance, or allowance!

I've been struggling with transfer function, where approval is not needed on ERC20 tokens where the caller is msg.sender as it's a public function, but I'm always getting same error.. Indeed I am on ...
0
votes
0answers
29 views

Why the transaction reverted when I try to sell tokens on uniswap v2 router2, but success on browser?

I am using web3 to send transaction to uniswap v2 router2 to sell my tokens for ETH, with both the sold token and WETH approved for router2 with amount of uint256max, and I set amountOutMin to 0 ...
0
votes
1answer
50 views

How to test sending eth to function using ethers.js?

I'm net to eth dev and trying to test sending eth while assigning a value to betOnTeam function: function betOnTeam(uint8 _team) public payable { // assign usre to _team and add betting value to ...
0
votes
1answer
16 views

Revert error when transfering available amount of ETH

I'm trying to code a reward pool distribution system and I'm unable to do the following (in that order). A deposits X amount (user_deposit) B deposits Y amount (user_deposit) C deposits Z amount of ...
2
votes
0answers
204 views

Bypassing metamask notice about "Insufficient funds for gas"

I wish to make a transfer of the remaining ETH from one wallet to an other. Trying to do it from metamask, it prevents me to do so with the "Insufficient funds for gas" error. Event though ...
0
votes
1answer
17 views

Amount is wrong when transferring ERC-20 token with web3.js

When I run the method on Etherscan or Remix, the amount is correct, and it displays with the token's symbol CSHIP. Yet for the life of me, I can't get the right amount to show up when I am ...
0
votes
0answers
9 views

Token transfer sporadically leaves 1 single wei inside the smart contract

It happens with several tokens. Sometimes, when I call a withdrawAll() function from my_contract, 1 token (Yes, I mean only 1 token) remains inside the smart contract. Here is the withdrawAll function ...
0
votes
0answers
62 views

How can I generate private/public key Tether?

i wanna to generate private/public address from USDT(Tether) for send and recieve that for my website, im coding with Asp.net Core C# language please step by step help me because im not adult. Thanks
0
votes
0answers
36 views

Do I need to use the approve function to transfer erc20 tokens from one address to another?

I'm making an nft marketplace and I want the buyers to buy the nfts with WETH. function createMarketSale(address nftContract, uint256 itemId) public nonReentrant { ...
0
votes
0answers
48 views

Why does the NFT openzeppelin transfer function in ERC721.sol require that to != owner?

In the openzeppelin ERC721.sol template, the following approval and transfer functions are written: /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual ...
0
votes
0answers
26 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
0answers
12 views

Transferring ownership of "GetReward" in contract

My wallet was compromised (my mistake). However, I usually receive vested tokens from a private sale, which is added up by the second. The hacker has been retrieving these rewards every 9-12 hours, ...
0
votes
1answer
103 views

deposite and withdraw erc20 token using smart contract

my goal is to create a smart contract which user can deposit erc20 and withdraw erc20 token using.i tried to implement this functionality using token transfer and transferfrom functions tried to send ...
0
votes
0answers
73 views

Get List of ERC 20 Token transfers by contract with web3.py

I apologize if this is answered elsewhere, but I haven't been able to find a clear answer. Here's what I'm trying to do: I'd like the get a list of ERC 20 token transfers from a specific smart ...
1
vote
0answers
25 views

I have a question about how to tell whether tx is 'transfer', 'call', 'create' or 'destruct'

I want to distinguish between the types of Ethereum TX. In the Ethercan, That is distinguish tx type like, transfer, contract create, contract destruct, contract call and etc... so, I check trace data ...
0
votes
0answers
37 views

invalid opcode: opcode 0xfe not defined) on erc20 transfer using walletconnect sdk on Android

I'm trying to send an erc20 token in an Android Kotlin App using the walletConnect Kotlin SDK v1 and testing it with Metamask. Sending the native token ETH works, but sending an erc20 token does not. ...
0
votes
0answers
79 views

"Coinbase 6" instead of exchange wallet address showing in Etherscan transactions

An exchange wallet address created on an exchange like Coinbase or Kraken starts with a unique 0x address just like any other Ethereum wallet. But when you transfer out to another 0x address from this ...
0
votes
1answer
29 views

Sending Ether from contract to the sender

This is a very common question. I am trying to withdraw fund from the contract. I have tried send,transfer and call but the transaction hash always shows 0 value transferred pragma solidity >=0.4....
0
votes
0answers
27 views

How to deposit crypto to a wallet without transferring in from an exchange?

As soon as you transfer crypto from your wallet on a crypto exchange to a MetaMask hot wallet address, your identity is traceable back to that exchange. How are people able to load a wallet without ...
0
votes
0answers
87 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 ...
0
votes
1answer
57 views

Automated Eth deposits onto L2 (e.g. Arbitrum, Optimism, Polygon/Matic etc.)

I would like to build a bridge between L1 and L2 that will send Eth from the smart contract on L1 to the smart contract on L2 automatically. So one will be able to deposit Eth on a smart-contract ...
0
votes
0answers
240 views

ERC20: transfer amount exceeds balance - working with transfer with ERC20

I am trying to call transfer of an ERC20 token from another "escrow" smart contract in remix JavaScript VM (London). I have 2 contracts like so: MyToken.sol (an ERC20Votes.sol, but "...
0
votes
1answer
93 views

How to transfer Ether from a smart contract to an account?

I wrote a very simple smart contract. The goal is to: transfer some Ether from an account A to the smart-contract and then from the smart-contract to another account B. Here is the contract: pragma ...
0
votes
0answers
258 views

How to send BNB (or other networks) with web3 on a dapp?

So, I tried the many examples found around but I never manage to get it working. I have this snippet: async function pay(cost) { code = 0 message = "Please approve the tx" ...
0
votes
1answer
31 views

ERC20 Token Transfer Issue

I have a test token (ERC20) deployd on ETH test network (Kovan) The token was deployed using Unicrypt tool So far everything ok, but the issues is how can i transfer tokens from an outside smart ...
0
votes
1answer
135 views

Is there a reason why the ERC20/ERC721 `safeTransferFrom` requires a `from` address? Why not just `safeTransferTo` directly?

I can understand that the from address in the safeTransferFrom function could be used by an approved operator. But I also wonder why not have another function for actual owners called just ...
1
vote
2answers
399 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: ...
0
votes
1answer
25 views

Withdraw balance [duplicate]

I want to withdraw the balance on the contract. What is the problem?
0
votes
0answers
12 views

Etherscan get ERC20 transactions with multiple transfers

I want to get a list of all ERC20 transfers of an address for a specific ERC20 contract. I am using the following Etherscan query: https://api.etherscan.io/api?module=account&action=tokentx&...
0
votes
1answer
24 views

Ownership question about Ethereum ERC20 tokens

I been considering creating my own Ethereum ERC20 token and I have one main question. When you create a Ethereum ERC20 token and you launch it, do you automatically own all of that Ethereum ERC20 ...
1
vote
0answers
395 views

How to transfer an ERC1155 Matic token using Node.js?

I'm trying to write a Node script that will transfer an ERC1155 token on the Matic network from my address to someone else's address. Here's an example token: https://opensea.io/assets/matic/...
0
votes
1answer
905 views

BEP-20 Token Transfer Error

I am unable to transfer test tokens from my address (say address A) to another address B. The steps I did were deploy and verify a rebase contract, all tokens were automatically sent to my address. ...
0
votes
1answer
31 views

Cannot transfer ERC-20 tokens from a contract

pragma solidity ^0.6.2; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract MyContract { IERC20 LINK; constructor(address token) public { LINK = ...
0
votes
1answer
77 views

Handle different token transfer to contract

Any way to handle token transfer to contract with another token? For example: first contract - token A second contract - token B how to handle transfer token A to contract of token B and make some ...
0
votes
1answer
61 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
0answers
35 views

Transferring NFTs with approved Smart Contract

Im currently developing an ERC-721 DApp and I would like to give the owner of the NFT the chance to approve a Smart Contract Address, so that the Smart Contract can do the transaction. Now I have the ...
0
votes
1answer
317 views

Solidity contract - Best way to airdrop a single time a user

I've got this very simple Airdrop contract below: contract ERC20 { function transfer(address _to, uint256 _value)public returns(bool); function balanceOf(address tokenOwner)public view ...
0
votes
1answer
846 views

ERC721 approve Smart Contract and send transaction from it

I am developing an ERC721. I want the NFT to be approved and to do transactions. When I call getApproved() the address is the Smart Contracts address, but when I try to do a transaction by calling the ...
0
votes
0answers
11 views

Payment not showing up in wallet

I have the following solidity function that a wallet calls: function giveupStake(uint amount) public payable { if (initialStakes[msg.sender] >= amount) { initialStakes[msg....
1
vote
1answer
123 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
2answers
27 views

TranferOwnership Recursion

If i have a contract C that is the owner of contract B and contract B is owner of contract A. Can C in is contract call transferownership from contract A? Please help
0
votes
1answer
28 views

Transfer from contract address to sender

I am coding a crowdfunding contract where senders have two options. First, payIn which invokes a transfer to the contract's address. Second, withdraw which invokes a transfer from the contract's ...
0
votes
1answer
16 views

Transfer of ERC-20 tokens fails, even though smart contract has enough token balance

I am trying to develop a buy function for my token smart contract, but it fails on the transfer: transfer(msg.sender, amountToBuy); It fails with the Error: 'ERC20: transfer amount exceeds balance', ...
1
vote
1answer
2k views

Ethers.js transfer event filters

In my dapp I'm building I want to update the contracts' balance of an ERC20 token automatically using the transfer event from the token contract. I have created the contract object using: const ...
0
votes
0answers
427 views

Fee on transfer causing error "Uniswap invariant not satisfied"

I am working on building an ERC20 token with the help of the OpenZeppelin project. I wanted to add a burn fee on transfer, so I overrode my transfer function as follows: function transfer(address _to, ...