Questions tagged [tokens]

A token is a transferable, divisible object on the blockchain, such as a subcurrency or a prediction market share.

Filter by
Sorted by
Tagged with
0
votes
0answers
29 views

Always getting “Gas Estimation failed” in Remix when testing 1inch swap function

I am trying to test 1inch swap function from the contract deployed via Remix on a Ganache fork of the Ethereum Mainnet. When calling this function I always get the "Gas estimation failed" ...
0
votes
1answer
18 views

Creating ERC20 token: What determines price, PoW, Minting and changing code after deploying

I did a lot of research about this, but still don't understand some concepts around token price and proof-of-work. First of all, imagine I've created a token, which is ERC20 or 223 standard smart ...
0
votes
1answer
8 views

Invalid implicit conversion from contract to address

pragma solidity 0.5.10; contract ERC20 { function totalSupply() public view returns (uint supply); function balanceOf(address _owner) public view returns (uint balance); function transfer(...
0
votes
0answers
8 views

How do I create a Token Tracker for my ERC20 token on Etherscan? [closed]

On the Ropenstine Test Network, It took only a few seconds for my ERC20 token to have a tracker page. Not a contract page, but the ones that say "Token: (Token Name)". Here's the contract: ...
0
votes
1answer
18 views

Best Practices for Verifying Ownership of an NFT ERC-721 Token

I am developing a Smart Contract (SC) and a front-end Dapp which will be used to sell some NFT ERC-721 tokens. When a user/address buys one of the NFT tokens, the token will be minted to his benefit ...
0
votes
0answers
6 views

libraries to transfer tokens privately suitable for mobile phones

I'm trying to implement a way to transfer tokens (ERC-20, etc) privately without leaking the amount transferred. I've seen anonymous-zether and Zokrates but the problem is that these solutions are ...
0
votes
0answers
6 views

Any ideas how to recover my 400 UNI drop from an old instadapp mcd vault smart contract?

I apologize for having to post this again because my lack of reputation but maybe I can reword it better this time. My ETH address: 0x34A2860bbbA761ae27005799b02D3DbD8b4b5fEb Old InstadApp MCD Vault ...
0
votes
0answers
17 views

How do I update the total supply of an ERC-20 token with an API? [closed]

I have an ERC20 token I'm working on, and I want it to update the total supply with the world population. Using this API: https://world-population.p.rapidapi.com/worldpopulation, what code will allow ...
0
votes
1answer
8 views

i have WETH in my ETH wallet but i can't send it

As you see, I have 1.7 WETH. When I try to withdraw, it shows me this [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/XHQjq.jpg!![enter image description here](https://i.stack....
1
vote
0answers
21 views

How to pass array in web3js(0.20) as function parameter to solidity?

I have a function in solidity which take array as argument and processed that array. function add_level_income(address[] memory _referredBy, uint256 taxedTokenAmount) public returns(bool) { ...
1
vote
0answers
28 views

Failure to call 1inch getExpectedReturn function from the Solidity contract

I am trying to test 1inch getExpectedReturn function from my Solidity contract. I deploy my contract on the Mainnet forked with Ganache via Remix. The entire contract is pretty simple and looks as ...
0
votes
0answers
9 views

trying to transfer HEX token from my mobile(android) metamask wallet to my laptop(chrome) metamask wallet

Didn't comprehend what a headache MetaMask (android) was going to be. Long story short, gave up trying to stake HEX tokens from my mobile device. I went to my laptop and discovered the android/chrome ...
0
votes
1answer
22 views

How to swap ETH to WETH on Uniswap

I'm trying to swap ETH to WETH tokens within contract, but cannot find any information how to do it. Can anybody help? Thanks!
0
votes
2answers
14 views

Approving from the contract

ERC20 token interface has the approve function approve(address spender, uint amount) Is there any function, where the contract itself can approve its tokens for another address? Something like this ...
0
votes
0answers
10 views

ERC721 `safeTransfer()` chain of events

When examining OpenZeppelin's library of contracts for ERC721 Tokens, you'll find that all tolled, there are literally five flavors of the transfer method, as follows: transferFrom(from, to, tokenId) ...
0
votes
1answer
26 views

ERC20 tokens in Metamask suddenly not showing

I've been using Metamask in Chrome for a while and had a list of ERC20 tokens in Ropsten network already added in the Assets section through their contract addresses: DAI address: ...
1
vote
1answer
12 views

What is the easiest way to interact with your contract in a development environment?

Is there some form of toolkit which generates a console similar to the one on etherscan, where you can call functions that are defined in your contracts ABI? It seems quite painful having to write the ...
0
votes
1answer
23 views

why does ERC20 Token Balance shows 0 frequently?

I have a DAPP and ERC20 Token which has an initial supply of 9000 for testing purpose..First step is to login/register into the DAPP where all the information resides..There is an element in the DAPP ...
1
vote
0answers
48 views

How does Uniswap calculate price impact without fee on the swap page?

Context: We are creating a smart contract which integrates Uniswap DEX for swapping Tokens to ETH. We need to make sure one swap does not impact the token price more than 3%. We are in need to write a ...
0
votes
1answer
17 views

Can we use both centralized and decentralized approach for developing DAPP?

I saw a dapp using Decentralized approach for the buying and selling ERC20 Tokens ..But there's no proof of using the functions defined in smart contract in the web3js library.How is that possible ?.....
0
votes
1answer
16 views

What are Ethereum Tokens and what applications is it geared towards?

I'm new to Ethereum and I'm not sure how tokens are meant to be used -- specifically, ECR 20 tokens. I'm looking at an example here: pragma solidity ^0.5.10; contract Token { // An `address` is ...
1
vote
1answer
21 views

What's the difference between token tracker and address page in Etherscan?

As an example, let's use DAI. DAI has these pages in Etherscan: https://etherscan.io/token/0x6b175474e89094c44da98b954eedeac495271d0f https://etherscan.io/address/...
0
votes
0answers
26 views

Accept popular ERC20 tokens and auto-convert them to ETH in a smart contract

As an intermediate in smart contract development, I'm now facing the challenge where I would like to unify payment on the Ethereum ecosystem in a way that holders of popular ERC20 tokens can pay my ...
1
vote
1answer
34 views

How to approve user to spend all my ERC20 tokens?

In ERC20 we approve a user to spend our token and then they can spend as much allowed using transferFrom, but if the allowance limit exceed then I have to approve again, is there any way to allow them ...
0
votes
0answers
24 views

Reward for doing useful computation

I'm new to Blockchain. I'd like to design a system where solvers can solve real-world tasks initiated by the task owners. Miners are part of a cloud/cluster that provides resources. They verify and ...
1
vote
1answer
21 views

Why do almost all of the ERC20 tokens have even number of decimals?

I'm thinking of creating a token with a decimal point of odd number. However I'm kind of worried if there is any issue that can be caused by using an odd number for the decimal point. Is there any ...
0
votes
0answers
24 views

Public function when called from another contract throws error “The called function should be payable if you send value”?

This is the contract I am calling from: contract MultiTransfer { function multiTransfer(Marcelo token, address _addresses, uint256 amount) public { token.transfer(_addresses, ...
0
votes
0answers
12 views

How to handle refer by register functionality in Dapp with Smart Contract? [duplicate]

I've just started to learn solidity programming..Firstly, I have a register page, in which the metamask opens up an popup and connect the user address to my dapp by registering the user on their ...
1
vote
1answer
51 views

How to register USER in my Smart Contract using Solidity?

I can't figure out how do we register user in smart contract and get the userdata when he/she tries to login after register through our website..I didn't see any article regarding this..Kindly ...
0
votes
2answers
31 views

How to verify the type/name of token received in a smart contract?

Here is a sample contract which is designed to take xyz token. How can the contract verify that the sent is the xyz token? pragma "^0.7.0" contract myContract { address public payable ...
0
votes
1answer
34 views

Get ERC20 balance of token holder as of block number with C# Nethereum and Infura

When this code runs, it throws an error "RpcResponseException: header not found", and I don't understand why or how to fix it. Any advice? Notes: I am using Nethereum in C#.net and using ...
0
votes
2answers
31 views

How to generate a transaction for ERC20 token?

I'm currently use this package to generate new transaction in ETH: https://github.com/kornrunner/php-ethereum-offline-raw-tx Now I want to generate a transaction for an ERC20 token like Tether. As I ...
0
votes
2answers
15 views

Clarifications regarding ERC20 Token

As I am reading about ERC20 standard, I found some points that confused me a bit. Below, you can see the code that I am trying to understand. So, my questions are the following; It says as a comment ...
0
votes
0answers
25 views

Revert error when sending ERC20 token on Ethereum mainnet fork

I am trying to send an ERC token (USDC) on the Ethereum Mainnet fork made with ganache-cli --fork. The transfer is made from the unlocked account that has both ETH and USDC balances available to the ...
1
vote
2answers
24 views

Sending token with contract interaction in Remix

I'm aware of using the value field in Remix to include ETH with my function call transaction but is there a way to send another token with my transaction, for example, LINK? Additionally I would like ...
0
votes
0answers
33 views

How do I edit this contract to remove the fee payment and mint a new token?

So I have a contract, What I wanna do? Remove the payment fee; Replace variables to deploy my own token; Here is the original contract https://ropsten.etherscan.io/address/...
0
votes
1answer
26 views

Contract Interaction and Batch Transaction with Web3

I've reviewed most all of the posts on this topic, but none of the answers are doing exactly what I need. I have an application that allows users to submit their tokens from their contract into my &...
1
vote
1answer
43 views

how to get list of transactions history about specific contract address using web3?

I really don't know how to get a list of transactions history about specific contract address using web3.py and I use Infura HTTPProvider I just have only one 'contract address'. Can i get information ...
0
votes
2answers
16 views

I need a smart wallet contract (for testing)

The testing specification for my current task requires Create 50 smart wallets that can hold M+ tokens. Thus I need a smart wallet contract. Please give me source of a simple smart wallet contract. It ...
0
votes
1answer
18 views

Why does this code not work with Tron address?

function transfer(address to, uint256 value) public returns (bool) { require(value <= _balances[msg.sender]); require(to != address(0)); uint256 tokensToBurn = findPercent(value); ...
0
votes
0answers
30 views

Tron vs Ethereum differences?

I'm a new coder, just trying to experiment with things. I was looking at an Ethereum smart contract, and trying to see how it would work with Tron. It is a contract that has an address where for every ...
1
vote
1answer
59 views

Are there any wrapped ERC20 tokens that are privacy coins?

ERC20 tokens by itself are not private as anyone can see everyone's balance. But a wrapped token for a privacy coin like Monero or Zcash can be anonymous when converted from the wrapped version. Does ...
0
votes
1answer
18 views

Make dapp users pay the gas fee

I have deployed and tested my custom token contract using Openzeppelin contracts successfully. I need to design a dapp using metamask. I want to sell my tokens in exchange for Tether Token. In order ...
3
votes
1answer
43 views

How do I send multiple transactions as one transaction?

Say I need a user to approve a contract with an erc20 token balance and then the contract can execute it's function after. Typically, I would have to do an approve transaction with a nonce of 1 and ...
1
vote
1answer
41 views

Why can smart contracts receive ETH but not other ERC-20 tokens?

From what I've gathered (and I'm new to Ethereum), smart contracts can receive ETH payments and hold them through the receive/fallback blocks, but cannot directly hold ERC-20 tokens, but rather they ...
0
votes
1answer
24 views

Is it possible to work with stable coin currency in Ethereum smart contracts using solidity?

I know in solidity you can use identifiers like ether and wei. For example, I can do something like if (msg.value == 1 ether) { //do something } Is it possible for me to use stable coins as a type ...
0
votes
1answer
25 views

Revert error on delegated transfer function

Here is my code base, first I am deploying the tokenPS contract on the tesnet which generates an addr(0xaddr) and then I am deploying the caller contract. In caller contract when I am trying to ...
0
votes
1answer
28 views

A contract inherit from a token contract

I have a token contract(ERC20) A, then another contract B inherited from A (B is A). A contract C imported B. questions are: if I deployed B alone, is the address of this contract B represent the ...
0
votes
0answers
26 views

Calculate exchange rate

I am running am ethereum node and I'd like to calculate the exchange rate of any token into USD, without using any external API. How do i accomplish this?
0
votes
1answer
14 views

Linking Two Event emissions

If I have a (NFT) token that has a TransferSingle event emitted when the token is transferred, and I emit a second event that indicates it was a sale at a certain price--how do I link the sale to the ...

1
2 3 4 5
31