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
1answer
18 views

Is there a smart contract that rewards someone who has held a token for a certain amount of time with additional tokens?

Basically if someone holds a token for a given time "x" amount then they are rewarded extra tokens? Is there a smart contract that can do this or is it even possible? Thank you.
0
votes
0answers
241 views

tx.wait() never resolves using ethers library

I am using ethers library in my nodejs , and trying to call a function in smartcontract which looks like: const tx = await router.swapETHForExactTokens( amountOut, [bnb,...
0
votes
1answer
606 views

How can I get the token symbol from the token contract address using Node.js?

PLEASE DO NOT HELP ME BY SUGGESTING PYTHON CODE. I'M ONLY INTERESTED IN SOLUTIONS THAT RELY EXCLUSIVELY ON NODE.JS. I am trying to build out a sniping bot in Node.js using a snippet from EatTheBlocks ...
0
votes
1answer
41 views

Can I see who holds my token in solidity

I'm learning to code in solidity and have started learning through making an ERC-20 token. I want to be able to see who is holding the tokens without using a for loop. So far I've mapped each address ...
0
votes
1answer
67 views

ERC20 token conversion to ETH or USDC

How can we convert ( via smart contract coding ) any erc20 token like BAT back to ETH or USDC ? I am very new to smart contract programming and I want to write the smart contract for the conversion. ...
0
votes
0answers
43 views

How to get the balance of tokens inside my MetaMask wallet?

I am trying to get the balance of the Alpacas I have in my MetaMask wallet. Googling around I found different ways but many didn't work. So this is the most recent code I found but it is returning ...
0
votes
1answer
90 views

Failing to fill 0x quote

I'm trying to fill a quote that I get from the 0x API: const qs = createQueryString({ sellToken: 'TUSD', buyToken: 'WETH', sellAmount: BigInt(882693 * 10 ** 18) }); ..but the transaction ...
0
votes
0answers
68 views

"Undefined" when trying to use async/await/promise

I'm currently trying to put in the function: truffle console truffle (development) > const token = await Token.deployed() And the result is coming up as undefined. I've started over my DAPP project ...
0
votes
1answer
2k views

Web3 Python token sell pancakeswap

I am trying to sell my tokens via python web3. But sometimes I get an error "execution reverted: Pancake: K". I researched this error and it has to do with the slippage but pancake swap docs ...
0
votes
1answer
49 views

Is it possible to add withdraw tokens/transfer from vesting contract?

This is the contract:https://github.com/laronlineworld/vestingcontract/blob/main/VestingContract.sol Is it possible to add withdraw/transfer token from vesting contract? And the access is for owner ...
0
votes
0answers
17 views

Calling Functions of a child contract using an owner contract

I had deployed a smart contract (contract #1) that uses another smart contract (#2) for some transaction logic. Contract #2 was imported in the first contract itself and deployed with the help of ...
0
votes
0answers
102 views

ETH Mainnet deployment: Transaction was not mined within 750 seconds

"Migrations" -- Transaction was not mined within 750 seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!. Error: /root/.nvm/versions/node/v14....
0
votes
1answer
99 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?
1
vote
0answers
62 views

What's the most efficient way to batch mint NFTs?

It seems inefficient to batch mint from the client side (eg. web3). Apparently Cargo does batch minting but I couldn't find their code. My default approach would be a Solidity function that loops ...
0
votes
0answers
23 views

Error encoding arguments: Error: types/values length mismatch (count={"types":2,"values":5}

struct 721Data { uint tokenId; string tokenURI; LibPart.Part[] creators; LibPart.Part[] royalties; bytes[] signatures; } struct Part { address ...
1
vote
1answer
21 views

How an asset is tokenized?

Suppose I have a car and I want to tokenized it. Now I have following questions. What will be the process to make a digital token of my car. If someone buy this token, Will I have to transfer token ...
0
votes
1answer
48 views

Provide liquidity to Uniswap without initial funds on one side?

Is there a way to provide liquidity to Uniswap-like contracts without initial funds on one side of the trade? For example, if I create my own token called Token, I believe this token should be worth ...
0
votes
1answer
380 views

Is there a way to lower BEP20 smart contract function gas fee costs?

A BEP20 smart contract needs to have a function called periodically (At least once a day) to process some data. The gas fee required to do so is quite high (>0.1 BNB every call). What are some ways ...
0
votes
0answers
14 views

Function doesn't run after receiving custom token

I have an issue with my smart contract when it receives a custom token: uint256 private privatePrice = 20; uint256 public totalCollected; uint256 public previousCollected = 0; uint256 public ...
0
votes
0answers
13 views

Understanding floorcalculator and ERC31337 from rootkit finance

I'm trying to understand ERC31337 from rootkit finance and got introduced to floorCalculator code as follows: function calculateSubFloor(IERC20 wrappedToken, IERC20 backingToken) public override view ...
0
votes
0answers
23 views

Claim Airdrop doesn't add another claim reward value to existing value, the value will change but will add to existing reward

Source code link: https://github.com/BIMPFinance/ClaimAirdrop/blob/main/claimPrize.sol This contract send token to address/addresses, and the user will redeem the airdrop token of this contract ...
0
votes
0answers
15 views

Help needed-Lost Dai token sent from Matic network to nexo.io wallet [duplicate]

Any support on my issues is appreciated, suggestions or solutions out there for my issue. I have sent Dai token money to Nexo.io but from the Matic-mainnet. My funds are currently received on wallet ...
1
vote
0answers
109 views

Transferring NFT Tokens without the ownership of the tokens but approving the contract address as operator

https://github.com/ProjectOpenSea/opensea-creatures/blob/master/contracts/ERC721Tradable.sol Someone please explain me the function at line 91
2
votes
0answers
203 views

How can I stop bots from using my smart contract?

My use case involves a contract with a fixed prize pool, users interact with the contract by making a payment and receiving a reward, I made it so in the long term the reward is greater than the cost, ...
0
votes
1answer
400 views

How to deal with liquidity for a BEP-20 token?

I've released a few BEP-20 tokens so far and some of them have been quite successful at launch but then suffer from lack of perpetual marketing, my team and I are dealing with this challenge. However, ...
0
votes
0answers
24 views

Can a token on uniswap control its price within the smart contract?

Is it possible to have a token smart contract on Uniswap where the price of the token can be influenced or set by the smart contract itself, rather than the free market on uniswap? E.g. suppose the ...
1
vote
1answer
29 views

What does this parameter mean in this curve fi function?

I am trying to add 22 dai to a polygon curve pool. Here is the function I am using: If I am trying to add 22 dai into the pool, what do I put for the parameters? Thanks!
5
votes
2answers
1k views

Is burning tokens effective without buy-back?

What's the deal with this "burn on deployment"? almost every deflationary token is bragging about the number of tokens they've burned before providing liquidity and isn't this useless? For ...
0
votes
2answers
203 views

How to set token transaction limit?

If I create a token on Cointool.app, is there any way I can add a limit on the number of tokens bought in any transaction? Or does it depend on the amount that's in the liquidity? e.g. If I want to ...
1
vote
0answers
175 views

Token w/ liquidty fees - create LP pair before send tokens to pancakeswap or to burn?

If I create a token (through cointool.app) that has liquidity fees, and I want to burn some of the supply after creating it, and I need to send the rest to pancakeswap for trading - do I need to ...
0
votes
0answers
21 views

Vyper uint256 division with decimal precision

I am aware of this question here and the answer is correct however I am struggling to understand how to actually divide uint256 values with an arbitrary decimal precision Here is the function I am ...
0
votes
0answers
98 views

What is UniSwap 488d router?

I noticed a 488d uni swap router in many meme coins. I want to know what it does and is it good for a coin or NOT? What is the main purpose of this router? Usually, when I see it, it will be selling ...
0
votes
1answer
27 views

How does CAKE get burnt since all the burn functions are internal in the source code

I am trying to study CAKE of Pancakeswap source code. I don't seem to grasp how does the owner or users burn the tokens(CAKE) since all burn functions in the source code are internal functions. on of ...
0
votes
1answer
59 views

How would I go about making an array of all the addresses that hold at least x amount of tokens

I'm trying to make a list of holders of a specific token in solidity, thing is, I can't iterate over a mapping because that's not even a thing in sol. That only works for arrays and even then there's ...
0
votes
1answer
25 views

How the exchange calls my Smart Contract methods?

I'm new to the smart contract world and there are many things that I still don't get how works. I've created a simple contract with the following methods: constructor() { tokenCreator = msg.sender;...
0
votes
0answers
155 views

How to get the value from the response to an allowance call

I'm still learning, so apologies if this is a very dumb question. . . I am calling a smart contract to retrieve an allowance value, but I'm not sure how to get to the integer value in the response. My ...
0
votes
2answers
26 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; ...
2
votes
0answers
71 views

anyone understands how safemoon works? [duplicate]

I'm focusing on SafeMoon smart contract for my educational purposes and I have some questions about it: 1- What is rSupply/tSupply ?? I don't get it at all! what number can it create!? and why they ...
1
vote
1answer
69 views

What are these contracts buying and selling tokens for profit within seconds?

I have invested in many tokens but one thing I've noticed is that there is usually an address that buys some tokens and sells almost immediately for some profit or sometimes for a very minor loss. ...
0
votes
1answer
321 views

Create and deploy NFT collectibles ERC721 collection with smart contract

I want to start developing with Solidity in my Visual Studio Code my first ERC721 Collectible NFT collection so i installed Visuall Studio Code first, then nodejs and npm and in the end Truffles and ...
1
vote
0answers
52 views

Is there an EIP or ERC for a DAO implementation contract?

Does there exist a standard for a DAO interface?
0
votes
0answers
237 views

BEP20 transferFrom function is not working

I have a BEP20 token created and trying to use it from web front-end. Basically I want to sell my tokens in return of user's BNB tokens. I have a button on my front-end to click, and when user clicks ...
0
votes
0answers
16 views

Creating Ethereum token collectibles

There are a few concepts relating to Ethereum collectibles that are a bit confusing. OpenSea allows users to create collections where they can upload artwork and give them characteristics like “green ...
0
votes
0answers
24 views

tokens do not appear in wallet after contract creation

I'm doing the tests for creating a token. After compiling everything without any error, deploying and confirming it on the testnet network, the tokens do not appear in the wallet, and in testnet.bsc, ...
0
votes
1answer
482 views

How can I acquire some ERC20 tokens to test AAVE on mumbai testnet?

I need to acquire some DAI or other assets which are supported by AAVE on Mumbai testnet to test my smart contract, but it seems that the AAVE faucet on their site is broken and does not work! (I ...
0
votes
0answers
84 views

Why i cant swap my own token on pancakeswap…it says k error

my tokes has 10% tax on transaction. i have add the liquidity but no one can buy my token & i also cant pull out the liquidity. i have tried to increase slippage percentages and also try to ...
0
votes
1answer
35 views

Implement CW20 token in ethereum

What I found about CW20 token is loosely based on ERC20 token. Can I implement CW20 token in Ethereum platform using solidity?
0
votes
1answer
122 views

can an NFT have supply more than one

In ERC-1155 example implementation there is parameter to pass supply, so what if we pass supply more than 1, like 100 copies of an NFT, with same id, same metadata. Does this violate definition of NFT?...
0
votes
2answers
264 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?
1
vote
0answers
73 views

ERC721 token sended to previous metamask selection

First, I want you guys know I'm a newbie with SC, I follow this tutorial https://www.youtube.com/watch?v=YPbgjPPC1d0 I have this strange bug where tokens are sended to my previous selection inside ...

1
3 4
5
6 7
41