Questions tagged [transfer]
The transfer tag has no usage guidance.
9
questions
13
votes
2
answers
9k
views
Using ".value(...)" is deprecated. Use "{value: ...}" instead
This works fine in Remix but when trying to work in VSCode (for compiling purposes; DApp course, trying to build .json through compile.js ) it throws the error
Using ".value(....
6
votes
1
answer
356
views
Why ERC721 does not have direct transfer function?
I was researching the ERC721 standard on Openzeppelin and I have noticed that there is not public or external "transfer" function.
I see internal "_transfer" function, that is ...
3
votes
1
answer
451
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 {...
2
votes
2
answers
738
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 ...
2
votes
1
answer
11k
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 ...
1
vote
1
answer
2k
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 ...
1
vote
1
answer
388
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
2k
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 ...
0
votes
1
answer
3k
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 ...