Questions tagged [transfer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
24 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, ...
0
votes
1answer
31 views

Trying to understand Etherscan output for token swap via Uniswap

I am trying to understand a token swap transaction via Uniswap on Etherscan. Looking at the Uniswap V2: Router 2 contract for a transaction, I see the following; My question is regarding the second ...
0
votes
0answers
16 views

Trying to give tokens the new users on my Dapp

pragma solidity ^0.8.0; contract Coin is ERC20{ mapping(address => uint256) private _balances; mapping(address => bool) private _airdrop; uint private _totalSupply; string ...
0
votes
1answer
14 views

Need to understand the logic used in multiTransfer function,

* @notice Transfer tokens to multiple recipient * @dev Left 160 bits are the recipient address and the right 96 bits are the token amount. * @param bits array of uint * @return true/...
1
vote
1answer
31 views

Is there a way to transfer ETH to block miner coinbase address using a transaction without a smart contract?

Is there something similar to block.coinbase.call{value: _ethAmountToCoinbase}(new bytes(0)) executing using Smart Contract? For example, from EthersJS: const tx = signer.sendTransaction({ to: &...
0
votes
1answer
19 views

How to set payment amount to be passed in msg.value

I am working on truffle (solc 0.5) and trying to fetch amount in wei from user and send it to another account. Following is my code: contract pay { uint amount; function payment(uint _amount, ...
0
votes
0answers
8 views

ERC20 transfer not updating account values

I'm doing the DAPP university create a token tutorial as a way to learn solidity,etc. Things look good - except that the transfer function doesn't see to actually do anything. When the contract ...
0
votes
0answers
26 views

Interaction between my webapp and smart contract

I am experimenting for the first time with smart contracts and NFT stuff. So I am at the point where I have a react webapp with metamask integration. The user can connect his wallet. I want to ...
0
votes
0answers
21 views

Getting error: 'approve caller is not owner nor approved for all' when calling approve() from ERC721 owner wallet

I am getting this error message when trying to call approve() on an ERC721 token: "code": 3, "message": "execution reverted: ERC721: approve caller is not owner nor approved ...
0
votes
1answer
68 views

Estimating transfer gas for ERC20 tokens using ethers js without needing the token

I am trying to be able to accurately estimate the gas it will take to send an ERC20 token using Ethers js without first needing that token. Currently, I am able to get an estimate though it does not ...
0
votes
0answers
189 views

web3 how to send transaction with BNB

i'm begin working with web3.js api and i cant understand how to send transaction in BNB. According to documentation https://eth.wiki/json-rpc/API#eth_sendtransaction i cant find some parameter that ...
0
votes
0answers
22 views

No chance to transfer ETH from contract to address whatever gas I set

I looked through suggested similar tickets. Not my case. The problem is that I can't transfer ETH from contract to any address: (bool success1, ) = payable(recipients[index]).call{value: uint256(...
1
vote
1answer
33 views

Burn function without emitting Transfer to address 0

I have found some code samples for "burn function" on token contract. In this function, burn amount is substracted from the balance and then "Transfer Event" is emit to address 0. ...
0
votes
0answers
19 views

Questions concerning the modification of an existing contract. Two liquidity pools, fee that can be taken out, testing on remix, buying the token

I am learning Solidity, and I am trying to modify an existing contract. But the questions I have I can ask independently from the contract. is there a possibility to have two liquidity pools? One as ...
0
votes
0answers
11 views

Is it possible to stop a deposit, while being in process by the contract owner?

function disableDeposit() onlyowner public{ require(timeToWait + userdeposit[msg.sender].timeCreate < block.timestamp); ERC20(tokenContract).transfer(msg.sender, userdeposit[amount]); } Would I ...
0
votes
0answers
6 views

How to validate transfers?

As far as I understand, events associated with transactions are completely arbitrary pieces of data emitted by a contract, i.e. just because transaction event log says that a Transfer took place, ...
0
votes
1answer
47 views

ERC721 TransferFrom problem - How can the buyer calls Transfer from function in order to buy a ERC-721 token?

Recently I am working on a NFT marketplace and I had difficulties in implementing safeTransferFrom function. At this stage I use _transfer function to allow the buyer calling the function directly so ...
0
votes
1answer
10 views

Can we have a instance of a interface?

I came across this code, I wanted to know what exactly IERC20(token address) is signifying here whether it is the instance of token or just the reference to the contract of token to which the user is ...
0
votes
0answers
174 views

How to transfer ERC721 token to address from the smart contract?

I am working on a smart contract (OpenZeppelin ERC721), where trades can be created by only the owner of smart contract, and then regular users can buy them. When owner creates a trade, a new ERC721 ...
0
votes
1answer
27 views

Transfer ether between two addressrd using call

I have this code: function regAgent(uint[] memory _preferences) notOwner onlyBeforeEnd public { require(msg.sender.balance - fee >= 0, "You can't pay the fee."); require(!...
0
votes
0answers
19 views

How to send a fixed amount of ether to a smart contract from an account?

Is it possible to send a fixed amount of ether to smart contract from an account every time a function is executed or button is clicked? No input fields should be used.
0
votes
1answer
221 views

ERC-20 Token Transfer Error (Unable to locate corresponding Transfer Event Logs), Check with Sender

Token was created under ERC223. Every transfer that I have done received: ERC-20 Token Transfer Error (Unable to locate corresponding Transfer Event Logs), Check with Sender. Please help to check and ...
0
votes
0answers
8 views

options to retrieve 24h transfer data between main DeFi protocols

I am trying to build a daily graph showing the transfers between the main DeFi protocols as well as some of their properties (for example, collateralization). What are your recommendations for places ...
0
votes
1answer
33 views

How can I use the payable function to transfer fixed ether in a transaction?

contract MyContract { address payable[] recipients; function sendEther(address payable recipient) external payable { recipient.transfer(1 ether); } } Error- transact to ...
0
votes
0answers
10 views

Transfer ether between two EOAs without security breaches

I have this function (is a SC implementing and auction): /// @notice Register a new participant /// @param _preferences agent' preferences function regAgent(uint[] memory _preferences) notOwner ...
0
votes
0answers
17 views

How do get every token transfer for a token?

I initially thought this would be trivial, just using the tokens transfer event but this misses transactions done by disperse, multisend and I am sure there could be a few more methods I don't know ...
0
votes
0answers
17 views

Multisender.app transactions aren't emitting transfer events for Ampleforth

I am trying to collate the whole of Ampleforth's transaction history. To do this I was grabbing the transfer events every 1000 blocks since Ampleforth's inception. In doing this I noticed that some ...
0
votes
1answer
98 views

Pancake/Uniswap: tell inside contract if a transfer is a buy or sell

I have a token contract that will exclusively use Pancakeswap as trading platform. How can I tell in the contract if a transfer represents someone buying the token or someone selling it?
0
votes
0answers
12 views

Truffle test - doesn't send funds to msg.sender

it seems like I have a wrong gnache or truffle setup ... I already ask a simular question here: Owner of contract is set to contract address? Basicly there is some mess up with addresses on my local ...
1
vote
0answers
102 views

Transferring ERC20 token to a contract using custom function

I have a couple of questions related to transferring ERC20 token to a contract. I am developing a protocol that has its own token to provide incentive mechanisms. For certain operations I need to lock ...
0
votes
1answer
39 views

How to send erc20 tokens through web3 on nodejs

My transactions go through without errors, while they're pending the data field shows the amount of tokens I'm sending, but when the transaction goes through the data field is empty. Here is my code: ...
0
votes
0answers
78 views

ETH token transfer Fail and error is: Warning! Error encountered during contract execution [Bad instruction]

sometimes I am encountering a problem where I am trying to send tokens (USDT in this particular case) to other address and the transaction fails, because of "Warning! Error encountered during ...
4
votes
0answers
472 views

What is the difference between ERC-2665 and what is proposed in EIP-2981? Royalties vs Transfer Fee

There is an EIP for Royalty standards. But there is already a ERC for a Transfer Fee Could ERC-2665 be used to implement royalties across all market places for NFT? What is the difference between ...
0
votes
0answers
13 views

Need help identifying where coin transfer is and how to get it back [duplicate]

I Transferred some ENJ coins from my DeFI wallet to what I thought was my Trading account wallet. Long story short the address it I was sent too was off by one number. About 3/4 of the way into the ...
0
votes
1answer
147 views

Different Transaction Costs For Different ERC20 Tokens?

I just went to send some OXT from my wallet to an exchange and noticed that the cost was much higher than if I were to send ETH or UNI while using the same gas price. My wallet shows a different ...
0
votes
0answers
19 views

Transfer token sent to wrong address (contract address)

Good day/eve. I purchased the OMI token and initiated a withdrawal to my trezor hardware wallet as an ERC20 token. This was an error (isn't an ERC20 token any longer) and therefore the transaction ...
1
vote
1answer
32 views

How to write a simple token contract which token can only be transferred within the specific geographical region?

In my use case, I want to build a local currency system with solidity. The core concept of local currency is that the currency can only be used in the specific region. It aims to encourage spending ...
0
votes
0answers
24 views

Different ways of exchanging tokens

I am conducting a study on transaction behaviour and dynamics on the Ethereum blockchain. Currently, I am analysing the token transfers of different user groups. After leveraging Google Big Query and ...
1
vote
0answers
264 views

Technical Question Ether to BNB transfer

I attempted to swap funds from Ethereum to BNB via the Binance Bridge feature and pancake swap via my Metamask. I was trying to send the ETH to myself. I did not have any BNB to do the transaction, ...
0
votes
0answers
29 views

I sent my eth to the wrong address

Instead of transferring my Eth token to my wallet, I accidentally sent it to the contract address of of the offshift XFT token 0xabe580e7ee158da464b51ee1a83ac0289622e6be Would the contract creator be ...
0
votes
0answers
23 views

Build and interact with contract

I'm developing a new token and I'm curious how I can interact with the token after is build and deployed. For example: Token1 has 10M tokens of total supply, I want people to can get those tokens, how ...
1
vote
1answer
87 views

Other ways of paying gas different than Ether?

I've been trying to transfer my BATs from my ledger to the exchange address, only to discover that I haven't enough coins in the ETH parent wallet to pay the gas .. I had some ETHER until a couple of ...
0
votes
1answer
118 views

Attempting to transfer erc20 elrond to elrond gold in trust wallet - error insufficient funds

Does anyone have a step by step guide to transfer my 7566 elrond to elrond gold? My elrond is in Trust Wallet and tried to send to my elrond gold wallet but network said I have insufficient funds and ...
0
votes
0answers
259 views

How to transfer POLS token from Metamask Eth wallet to DOT wallet?

Could anyone describe the procedure of transferring POLS token from Eth Metamask wallet to DOT wallet (for example polkadot{.js}) wallet?
0
votes
1answer
113 views

ERC20 Contract transfer call failed multiple times, no idea why

I found this token that got airdropped on me a while ago, and I don't want it. It was valued at $18 or so. I decided to sell it, but the exchange had a minimum amount, so I simply bought more so I ...
0
votes
0answers
24 views

Can sending msg.value to owner be dangerous?

I have an erc721 token with a payable function added to it. It just needs to mint the token and then owner.transfer(msg.value). Assuming owner is my own address which I used to deploy the contract.
0
votes
1answer
31 views

Sending Ethereum to the contract owner on purchase

I have a smart contract that allows one to purchase a set number of NFTs for 0.2 ether each. I have set the owner of the smart contract to the one who deploys it and whenever someone purchases an item ...
0
votes
0answers
49 views

How to get rid of “Gas estimation errored with the following message” in this case?

In my front-end, I try to call a function called endAuction. In endAuction, I transfer payment to a seller and participants. While calling it from the front-end the transaction fails without any ...
0
votes
1answer
116 views

Is it possible to predefine 'msg.value' when calling a function in an external contract?

I am new to developing smart contracts and have had some trouble trying to troubleshoot a solution to this problem. I have two smart contracts... Contract X: (The bank - Balance 100 ETH) contract X { ...
0
votes
0answers
69 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 ...