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
1
vote
1answer
9 views

Maximum totalSupply of an ERC-20 token? And is it different for any other ERC specifictiond?

uint256 This storage implies that it should give us a max totalSupply of 2^256 - 1. A HUGE number. Note: I only need to store integers, not fractional values for my application. Is this true? Is ...
1
vote
1answer
25 views

Sending transaction from different addresses in truffle test case

I am having an admin in my contract who can do certain things. Here is the contract function changeAdmin(address admin_) public { if (msg.sender != admin) revert(); potentialAdmin = admin_; }...
0
votes
1answer
13 views

Like an ERC20 interface, do we have any interface or a smart contract that supports creating and transferring Ether on Ethereum?

To create a token on Ethereum, we use ERC20 token interface to design our token smart contract that captures functions required like mint(), tranfer(), balanceOf(), etc. Similarly, do we have any ...
0
votes
1answer
15 views

Does crypto coins are transferred same as tokens?

If I understood correctly, when I want send a token using wallet (e.g., ERC20 token), I will: create a transaction (using send button on my wallet interface) with "to" address containing token ...
1
vote
1answer
13 views

Usecase for approve and allowance functions of ERC20 token

Could you please enlighten me on how approve and allowance functions work using a usecase? I dont understand the underlying operations of these functions. Especially, when a token owner delegates the ...
1
vote
1answer
17 views

Wallet transactions call functions in (ERC20) token contract to send tokens?

Firstly, thank you for helping me out in understand this. Suppose, if I have an ERC20 token contract (with all the required functions implemented including Transfer() function) deployed on the ...
0
votes
1answer
21 views

Buy tokens form other smart contract using interface

I have two separate contracts, let's say Token and BuyFrom. pragma solidity >=0.4.22 <0.7.0; interface InterfaceToken { function invest(address contributor) external payable; } contract ...
0
votes
1answer
10 views

Why token value is getting changed on Ethereum?

I have created ERC20 token with 18 decimals. From web3 (application front end) when I transfer 100 tokens, on etherscan it shows 0.0000000000000001 . When I call to get the balance then on UI it ...
0
votes
0answers
22 views

I have an ERC-20 token created. How does it get value now? [duplicate]

Ok, so a friend of mine helped me create an Ethereum token for me with a 1M supply. I call it the POTTA token. I have also started distributing my token to other friends with a tool that he built so I ...
0
votes
0answers
9 views

Why can only operators transfer between partitions (ERC1400)?

I came across this line in the ERC1400 implementation (by polymath I believe). if (operatorData.length != 0 && data.length >= 64) { toPartition = _getDestinationPartition(fromPartition,...
0
votes
1answer
21 views

ERC20 token not showing up in search

I just created a new ERC20 token on the ropsten testnet. The contract is verified and can be seend here. However when I try to search for AtariToken or ATAR I don't get any results on ropsten....
0
votes
0answers
24 views

How to config geth node to get ERC-20 tokens balances

I'm trying to tune my geth node to get ERC-20 tokens balances, but y API call always returns {'jsonrpc': '2.0', 'id': 1, 'result': '0x'} My geth node version: instance=Geth/v1.9.13-stable-cbc4ac26/...
1
vote
1answer
17 views

How to set token price inside the contract for ICO?

I am confused with decimal places and how it effects the rate of token we set for ICO etc. Lets say, ERC20 Token A have 2 decimal places and per ether 10 tokens shall be sell, then how shall I set ...
1
vote
1answer
12 views

Compiler version incompatibility nightmare

I'm new to Solidity and Truffle. I'm trying to compile my Solidity code within Truffle to create an ERC-20 token. I have @truffle/hdwallet-provider and @openzeppelin/contracts as my dependencies. Now,...
0
votes
2answers
29 views

“VM Exception while processing transaction: revert” in Truffle test and Truffle dev

this is my problem :) Issue "Error: Returned error: VM Exception while processing transaction: revert" when reaching the Transfer function. I think it is related to the fact that my Crowdsale smart ...
1
vote
1answer
26 views

Receiving error while getting state variable value after using selfdestruct method “Error: Returned values aren't valid, did it run Out of Gas?”

I am using selfdestruct method and passing the payable address to it but receiving the following error when trying to get the value of a state variable : "Error: Returned values aren't valid, did it ...
1
vote
1answer
20 views

Can't people be tricked into calling approve on an ERC token contract, and having their tokens stolen?

Most users of Ethereum and ERC tokens probably aren't aware of the existence of the approve and transferFrom functions. Couldn't users unknowingly call approve on an ERC token contract, and ...
0
votes
1answer
10 views

When and where do I set ERC721 tokens' data?

I am currently working on a smart contract to sell ERC721 tokens. I understand that my code should have a function that allows me (the owner) to mint a token and add it to a list which stores all the ...
2
votes
1answer
19 views

How to create ERC20 token with burns 0.5% of tokens on transfer?

I want to create an ERC20 token. It must burn 0.5% of the tokens at every transfer. For example, When someone send 100 tokens from wallet1 to wallet2, wallet 2 must take 99.5 tokens.
0
votes
1answer
18 views

Unable to verify if a contract's tokens is greater than the requested amount by ther buyer

I want to explain you the problem so that you don't need to read the whole files. BirTokenSale contract is trying use the tokens given to it by another contract ,BirToken contract, and send the money ...
0
votes
1answer
26 views

Creating unreasonably large amounts of money as a result of integer underflow in smart contracts?

So, according to this article: https://blockgeeks.com/guides/underflow-attacks-smart-contracts/ "Imagine a situation where a token holder has only X tokens. Suppose he tries to spend X+1 tokens. ...
0
votes
0answers
19 views

Noobish question about USDT and ETH

I want to have some USDT and send that to my metamask account. If I have only USDT on my empty metamask account can I sed that USDT to another person without having ETH for the gas price? Cause other ...
1
vote
0answers
13 views

What's the correct address of SNX?

That is, the address of the token used as collateral in the Synthetix ecosystem. I found two addresses: 0xC011A72400E58ecD99Ee497CF89E3775d4bd732F 0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F The ...
0
votes
0answers
10 views

Can you open an Ethereum wallet containing Bank to the Future Tokens if you have lost the mnemonic key? [duplicate]

Looking for help to locate and open wallet.. Many thanks, Nick
0
votes
1answer
19 views

Create multiple ERC-20 tokens without deploy a contract everytime?

I would like to write a smart contract that can issue an erc20 token when asked (with some required parameter, as name, symbol, decimals, and owner address). From what I understood I have to deploy a ...
0
votes
1answer
22 views

Sending Token from A to B and in return receiving data from B to A in same transaction?

Is it possible to send a cryptocurrency as a payment and in return getting data about a product that is shipped to you in one Ethereum Transaction like you can see in the attached picture? If yes, how?...
1
vote
1answer
26 views

Estimating gas of an ERC20 transfer

I'd like to estimate the gas of a simple ERC20 transfer between two addresses. The web3.js docs on estimateGas are admittedly confusing: // using the callback myContract.methods.myMethod(123)....
0
votes
3answers
49 views

Use custom ERC20 addresses

I am pretty new to the Ethereum and ERC20. I am willing to create an ERC20 token. I see that ERC 20 tokens can be transacted using the Ethereum addresses. However, I am wondering if it is possible to ...
1
vote
1answer
17 views

Someone sent me ethers in multiple transactions and took away my matic tokens nd those ethers

Someone (address: 0xc18842D634A683e6Ea5392e3f9f23a6966C88371) sent me Ether in multiple transactions and took away my Matic tokens and those Ether were sent to another account(address: ...
0
votes
0answers
19 views

ERC20 pricing with parameters

I have created an ERC-20 token called FBC in Ethereum however I am supposed to trigger the price of the FBC with my parameter service produced from the broadge soccer data. For instance, when ...
1
vote
1answer
30 views

transferFrom error. Exception thrown in smart contract transaction

I compiled smart contract in solidity on remix.ethereum.org. I made account via MetaMask and want to let other addresses send tokens to themselves using ropsten network. I mean - I am contract owner = ...
2
votes
1answer
105 views

How to send ERC20 token from smart contract in Solidity?

I want to make a smart contract, where you can instantly swap your Ether to ERC20 token. What I do have now: pragma solidity >=0.4.16 <0.7.0; contract Swap { address owner; address ...
2
votes
1answer
32 views

How to Calculate How Long an Address Has Held A Token? (for paying interest/rewards)

I'm writing a smart contract function that rewards users some rate of interest/reward for holding my stablecoin over owning competitors (Dai, Tether, etc). What is the most efficient manner to ...
0
votes
1answer
10 views

Who is the gas payer while using transferFrom?

In my project, I craeted separate Ethereum accounts for each customer on my Geth server (I have not access to private key in this way normally). Now, customer needs to send out ERC-20 token, whereas ...
0
votes
0answers
47 views

How to generate unique id for each tokens without using loop?

I'm creating tokens without use of any pre-defined standard. As we have requirement to track each token, I did code to assigned ids to each token. pragma solidity ^0.5.0; contract MyContract { ...
0
votes
0answers
9 views

Why does not show my token balances and the other information it on Ropsten?

I published an custom ERC20 token contract in Ropsten network and functions are working of the contract correctly. I minted the 100 token to an address an checked total supply result is 100 too. And ...
0
votes
1answer
43 views

For loop for transferFrom

transferFrom method from ERC20 contract interface: function transferFrom(address _from, address _to, uint _value) public; transferFrom function from my contract : function transferFrom(address ...
0
votes
1answer
46 views

Transfer ERC20 Token - Encountered during contract execution [Reverted]

When trying to sent some ERC20 Token from wallet getting following error: Warning! Error encountered during contract execution [Reverted] This error returned when i call transferFrom()( I made ...
0
votes
0answers
13 views

How do financial derivatives offer stable value? From Ethereum Whitepaper

I'm having a hard time understanding what this paragraph in the section labeled "Financial derivatives and Stable-Value Currencies" means: Financial derivatives provide an alternative. Here, ...
0
votes
1answer
22 views

Closed, Creating a method to airdrop ERC20 Token B to the holders of ERC20 Token A [closed]

I've been attempting some form of solidity code to automate the airdropping of Token B to the holders of Token A almost all day, but I still couldn't find much that works. How could I do this?
1
vote
1answer
31 views

Metamask doesn't show token value on erc20 contract interaction [closed]

Why using the Transfer method is showing the value of the erc20 that I want to transfer while with a custom method is always showing 0 ETH on metamask instead of the token that I'm transferring via ...
1
vote
1answer
51 views

Insufficient fund for sending USDT token on an address with no Ether

I've an Ethereum account in Geth which has received 4 Tether (USDT). I want to send 1 of them for test to another account, but I receive this error: insufficient funds for gas * price + value ...
0
votes
1answer
46 views

What are the steps to send ERC-20 tokens?

I need to send USDT and other ERC-20 tokens via Geth on Ethereum. I'm using PHP and Web3.php library to work with Ethereum. So far, it worked well for everything. Now, I need to start sending tokens ...
1
vote
1answer
42 views

Looking for code that makes this contract pay out dividends

I have used OpenZeppelin contracts to create a token in Remix that I can mint and send around: pragma solidity ^0.5.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/...
0
votes
1answer
21 views

How to safeguard a different token stored in an ERC20 contract from unwanted withdrawal?

If I want to store say a popular ERC20 (e.g. BNB) in my new ERC20 contract, how do I prevent someone from making unauthorized withdrawal of these BNBs from my contract account ? Is it possible that a ...
1
vote
1answer
55 views

How to create a token exchange for private blockchain?

I have requirement to create a exchange for my private blockchain tokens, where registered user can buy and sell tokens, and token price goes up and down on demand and supply. I have searched bit, ...
2
votes
1answer
65 views

How to create transaction data for sending ethereum from multiSig contract to account with Web3.js v1.2.1

I am using a standard MultiSigWallet contract. My goal is to create the data parameter with web3, which is used in executeTransaction / external_call (bytes memory data). The transaction should send ...
1
vote
0answers
37 views

How to get total tether supply on Ethereum from BigQuery dataset

I've noticed that the numbers for Totaly supply of Tethers seem to diverge on the official Tether transparency page and the Etherscan block explorer, and I want to find a way to get the correct number....
1
vote
1answer
36 views

gas estimate in loop

I have two contract. I call function placeBid in other contract and i have warning gas estimation. help me. thanks. Can i call function which use gas in loop through other contract? How i can get ...
2
votes
1answer
60 views

How to interact with my ropsten smart contract

I've looked for hours online for how to interact with contracts but I've yet to find an efficient way to do so. My contract is deployed at 0x09B81faA7fB51E5Af79b0241243e58297aC84158 on the ropsten ...

1
2 3 4 5
29