Questions tagged [transfer]
The transfer tag has no usage guidance.
224
questions
2
votes
1
answer
289
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
54
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
100
views
I am unable to transfer an ERC721 token that is owned by the wallet calling the function to the contract address the function belongs to
This is the start of a contract i'm writing, to enable two parties to trade ERC721 tokens via an escrow service.
The first step in the contract is that the trade initiator will deposit a token to the ...
3
votes
2
answers
754
views
Why does SafeERC20 assume that the token's transfer and transferFrom return value is optional?
In openZeppelin's SafeERC20, the functions safeTransfer and safeTransferFrom call an internal function called _callOptionalReturn, which makes a low-level call to the token's transfer and transferFrom ...
0
votes
1
answer
213
views
How to send tokens to a wallet without exposing your Private Key (ethers.js)?
Intro: I am trying to create a web app where I can send some tokens from my personal account to another. I found out a possible way to achieve my goal using ethers.js in the following way:
// connect ...
-1
votes
1
answer
116
views
Transfer token to any bep20 wallet
Hi i want to sent token owner wallet to any wallet but I can't
0
votes
1
answer
85
views
Withdrawn ETH gets sent as internal transaction to black hole address
I'm trying to withdraw from this contract after funding it. After funding it, i checked the balance on goerli etherscan and there was goerliETH in it that i sent but i noticed that once i called ...
1
vote
1
answer
62
views
how can i check hashcode and th amount
I'm new in Solidity, therefore if I have a wrong concept of anything kindly do explain.
I'm working for a personal escrow smart contract that should include these functions:
1- function deposit from ...
0
votes
1
answer
36
views
How can I know wether a token can be transfered before aping in?
Other than some speficif tools (tokensniffer, honeypot, poocoin...) and project-related websites, how can I spot in a smart contract whether a token has any restriction (lock-up period, volume etc...) ...
1
vote
1
answer
67
views
Cannot sell more than 1% of a token on a single transaction (BSC)
I bought this token 0x096901cE2C5501eAE23AF2D3F6e465dE98BFc645 but it seems that I cannot sell more than 1% of it on a single transaction while a lot of adresses performed bigger transactions. I am ...
1
vote
1
answer
313
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(
...
2
votes
2
answers
348
views
transfer/deposit ether on contract fails
I am trying to deposit Ether on a smart contract. Looking at the documentation
my approach first looked like this:
// SPDX-License-Identifier: MIT
pragma solidity ^0.0.8;
contract SendEther {
...
2
votes
1
answer
82
views
Solidity Clones Contracts: How to save deployer as a storage variable which can be called in created clones?
I am using the OpenZeppelin Clones Library so that users of my dapp can create clones of my implementation contract. My dapp will be following the EIP-1167 standard.
For functionality, I will need to ...
1
vote
1
answer
36
views
modifiers overriding simple question with inheritance
just wanting to be sure of this. If I have a contract that inherits from another contract and overrides a function of that contract with NonReentrant modifier on it. Will that NonReentrant modifier ...
3
votes
2
answers
1k
views
Front End: Transfer (send) your NFTs (ERC-721) using Ethers.js or Wagmi.sh
I'm a front-end dev getting my feet wet in the crypto nft space.
I built a simple site for displaying all the NFTs in your wallet. Users can connect to the page using Rainbowkit (built on top of WAGMI,...
0
votes
0
answers
22
views
how to fix "ERC20: insufficient allowance" error? [duplicate]
I wrote a very simple contract to use the erc20 functions in another contract and the first thing I tried was transferFrom function, which works perfectly when I'm sending tokens from msg.sender(which ...
0
votes
1
answer
391
views
How is transferring to payable(msg.sender) costing less gas than transferring to an address?
Consider the contract:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Test {
address payable public owner;
constructor() {
owner = payable(msg.sender);
}
...
0
votes
1
answer
46
views
How can I provide a user with an unsigned transaction that, when signed, sends their ether/ERC-20 tokens to another address?
I would like to create a dapp that provides an invoice like work flow. For example: Alice would like to buy 1 apple from Bob for 2DAI. How can Bob programmatically provide Alice a way to send the 2DAI?...
0
votes
1
answer
26
views
EIP4626 Vault Deposit "SafeERC20: low-level call failed"
I am trying to write a foundry script that deposits the asset token into a newly deployed EIP4626 Yearn vault. However, when I try to call the EIP4626 "deposit(uint256)" function on the ...
0
votes
1
answer
96
views
How to differentiate between ERC1155 fungible token transfers and non fungible token transfers
I am new to erc-1155. I am trying to track erc-1155 NFT transfers and mints by suscribing to the TrasferSingle and TransferBatch events. However I am not sure how to differentiate between fungible ...
1
vote
1
answer
39
views
transfer wbnb from contract to metamask
i transferred wbnb from my deployed contract to metamask using python. The transaction was not executed. However, when checking later the wbnb balance of my contract was 0, my wbnb was stolen. i have ...
1
vote
1
answer
281
views
How is this scam code transferring tokens to the unspecified wallet within?
Below is the exact solidity code that the scammer were manipulating people to run by themselves. I checked that there is no wallet address specified within the code but this code will transfer the ...
1
vote
1
answer
176
views
How i can send my Ethereum from kovan test network to Ethereum main network
I have Ethereum in metamask which is in kovan test network so now I want to withdraw them so I want send Ethereum in Ethereum main network so I send to any crypto application
0
votes
1
answer
146
views
transaction fail after calling transfer to the contract itself
I have this line in some function in an ERC721 contract:
IERC20 instance = IERC20(token_address);
instance.transfer(address(this),1);
And when deploying the contract I make sure the caller of the ...
0
votes
1
answer
15
views
How to ensure the security of computation and transmition on Smart Contracts?
Suppose there is a smart contract with a bidding function, and the bidder can send the bid price to the smart contract after encrypting it. When the auction is over, a trusted third party sends the ...
1
vote
1
answer
757
views
Why ether transfer sometimes use more that 21000 gas?
I noticed that some ether transfers use more that 21000 gas. Here is an example which transferring ether from an UOA to a contract used 21033 gas:
unusual transaction
While another transfer with same ...
1
vote
2
answers
284
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 ...
2
votes
1
answer
620
views
Fetch last 10 blocks using Alchemy Transfers API
could someone please elaborate on:
fromBlock: the starting time range we want to fetch NFT mints over (defaults to latest)
I tried to pass a block but its not working... I have also seen fromBlock&...
0
votes
1
answer
406
views
Cannot get deposit() working in simple wETH contract
I am trying to test the deposit() function of the WETH9 contract in Remix. I compiled and deployed a simplified WETH9 contract:
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.1;
contract ...
0
votes
3
answers
640
views
Transfer all NFTs in a single transaction
I'm trying to develop a dApp where I need to be able to transfer all of a user's NFTs to another wallet.
As I see it, this can be accomplished by looping through each smart contract the user owns NFTs ...
0
votes
0
answers
97
views
IERC20 safeTransfer sender issue
0
I need to transfer some amount of an especific token (100) when the "father"(TTDT01) token is used.It is some kind of tax on a "child" token (ttdttoken) when the "father&...
2
votes
2
answers
527
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.
0
votes
0
answers
14
views
Transfer all eth from a wallet to another wallet [duplicate]
Can I transfer the entire amount of eth of a wallet to another wallet?
0
votes
0
answers
16
views
IERC20Upgradeable.transfer fails without error messages while direct function call works fine
I cant figure out why calling a function from web app fails while calling from Polygonscan works...
Does anyone know why?
I am trying to call the function with the same args and condition yet calling ...
0
votes
1
answer
197
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
159
views
is pull over push pattern recommended for erc20 withdrawal too?
I had a chance to read the pull over push pattern for transferring/withdrawing ethers, but i'm not sure if i need to apply this for erc20 transfers.
i.e.
function buy(uint256 _someId, uint256 _price)...
0
votes
1
answer
2k
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
0
answers
21
views
Creating / Tracking ERC20 Transfers on Chain
I am creating a contract where users can come and deposit a certain stable coin to the contract.
Let's say using these invested funds, the contract owner can use it and be given a certain interest for ...
0
votes
1
answer
219
views
Different gas amount for erc20 Transfer functions
I have used Transfer function for an erc20 in different contracts with the same codes. The point is here, in different times there was different gas while the function was the same. The input of the ...
0
votes
2
answers
81
views
Funds stucked in smart contract
I have a question.
So there is a project named StarsLab that had it's mint live in the beginning of this year. They started first the WL sale. I wasn't WL but was able to mint so reported it to the ...
0
votes
1
answer
371
views
What are these 2 transactions with the same hash and different values?
I am browsing some erc20 transactions from a given ethereum address on the Etherscan API module account and action tokentx.
Example here :
Sometime I observe 2 consecutive identical result except ...
0
votes
0
answers
30
views
can we transfer custom token from one contract function to another contract?
can we transfer custom token from one contract function to another contract ? I want to transfer some custom tokens to another contract whilst using a contract function. Is this possible ?
e.g:
...
0
votes
1
answer
39
views
ERC20 TRANSFER function error error = false transaction [duplicate]
Want to use erc20 function transfer to transfer erc20
Made contract referring this video
https://youtu.be/-5j6Ho0Bkfk
function transfererc()payable public{
Token token = Token(address);
token....
0
votes
3
answers
1k
views
Transfer ERC721 tokens in BULK to single address
I want to know what is the gas effective manner to code to transfer many (e.g 1000) ERC721 tokens to a single address.
I have tried the way below but I want something more efficient.
function ...
0
votes
2
answers
46
views
How can I get my money back if I have made a transaction from my bank account to Metamask and cancelled it but my money if gone from the bank account?
I have made a transfer from my bank account to metamask. Minutes later, I cancelled the transaction. The next morning I saw that my money if gone from my bank account and the money is not in my ...
0
votes
1
answer
125
views
Transfer function not changing custom token(ERC20) balance after successful transfer from transfer function?
Transfer function not changing custom token(ERC20) balance after successful transfer from transfer function ?
The transaction is successfully performed but the amount of custom token in my wallet does ...
0
votes
2
answers
887
views
Is it possible to send testnet eth from one testnet network to another?
Is it possible to send testnet eth from one testnet network to another? Curious because ain't getting much testnet eth these days.
1
vote
2
answers
1k
views
Send msg.value to another address immediately
Is it possible to implement a payable function and transfer msg.value to another address immediately?
function purchase() payable public {
//transfer msg.value
}
I'm thinking this wouldn't work ...
0
votes
0
answers
40
views
ERC721 transferring NFTs and currency
I have a contract that I want to use as an NFT marketplace. It extends ERC721URIStorage
contract NftMarketplace is ERC721URIStorage ...
In on function I use _transfer() to move an NFT from the seller ...
0
votes
0
answers
19
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 =...