Questions tagged [tokens]
A token is a transferable, divisible object on the blockchain, such as a subcurrency or a prediction market share.
2,441
questions
0
votes
1
answer
38
views
What's a good amount of stable coin to deposit into a liquidity pool?
What's a good amount of stable coin to deposit into the liquidity pool and what percentage of the token's supply should be in a liquidity pool?
0
votes
2
answers
129
views
Why creating ERC20 tokens instead of using ETH?
I have made an online web app which executes a process only if a transaction on the Ethereum blockchain is made. As I was developing my initial thought was to create an ERC20 token so that whoever has ...
0
votes
2
answers
140
views
How to call a contract within smart contract?
I need solidity analog of web3 command:
const contract = new web3.eth.Contract(contractJSON.abi, deployedAddress)
The context is:
Contract A call contract B
Contract B receives an address of ...
0
votes
1
answer
196
views
How do I check if a block contains a transaction for a token like USDC or USDT
I'm exploring Blocks & Transactions at the moment. I can see in the blocks there's transactions which show what addresses sent ETH and where to. However, I'm wondering how to tell if these are for ...
0
votes
1
answer
80
views
HTTPError: 401 Client Error: Unauthorized for url: https://rinkeby.infura.io/v3/$WEB3_INFURA_PROJECT_ID
I'm following this solidity tutorial from Patrick Collins and when running a script:
brownie run scripts/1_deploy_token.py --network rinkeby
I get this error:
INFO: Could not find files for the given ...
0
votes
1
answer
568
views
NFT tokenID question
I've got an ERC721 contract as part of a larger react dApp. My app is connected using web3 tools to the user's wallet. I need to be able to see if the address connected has a token balance for my ...
0
votes
2
answers
42
views
How to give rewards to users
I'm a crypto noob. We have an application in which users can create food recipies and other users can use them and thank them for.
Now we want to reward recepie creator based on the amount of "...
0
votes
1
answer
529
views
Creating a smart contract that only accepts a specific ERC20 token [duplicate]
Currently building a smart contract that will basically receive money from users and users can withdraw what they've put into.
I want the money held by the smart contract to be only USDC (+ USDT maybe,...
0
votes
2
answers
244
views
Is there a problem to put decimals of my new token fewer than 18?
I know that it's possible put more or less decimals, but if I want, for example, 8 decimals, would my token works good as well?
0
votes
1
answer
39
views
How to make secure transactions in contracts - Solidity
If I have a contract deployed to an exchange. From there I (hacker) can download the abi for that contract. So, now I have the abi and let's say I have the address of the owner (victim) as well. So, ...
0
votes
2
answers
1k
views
Can't create pair with IUniswapV2Factory
I am writing a BEP20 contract with a fixed transaction fee which gets swapped and sent to the team wallet. To make the whole thing working I could successfully initialize a IUniswapV2Router02 and ...
0
votes
2
answers
361
views
Difference between token transactions number and same token smart contract transactions number
On Etherscan the token analytics of the contract (https://etherscan.io/token/0x799a4202c12ca952cb311598a024c80ed371a41e) shows the total 1991 transactions while the same token contract (https://...
0
votes
1
answer
1k
views
How to determine if some LP tokens related to my token or not?
I want to build an ERC20 token and I want to add staking functionality for liquidity providers. If someone decided to make a liquidity pool with my tokens and then stake it to my contract to earn ...
0
votes
1
answer
195
views
Setting token price on a Dex [closed]
There are various opinions and parameters when it comes to the setting of a token price.
What are the best practices when setting the token price on a Dex?
0
votes
1
answer
392
views
Can you reserve your token name and symbol before releasing to mainnet?
Is it possible to list our token to reserve the name and symbol before our contracts are released on mainnet?
0
votes
2
answers
156
views
How can I save e-mails in my contract in secure way?
I trying to save e-mails of my users in contract but I can simulate the from when I call methods of contract.
Contract.sol
contract Test {
...
mapping (address => string) private _emails;
...
0
votes
2
answers
1k
views
ERC20 token vs CW20 token
What I found about CW20 token is loosely based on ERC20 token.
What methods are different in CW20 token comparing to ERC20 token and what method might additionally exist in CW20 token?
0
votes
2
answers
3k
views
"Price Impact Too High" swapping tokens back to ETH on basic contract with liquidity (Uniswap)
I created this basic smart contract on Rinkeby (uses OpenZeppelin ERC20PresetMinterPauser preset), minted 1m FOO, then added liquidity on Uniswap v2 with 10 ETH and 1m FOO. I then swapped 1 ETH for 90,...
0
votes
2
answers
1k
views
Can an ERC20 Smart Contract prevent a wallet from holding more than a certain amount?
I'm looking into a bit of functionality for an ERC20 smart contract token that would prevent any one wallet to hold more than X percent of the token. Couple of questions:
Is it possible?
Is it ...
0
votes
1
answer
2k
views
What is it mean by minting token?
I've created a BEP20 token and I can't figure out some steps, I've created for about 21000000 total supply of token and why should I mint token after creating it?
How much should I mint? How minted ...
0
votes
1
answer
329
views
Are there any fungible, but indivisible, ERC tokens?
Are there any ETH tokens that are fungible, but also indivisible?
I'm learning about ERC-1155, and one of the common use case examples is video game items. For example, your game might have 200 swords....
0
votes
1
answer
144
views
Create my first ERC721 Collectible collection (VS CODE) //Need Advice
I want to start developing with Solidity in my Visual Studio Code my first ERC721 Collectible collection so i installed Visuall Studio Code first, then nodejs and npm and in the end Truffles and ...
0
votes
3
answers
1k
views
How to identify whether a coin or token runs on Ethereum?
Hundreds of coins and tokens are listed on coinmarketcap.com, but how can you tell which ones are Ethereum-based or Ethereum-dependent? Hundreds of them obviously are. Is it only through one's own ...
0
votes
2
answers
1k
views
Payable and address.transfer for ERC20 token
I am trying to develop forsage like MLM using ethereum smart contract. But I like to use ERC20 token for registration payment and dividends. The ERC20 token is already deployed. I have to use deployed ...
0
votes
2
answers
1k
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
2
answers
35
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
3
answers
481
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 ...
0
votes
1
answer
42
views
I would like to warp a token and inherit its methods in a wrapper without declaring them in a wrapper. Can I do this?
The reason why I am asking this is to create something that is closely related to mutability. So, instead of creating a different token every time there is a code-change, I would like to simply use a ...
0
votes
1
answer
328
views
cannot transfer token from EOA account to a contract from function
i was making a contract for staking where user transfer its token to a contract and i will give him interest but i got stuck to this problem i have been searching for 3-4 days but for it is not ...
0
votes
2
answers
630
views
Super simple token with Open Zeppelin
I want to create a super simple token for my community. I read some tutorials and I found this code:
pragma solidity ^0.5.2;
import "./lib/oz/contracts/token/ERC20/ERC20Pausable.sol";
import "./lib/...
0
votes
1
answer
74
views
How to get initial balances for all those who bought tokens?
Is it possible to get the initial balances for all those accounts who bought ERC20 tokens? If that’s possible, how that can be achieved?
I’m wondering if there is any way of getting that information ...
0
votes
2
answers
604
views
gas required exceeds allowance when deploying ERC721token
I am trying to deploy Smart-contract(ERC721) on my private ethereum network.
But I have this issue.
Here is my genesis.
{
"config": {
"chainId": 3333,
"homesteadBlock": 1,
...
0
votes
1
answer
179
views
ERC20 transfer showing as 0 but log shows different
Checking the transaction https://www.etherchain.org/tx/e12af4940879c634a63d2c9629449695e07650a4e419e5822ddb18d8469e9948 anyone can check there were 3 DigixGold token transfers.
These transfers are ...
0
votes
1
answer
53
views
Is Smart Contract of any ERC20 token is always available publicly
Is Smart Contract of any ERC20 token is always available publicly.
If not complete, then what things are generally available,(for eg, except some sensitive information)
And, if not any of them are ...
0
votes
1
answer
358
views
ERC20, how to calculate how many tokens for crowdsale?
If you look at this article, the total tokens for crowdsale is 100 tokens and defined in the code as
uint256 public maxTokens = 100000000000000000000;
how come 100000000000000000000 becomes 100 ...
0
votes
1
answer
390
views
How can I wait if it's not possible in smart contracts? [duplicate]
From my understanding, waiting in a solidity smart contract would create a total disaster for the whole Ethereum's blockchain.
I can see in some circumstances that solidity offers block.timestamp ...
0
votes
1
answer
351
views
Is a contract verified and safe if it's created by a verified contract?
The contract source code is not verified as you can see in the picture, but the contract was created by another contract code which is verified.
Does that mean that the contract code from the picture ...
0
votes
2
answers
51
views
Create token with address and fields
I would like to know if it is possible to create tokens that have a different address or id for each one.
I need to create a series of "objects" with the same structure but with the values of ...
0
votes
1
answer
296
views
Can use smart contract as payment gateway [closed]
Most suggest that cannot use ERC20 token as payment gateway integration .Why?
0
votes
1
answer
222
views
Can we freeze amount of token, amount of time with smart contract code?
Is there a smart contract code to freeze amount of token amount of time. For example i have 20 ether, with a smart contract code can i freeze it 1 year, even i can not touch it? With that code our ...
0
votes
1
answer
57
views
Can't create child contract in mainnet?
address[] child;
function createChildContract() onlyOwner public{
address newChild = new Child(msg.sender);
child.push(newChild);
emit ChildCreated(newChild);
}
contract Child {
...
0
votes
1
answer
20
views
Function inside constructor is called from which address?
interface token {
function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);}
contract CampaignFactory{ token public token_instance;
constructor()...
0
votes
1
answer
667
views
How to interact with events from a smart contract?
can we get access to watch the event and get logged data from them and use it for processing in a smart contract?
Like matching an state variable with the data logged by an event .
0
votes
1
answer
329
views
ERC777 granularity rounding error
I'm making a token with ERC777 standard.
I've got my decimals at 18, and I want whole tokens, so I set granularity to 10^18.
when I try to mint 20 tokens, I get granularity error. So I made a ...
0
votes
1
answer
1k
views
How to destroy token of ERC20 safety?
I have issued an ERC20 token, currently I want to destroy some of my token, how to do that? Does there have a destroy address officially, I just transfer token into it, and no one can transfer out?
...
0
votes
1
answer
308
views
Freezing ERC20 token for certain amount of time?
Is there any functionality like randomly specifying freezing portion and freezing period .For example, we must transfer 100,000 ERC20 tokens to a users. We transfer 10,000 tokens with no restriction, ...
0
votes
1
answer
4k
views
Smart Contract that can transfer ETH to other ETH Wallet (Owner of the Smart Contract)
I actually my partner created a Smart Contract which is able to create a new smart contract and send the proceeds. I'm quite new to Solidity unable to figure out a way to modify the smart contract to ...
0
votes
1
answer
139
views
How would I figure out if ethereum or token is being transferred seeing the transaction details?
web3.eth.getTransaction('0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b§234')
.then(console.log);
> {
"hash": "...
0
votes
1
answer
168
views
How do Token transfers, the associated token contract transactions and ERC20 token txns fit together?
Looking at Quantstamp token as an example it contains a list of transfers:
Similarly the associated contract also has "Transactions" and "Erc20 Token Txns", however they all seem to be different.
...
0
votes
1
answer
257
views
What does this error mean and can someone please provide the answer? It keeps saying Parser error on the burn function
Click Here for the image. `
pragma solidity ^0.4.25;
contract owned {
address public owner;
function owned() public {
owner = msg.sender;
}
modifier onlyOwner {
...