People who code: we want your input. Take the Survey

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
7 views

Is it possible to set the value of contstructor?

Link of the contract:https://github.com/laronlineworld/autoswap/blob/main/autoswap.sol pragma solidity ^0.5.0; // SPDX-License-Identifier: MIT contract BIMPCrowdsale is Crowdsale , CappedCrowdsale{ ...
0
votes
0answers
4 views

how to create a function to set this value anytime“uint256 public investorHardCap =250000000000000000;”? this is a autoswap contract

Link of the contract:https://github.com/laronlineworld/autoswap/blob/main/autoswap.sol It is possible to set the value "uint256 public investorHardCap =250000000000000000;" the investor cap ...
1
vote
1answer
11 views

Why we sort tokens in uniswap functions?

function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES'); (token0, token1)...
0
votes
1answer
17 views

Deploy fail error in deploying TRC-20 contract

I aimed to deploy this TRC-20 contract (link) following this tutorial step by step on shasta test network. I complied the contract successfully but when I wanted to deploy the contract, I got the ...
1
vote
0answers
23 views

Timestamp of when address received a token

Trying to find a way or documentation in obtaining the timestamp of when an address received the token in a smart contract. I have read many reflection based contracts that apply different levels of ...
1
vote
0answers
8 views

Is hyper ledger fabric ERC compatible?

If I need to use an ERC-1400 token, can I use it on an AWS hyper ledger fabric for example? FYI: New to blockchain technologies
1
vote
1answer
12 views

Auto adjustable token supply

Is it possible to a token to adjust its own total supply so it can keep your price more stable? I mean when a token "realizes" it is too cheap it burns some amount and when is too expensive ...
0
votes
1answer
8 views

What if the owner remove address A from whitelist?

Let's imagine account A has the 1000 tokens and it's in the whitelist. Since this token provides the functionality of removing someone from the whitelist only to the owner. What if remove account A ...
0
votes
0answers
8 views

Tracing manufacturing processes using token compositions

I am trying to understand how to trace a manufacturing process using token compositions, but unsure if it is a good approach. Basic example: Entity A produces flour Entity B produces bread Within a ...
1
vote
1answer
16 views

what is math for uniswap calculates the amountout and amountin why 997 and 1000

function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {//the amount of user,amount in pool,output token amount in pool require(amountIn > ...
0
votes
1answer
13 views

I sent ERC20 to Ethereum wallet that doesn't accept tokens. Is there any way I can recover it? [duplicate]

So after creating the smart chain bnb network on metamas I swapped my BNB to ETH and sent it to a casino account. apparently those were ETH tokens and they don't accept them. Are there any ways I can ...
0
votes
0answers
15 views

How to get the owners of NFT tokens - issue with ownerOf(uint256 _tokenId) function

I'm trying to create a bond NFT on blockchain and currently testing the functions on the ERC721 standard. I'm having issues with the function ownerOf(uint256 _tokenId) external view returns (address); ...
0
votes
0answers
11 views

Smart Contract is Minting - Help Needed

My smart contract is minting without a mint function. My smart contract can be seen here: https://bscscan.com/address/0xacd6fd33553b8dbb7efbc8ea3a1be09fa3650787#code It's meant to have a manual burn, ...
0
votes
1answer
23 views

Stack too deep error - need help fixing it! [duplicate]

I keep getting the 'stack too deep' error on solidity. I was wondering if anyone can help me fix this with in following code: function _getTValues(uint256 tAmount) private view returns (uint256, ...
0
votes
1answer
12 views

How to make your token safer without => setTaxFeePercent(uint256 taxFee) external onlyOwner()

if I understand correctly, this line allows the owner to adjust the fee afterward, so in the worst case, a rugpull is possible. function setTaxFeePercent(uint256 taxFee) external onlyOwner() { ...
1
vote
1answer
36 views

How is the initial price of a cryptocurrency determined?

I know how or what affects the price of a mature coin (buying and selling). But when it is first minted, what determines its initial price? This is not a philosophical question I'm asking. I was ...
0
votes
0answers
16 views

How would I implement a 1% burn of tokens from each transaction?

How would I implement a 1% burn of tokens from each transaction? This is my code below, but I am struggling to get it to work. Any help would be greatly appreciated. pragma solidity ^0.8.4; // SPDX-...
0
votes
0answers
11 views

Getting list of all tokens in address [duplicate]

I'm trying to creare a list generator that would list all the token addresses that are in a wallet by just a wallet address and refresh the list in time. Any tips or sugestions how to do that in ...
0
votes
0answers
26 views

How do I know what the hashing algorithm is for my BEP20 Token?

How do I find the hashing algorithm for the BEP20 Token that I created using remix.Ethereum? I am fairly new to the token world, but I managed to create a token. Here is the link to Bscscan if that is ...
1
vote
1answer
5 views

error input in remix

Error: types/values length mismatch (count={"types":3,"values":4}, value={"types":["address[]","address","uint256"],"values":[&...
0
votes
0answers
21 views

How to prevent users from adding liquidity in a BEP-20 token

I am relaunching a BEP-20 token and want to migrate from an old token to a new token with the same supply. I already have everything figured out, except for one thing: Question I want to make sure ...
0
votes
1answer
13 views

Can ERC tokens change their creation code or parameters afterwards?

Probably a dead stupid question, but just to make sure: can ERC20 or other tokens based on Ethereum Smart Contracts alter their properties after the creation? For example, can they change decimals ...
0
votes
0answers
25 views

Sign transaction on behalf of user and execute server-side

Hello StackExchange 👋 I'm working on my first Ethereum learning project (an ERC721 marketplace that generates tokens based on user input), wrote a couple of untested contracts and am now looking to ...
0
votes
1answer
18 views

Contract keeping track of token transfers

I want to create a contract that keeps track of what tokens have been sent to it (what amount, type, who sent it, etc.) I can do this for ERC721, ERC 777, ERC 1155 using the "tokenReceived" ...
1
vote
0answers
19 views

Use token.balanceOf(address) in truffle console

I'm doing some tests deploying some contracts and using truffle's console. I need to check what is the balance of a given token in one of the default accounts that truffle/ganache creates. Is there a ...
0
votes
1answer
26 views

Is it possible to redistribute ERC20 tokens?

While helping a friend with his ICO I saw he made a mistake while creating the tokens. The idea was the following: 20% Pre-sales and ICO 10% for the whole team 2% Marketing 1% Bounty 1% Airdrop 1% ...
0
votes
0answers
7 views

Getting parserError while compiling ERC20 contract?

I got this below error while compiling the contract... ParserError: Expected a state variable declaration. If you intended this as a fallback function or a function to handle plain ether transactions,...
0
votes
0answers
27 views

Minting ERC20 token fails because of zero address even though address is non-zero

I'm building an ERC20 token using OpenZeppelin's ERC20 contract. My token constructor looks like this: constructor() ERC20( "Token", "TKN" ...
0
votes
0answers
8 views

Question about 13.set taxless, whitelisting adress

I have total of 10% taxes on my token (5% to holders and 5% to liquidity0, however when I want to use or send some tokens for development and marketing, I don't want to pay the 10 percent tax. Can I ...
1
vote
0answers
24 views

Gas Estimation Error - Swap Contract

I'm working on developing a contract that automatically performs a swap and have been having an issue with the swap function. I finally got the contract deployed on Kovan, but have been getting the ...
3
votes
1answer
35 views

Can I send fraction of Fungible Token generated using ERC1155?

I am familiar with ERC20 and ERC721. Now exploring more about ERC1155. Just like we can send a fraction of ERC20 based token. can we send a fraction of ERC1155 based fungible token?
0
votes
1answer
41 views

How to get token info with contract address in Ethereum

I use web3 library to interact with Ethereum Network and I want to get token info with his contract address such as tokenName, tokenSymbol, tokenDecimal, tokenLogoURL etc. I can get almost any data ...
0
votes
1answer
26 views

How to make a smart contract which pays out only if a service is performed?

Hello I am new to the world of solidity. I am trying to create a smart contract with the following conditions: a customer wants to buy a service/product from a retailer (me). the price of my service (...
1
vote
0answers
19 views

Error: Only replay-protected (EIP-155) transactions allowed over RPC

When I try to send funds from a token address to another I encounter this error: only replay-protected (EIP-155) transactions allowed over RPC My Code: const contract = new web3.eth.Contract(ABI,...
0
votes
0answers
6 views

How to create a NFT and tokens representing that particular NFT?

I want to mint an NFT and some token representing that particular NFT. Is this possible to use ERC1155 or I have to use both ERC20 and ERC721 together?
0
votes
1answer
9 views

How do I burn coins with this function? And general question on “burning” ECR-20 tokens

/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * ...
0
votes
3answers
29 views

Question regarding cryptocurrencies backed by commodities aka stablecoins

Anyone know how to peg the price of an ERC 20 token to the value of gold? What needs to be done in the coding of the smart contract? Is there a step by step tutorial somewhere? If I had gold reserves ...
1
vote
1answer
17 views

What's the reason all tokens have decimals?

All of tokens have decimals property, e.g. WBNB token has 18 decimals. If there was a dex pair using different decimals, then we would first need to divide both sides before we calculate rates. (...
1
vote
2answers
167 views

UniSwap V3 API : How to track **unclaimed fees** programmatically?

I have invested in UniSwap-V3 Liquidity Pool. And how to track unclaimed fees programmatically? I plan to have server-backend API fetch data to track unclaimed fees ($27.92 in picture) I have tried ...
0
votes
0answers
29 views

Why is my smart contract address for my token accumulating tokens?

The link to my smart contract on bscscan is 0xB7EBB0715A799e5A3749DBAAF6657c10c1da07D3. You can see that the contract owns 1.8% of the total token supply. This number keeps rising. Can you explain why ...
0
votes
0answers
8 views

How do information sites like CoinMarketCap get tokens/coins trading volume?

How do information sites like CoinMarketCap get tokens/coins trading volume? Is it just from exchanges? Do they take into account tokens transferred between wallets and smart contracts? Are those ...
0
votes
0answers
9 views

Can I change my rewards into BTC/BUSD, The concept of the token is just hold the token and it will calculate the BNB rewards you can get daily

function calculateBNBReward( uint256 _tTotal, uint256 currentBalance, uint256 currentBNBPool, uint256 totalSupply, address ofAddress ) public view returns (uint256) { uint256 bnbPool = currentBNBPool; ...
0
votes
1answer
144 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
0answers
9 views

Checking if address previously sent token to adddress

I am developing a function that allows a user to mark another one as a scammer, this will be later displayed in a webapp. To do this, i need to know if the user (address) previously interacted (sent ...
0
votes
0answers
37 views

WETH solidity smart contract for use as address in other contract

In the constructor of the Solidity contract given in the link below https://github.com/pancakeswap/pancake-swap-periphery/blob/master/contracts/PancakeRouter.sol receives a second arg which is address ...
0
votes
1answer
25 views

I accidentally sent all my tokens to a token contract. Can I get them back?

I accidentally sent my tokens to this token contract, is it possible to get them back? 0x33E6Ad33255890e79cE1431FE142e1F3bC1fbEc3 Thanks!
0
votes
0answers
20 views

How would I collect fees from an liquidity pool on pancake swap?

I understand that to start collecting fees you need to add liquidity to a pool e.g. BNB/BUSD Liquidity pool. So I have a smart contract that uses the uniswapv2 interface to add liquidity to the BNB/...
0
votes
1answer
144 views

Token Price from pancakeswap

Actually i was wondering how to retrive the price of a low cap token from pancakeswap without having to use sites like poocoin/dextools directly. I understood this, U can use the pancakeswap api here,...
0
votes
1answer
22 views

How to get amount of token0 and token1 deposited by me using uniswap v2 API?

Using uniswap, I want to check the amount of token0 and token1 deposited by user. For instance, user created pair Token0/Token1 in Uniswap. First, user input amount of Token0 and Token1. When start ...
0
votes
1answer
51 views

Understanding BSC, BEP-20 and ERC-20 tokens

I would like to ask a few questions. If we have an ERC-20 smart contract deployed on Ethereum and if we want to move it to binance smart chain because of high transaction fee, what is the best move ...

1
2 3 4 5
36