Questions tagged [transfer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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(....
utsav pandey's user avatar
6 votes
1 answer
386 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 ...
Alexander Herranz's user avatar
3 votes
1 answer
503 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 {...
ywat's user avatar
  • 187
2 votes
2 answers
903 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 ...
Sabreena's user avatar
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 ...
Nolan Jannotta's user avatar
1 vote
1 answer
431 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 ...
ariel's user avatar
  • 11
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 ...
blnks's user avatar
  • 165
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 ...
Harish Manthurthi's user avatar
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 ...
Luex's user avatar
  • 51