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
votes
1answer
22 views

Pre-sale tokens locking and gradual release mechanism

How can we lock the tokens sold in pre-sale for a specific period of time and release gradually without changing the ERC20 standards? For example: Lock for six month and release 5% of token after six ...
0
votes
0answers
50 views

Problem with Auction Contract when creating an auction

Hello everyone and thank you for your time. I am currently implementing an auction contract (based on CryptoKitties contract). The architecture consists of three contracts. An ERC721 that manages the ...
0
votes
1answer
18 views

Smart contract, that sends all the ETH to a certain wallet if balance is greater than 0

I'm new to Smart Contracts and I'm trying to build a simple Smart Contract, which sends all the ETH to a certain address if the balance gets greater than 0. I hope you can give me an example contract. ...
0
votes
0answers
17 views

ERC20 Token questions - best practices for initial distribution?

Working on a simple test token that I'm going to use to support a DApp project. Key functions I have questions regarding are as follows: constructor() { name = "Test Token"; ...
0
votes
0answers
10 views

Are there any example of Decentralized stablecoins?

I was looking for some good examples that uses Decentralized stablecoins. I want a solution where the ERC20 token is supported by another cryptocurrency say Ethereum and its rate fluctuates and ...
0
votes
0answers
10 views

Can multiple ERC20 tokens with different contract addresses in theory be pooled together in one larger main pool?

So for this example, let's say there are 3 tokens, each with a fixed supply of 1000 tokens (3000 total) and each with different contract addresses. Can these three tokens, in theory, be pooled ...
1
vote
1answer
15 views

How to deploy a contract on Polygon/Ethereum/BSC with shared state?

I would like to deploy an ERC-20 token on multiple chains : Ethereum, Polygon and the Binance Smart Chain while keeping the same address ideally. But I have literally zero idea on how to do that, I ...
0
votes
1answer
18 views

Remix IDE: Parse error : expected '{' but got 'return'

pragma solidity ^0.8.7; contract Token { mapping(address => uint) public balances; mapping(address => mapping(address => uint)) public allowance; uint public totalSupply = 10000 ...
0
votes
0answers
13 views

how to transfer erc20 token and ethereum in the same transaction

Is is possible to have a function that charges a value in eth to contract owner and also a value from the contract token?
0
votes
0answers
7 views

my pausable erc-20 token always on its balance always returns 0

Alright, I'm trying to get my initial_supply to be 100000, with 6 decimal places. But when I do the test the balance always returns 0. I don't understand what could be happening, could someone please ...
0
votes
0answers
6 views

Can use ERC20 Smart contract token for minting gas fees in own NFT market place

Can I use my own smart contract token as minting gas fees for own NFT market place. Binance USD use for minting its NFT marketplace Need to has own network?
1
vote
1answer
68 views

How to simulate buy?

im new in web3js and i got a problem. Would be nice, if you could help me. Ive been trying to solve it myself for days... Im trying to simulate a buy transaction (after its working i will do the sell ...
0
votes
0answers
11 views

How do I Approve a token after I revoke it? [closed]

I accidentally revoked a token and now I can't trade with this token and I can't approve this token
0
votes
1answer
21 views

My Token erc20 does not issue tokens

Here is my code: pragma solidity ^0.5.0; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { ...
0
votes
0answers
20 views

please help... How do I fix these issues

from solidity: DeclarationError: Non-abstract contracts cannot have internal constructors. Remove the "internal" keyword and make the contract abstract to fix this. --> .deps/npm/@...
0
votes
0answers
14 views

Is there a way to get a smart contract's ABI automatically using python?

I am scraping a smart contract trying to get the ipfs link for its tokens, but each of these tokens comes from different smart contracts. I have the tokenIDs and the specific smart contract addresses ...
0
votes
0answers
6 views

automatic token submission erc20 [duplicate]

Very good, I am creating an erc-20 token and I want that for each transfer that is made, send a minimum percentage of the tokens that is sent directly and automatically to a wallet. How can I do that? ...
0
votes
0answers
15 views

How to pause a pausable token once issued

very good, I have created a pausable token, with the intention of then pausing it once it is issued if I need it. But I don't know how to do it after that, can someone help me?
0
votes
0answers
11 views

Is Trolls Token safe?

Using my limited knowledge in crypto and Ethereum blockchain, I verified the locked liquidity and renounced ownership on etherscan.io for this token specifically. The project itself seems to be dead, ...
0
votes
1answer
20 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
1answer
20 views

What are the drawbacks of using a Testnet to deploy a smart contract when I am not worried about security or decentralisation?

I am looking to create a basic ERC 20 token and share it with some people at Christmas time to represent a share of ownership in a dog. I am not concerned about security as this is not going to be ...
0
votes
1answer
19 views

Need help implementing Burn Logic in an ERC-20 token

I am learning solidity and have decided to program my own ERC-20 token. I have inherited the ERC-20 Open Zeppelin standard, but would like to add some functionality that calculates 5% of every ...
0
votes
0answers
11 views

why am i getting an error here

I recently ran into an issue launching my token but I have no idea why its giving me an error. ive went through it numerous of times
0
votes
0answers
5 views

Why does unstaking ERC20 function not work?

I am building a staking contract that accepts an ERC20 token set by the owner. contract ECommerce { IERC20 token; .... token = IERC20(**"I insert the token address here"**); Here ...
0
votes
0answers
12 views

Returned error: VM Exception while processing transaction: revert

I am getting an error "Returned error: VM Exception while processing transaction: revert" when trying to send a transaction to a Crowdsale contract. This contract does not have any tokens ...
0
votes
1answer
21 views

total supply of a cryptocurrency - how is it selected?

On what basis is the final number of units of a given cryptocurrency selected? Is the fact that a given coin will have 280 million units in some way explainable, e.g. due to some mathematical ...
1
vote
0answers
13 views

Must DAOs be paid with native asset? What flexibility is there in this structure?

This is more of a 'meta' question than anything else. I was wondering if someone could create a DAO (crowdfund/ICO type contract), that redeems the tokens from the crowdsale in exchange for something ...
0
votes
0answers
22 views

Solidity - Transfer token from owner to another account

I have my token (myToken) deployed on bscscan. Now I am making a web application that will be based on blockchain technology. For that I have made a contract (ABC Contract) that contains all the ...
-1
votes
0answers
17 views

Contract is failing with Gas errors - Urgent help

my contract on BSC scan has started failing when transferring tokens. I understand this is a gas issue, how do i solve it and push the gas through? Or is there anyone who can help me with this? https:/...
0
votes
0answers
36 views

Changing fees in smart contract

I am quite beginner to solidity, trying to learn smart contracts. so here in this code: bool autoLiquifyEnabled = true; uint256 liquidityFee = 600; uint256 liquidityFeeAccumulator; uint256 buybackFee ...
0
votes
0answers
11 views

I devide total supply into 2 parts and want to transfer tokens from circular supply but transfer function not working fine

// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable....
0
votes
0answers
15 views

Contract Deployment Sends Tokens to Creator Address - Does not actually appear in creator wallet

I seem to be having an issue where on contract deployment, everything seems to go fine, however tokens that are created are not going into the creator wallet. Upon inspection the tokens are being ...
0
votes
0answers
33 views

How To Run A Successful Solidity Smart Contract Test Script?

I have been following this tutorial by Gregory from Dapp University on how to create your own ERC20 token along with a crowd-sale smart contract. I have been successful so far, but I am stuck where I ...
0
votes
2answers
57 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
0answers
11 views

BalanceOf set pending

i am new at the tokens worl, i know that erc20 have some standard parameters and methods, but my question is in a token/smart contract can i had a function that add a pedding Balance to the allowed ...
3
votes
2answers
64 views

How does WBTC on Ethereum work?

I'm trying to wrap my head around how WBTC works on the Ethereum blockchain. My understanding at the moment is that when BTC is sent to a particular BTC address, then a WBTC is generated on the ...
0
votes
0answers
19 views

Sent Ethereum to Atomic Wallet From Metamask BSC Mainnet

I had Ethereum in my Metamask BSC Mainnet from a previous mistake. I sent it to Atomic Wallet but it never got there. I found out that Atomic Wallet does not work with Binance. My Eth was sent to ...
0
votes
1answer
109 views

Get all tokens owned by an address under the same ERC1155 contract

I am making an ERC 1155 contract and it is a mixture of NFTs and FTs, my intention is that from a token id forward, the user only be able to own one of the token, something like the minting below: ...
0
votes
0answers
20 views

Retrieving the token number of a transaction

A address sends X amount of token to B address. As this transaction happens inside the interface function _transfer(address recipient, uint256 amount) I know that the amount variable holds the token ...
0
votes
1answer
64 views

Is it possible to use one verifiably random uint to uniformly generate a randomised distribution?

Assume I have a selection of token IDs, for instance: uint256[] public tokenIds = [1,2,3,4,5]; Now, incorporate a random number generated by Chainlink, let's say: uint256 public randomNumber = ...
0
votes
3answers
63 views

how to represent many NFT's of the same type in ERC1155?

let's take cryptokitties for example, if i were to create something similar in ERC721, i would create a smart contract named cryptokitties and a mint function that increases the token id each time a ...
0
votes
0answers
10 views

ERC20 Token tokens minted but not in a account

I have a function in my 'main contract' that wants to reward a user with a amount of ERC20 Tokens that works but if I look at the balanceOf and paste the address in it shows 0 or sometimes crashes and ...
0
votes
0answers
31 views

Found suspicious function in Coin Contract code

I'm new to creating cryptos and doing all the programming of it. Recently I came across a very suspicious token called BEAR that might be a Honeypot scam. Here's the function I don't understand and ...
0
votes
0answers
23 views

Hello im new to all this and in not sure how to figure things out

Yesterday I started the day with 16k in my saitama inu account, I was swamping saitama for ETH on uni swamp, I was swamping 7800 so it sent me back to my trust wallet to approve it so once i hit ...
0
votes
0answers
21 views

Pre sales (Public and Private) ERC20

I am developing a currency for my game, and I would like to know how pre-sales (public and private) works, what do I need to program in my smart contract? Is there an example model for this type of ...
0
votes
0answers
14 views

conversion of safemath to deduct fee on swapping

Source Code:https://github.com/laronlineworld/tokenSwaptoBUSD/blob/main/tokenswap.sol function calcSwapForUSDC(uint dai) public view returns (uint) { uint base = safeMul(baseMultiplier, ...
0
votes
0answers
43 views

how to code erc20token with minting function for specific amount for every specific interval of time..?

say i have "Total_Supply=2750000000tokens",we need to "mint=2150000000tokens" for every day up to 360 days, like to mint 2100tokens for every half'n hour(30 min) totally(...
0
votes
1answer
26 views

Burning tokens in smart contracts like uPUNK token

I'm a new in Ethereum and learning smart contracts. In the contract of uPUNK token I found an internal virtual function for burning tokens: /** * @dev Destroys `amount` tokens from `account`, ...
0
votes
0answers
33 views

Buy token when liquidity is added using Proxy Contract

I was checking that some tokens apply Bot prevention in the first minutes. In my case I am executing the contract.functions.swapExactETHForTokens function to execute a purchase but if bot prevention ...
0
votes
0answers
20 views

How to distribute the fee on token swapping?

source code:https://github.com/laronlineworld/tokenSwaptoBUSD/blob/main/tokenswap.sol I have a tokenswap that swap BUSD to erc 1363 token. The problem is, I want to deduct the 3% fee on busd when you ...

1
2 3 4 5
41