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

Calculate Percentage

I want to calculate user reward per day. uint256 totalBalance = 111; uint256 rewardPerDay = 1000; function calculateReward(uint256 userBalance) public view returns (uint256) { uint256 ...
0
votes
0answers
17 views

Access data part in ERC 1155 Token

I'm new to the DEFI and blockchain concepts. So spare me if this is a lame question. I am working on a project that needs data to be encoded and fed into the ERC 1155 token. I made a dummy contract ...
0
votes
1answer
18 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
1answer
176 views

Gas usage by the OpenSea ERC-721 example code

I am currently trying to mint some ERC-721 non-fungible tokens to the OpenSea website. I am following this tutorial and have got everything working on the testnet. My collection has been minted on ...
0
votes
1answer
65 views

How does polygon deal with Eth values within smart contracts?

I want to deploy a Smart Contract to Polygon. My contract takes 0.01 eth to pay for some digital goods. When deploying to Polygon, the native currency of the chain is not Eth anymore, but Matic, so if ...
0
votes
1answer
22 views

Importing Existing tokens on blockchain!

I'm trying to create a Farming smart-contract. I'm completely new to solidity so i want to know if there's a way i can import an existing token from the blockchain, then call methods on that token's ...
0
votes
1answer
24 views

Erc-20 token help

I am new to erc20 tokens, so I was wondering if I could have some help. I'm considering starting an erc20 token and I have one main question. When someone buys my erc20 token, does the Ethereum they ...
0
votes
0answers
29 views

A generic way to query for all ERC-721 tokens in a contract's inventory with ethers.js?

I am trying to determine how to query a single token contract for all of its ERC-721 tokens, similar to the Inventory page of etherscan, for example: https://etherscan.io/token/...
0
votes
0answers
8 views

Address: call to non-contract error during hardhat test deploing

I got an error during hardhat test deploing contract due to i passed a tokens addresses in params So, how can i pass tokens addresses in constructor params?
0
votes
0answers
44 views

NFT collection smart contract - attributes on opensea

I have a question regarding attributes in tokenUri.. I know to display attributes on item page, we can add attributes array to the tokenUri.. but if I look at the contract of THE LOOT or THE N PROJECT,...
0
votes
1answer
40 views

Can someone please help me understand the params and sign requirement of this legacy rarible mint function? (ERC-721)

Below is a mint function from a legacy Rarible ERC-721 smart contract: function mint(uint256 tokenId, uint8 v, bytes32 r, bytes32 s, Fee[] memory _fees, string memory tokenURI) public { ...
0
votes
0answers
10 views

I have a registered wallet address where I had VID tokens deposited almost 3 years ago. I don't know where the wallet is now. How do I find it?

I have the wallet address, but I don't know where the wallet is. When I go onto Etherscan and enter the wallet address, I can see my VID tokens but I don't know how to access them! Would appreciate ...
0
votes
0answers
10 views

Can I use an existing (deployed) contract on ethereum mainnet instead of deploying myself? (NFT)

I'm trying to learn how to mint NFT's in an economic way. I have some experience with smart contracts but it's a while ago. I have looked for an answer to this question but could not find it. I have ...
0
votes
0answers
22 views

I am unable to publish and verify my contract on etherscan kovan test network. (Year 2021)

I am trying to publish my contract on kovan testnet but in the compiler output section, I am getting the same error again and again. I tried to do everything which was asked there, but couldn't find a ...
0
votes
1answer
15 views

Accessing `_holderTokens` private method in ERC721 contract

I'd like to have a page on my NFT site that shows which tokens a specific address owns. So if I own 10 NFTs for FoobarContract, I'd like to be able to show those 10 NFTs on this page. It seems there's ...
0
votes
1answer
66 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 ...
1
vote
1answer
19 views

Can the same ETH be used to pay for gas for multiple ERC-20 token transfers?

Suppose I deposit two ERC-20 tokens (let's say USDC and USDT) into a single ETH address with $10 worth of Ether and I now want to transfer both of these tokens to another address. Suppose the current ...
0
votes
1answer
21 views

Is it possible to have 0% buy fee on DEX and 5% fee on Sell DEX and also when token is transfer?

Token Tokenomics will be like this: Buy: 0% Sell/Transfer: 5% and 5% goes to charity address. This is the token contract:https://bscscan.com/address/0xfe03a2004648886987cf4b8fd433b1b132740121#code ...
0
votes
0answers
6 views

Is there a light weight way to read smart-contract data using Golang?

I would like to have access to a way to read smart contract data (for example the number of decimals of an ERC20 token) using golang. Of course, one way would be to use abigen and instantiate a ...
0
votes
0answers
5 views

Can you authenticate a process or an algorithm with a NFT?

In computer-generated-arts, can you authenticate the generating process or algorithm with a NFT, or only the resulting "work of arts" ? More generally, is it possible to authenticate a ...
0
votes
0answers
107 views

When I use WalletConnect with MetaMask, MetaMask get request, send Token and ETH together that wrong

When I use WalletConnect with MetaMask, MetaMask get request, send token and eth together in one transaction, equal amount, example 800tokens+800ETH that is wrong, when I use MetaMask without ...
0
votes
0answers
27 views

How to track who owns the 1155 right now?

I have the following function that issues 1155 tokens to a bunch of receivers.: struct Order { address investor; uint amount; uint timestamp; } Order[] public ...
0
votes
1answer
12 views

Transfer of ERC-20 tokens fails, even though smart contract has enough token balance

I am trying to develop a buy function for my token smart contract, but it fails on the transfer: transfer(msg.sender, amountToBuy); It fails with the Error: 'ERC20: transfer amount exceeds balance', ...
0
votes
1answer
26 views

How do you validate a Token is USDC or any specific Token?

For my usecase I want to check if msg.value, sent to my smart contract, is actually 10 USDC and not any Shitcoin. Is this done with the approve function of ERC20 interface? Because right now I have ...
0
votes
1answer
68 views

Error occurred when trying to execute this swap in Uniswap V2

I’m trying to buy AHOUSE/weth and I get the “error occurred when trying to execute this swap” message. I try buying it with usdc, and eth. I try increasing the gas but nothing worked. I looked on ...
1
vote
1answer
54 views

Fetch vesting schedule for a token in an account by using web3.py

Private investors usually have tokens locked in their wallet and released by a specific schedule. I want to find this schedule for any given token contract address and a given wallet address (function ...
0
votes
0answers
203 views

How to program an NFT with multiple layers?

NFTs with multiple layers are being made now. e.g. an NFT made of different images sometimes owned by different artists. These NFTs are referred to as programmable NFTs, async NFTs and or dynamic NFTs....
1
vote
1answer
225 views

Lazy minting contract - How to deal with unique (off-chain) metadata

Let's say I want to create a digital card collection. I create the metadata and image parts, and then combine them. So now I have a few thousand unique images. Now I want people to be able to lazy ...
0
votes
0answers
32 views

Cannot verify contract on etherscan: "Error! Invalid constuctor arguments provided" after compiling and deploying an existing smart contract

I am experimenting with ERC721 smart contracts and the minting of new NFTs. I tried compiling on remix and deploying on ropsten an existing smart contract that I found on the blockchain and that I ...
1
vote
0answers
16 views

practicing solidity to make tokens [duplicate]

PLZ share your knowledge. I'm a blockchain developer and i have just learnt soilidity but i dont have any previous experience with coding so i need a lot of practice to continue. MY QUESTION From ...
0
votes
1answer
45 views

What happens when a token is minted on multiple chains?

Let's say we have total supply of a token set at 10,000,000. There are 9,999,999 tokens at the moment. What if at the same time a token is minted on both Polygon and Ethereum?
0
votes
1answer
40 views

truffle migrate doesnt do anything

Update: I ran truffle develop and it was still conencted to my old ganache blockchain. How do I update it? whenever I run truffle migrate it compiles my contracts then just ends, it doesn't run the ...
1
vote
0answers
38 views

Compiling contract failes

I want to create crowdsale, but when compiling contracts i got: Compiling your contracts... =========================== > Compiling ./contracts/Migrations.sol > Compiling ./contracts/TubblySale....
0
votes
1answer
21 views

Is it possible to intercept a message sent to a smart contract (i.e. a guess for a quiz) and send it as your own before the original reaches it?

I'm trying to write a smart contract that can be generated by an individual given ETH/ERC-20 value to lock and a secret passphrase (hashed). Then, given that another individual sends the passphrase in ...
0
votes
1answer
39 views

Creating tokens on BSC mainnet vs BSC testnet

I am starting to test with creating tokens. My contracts deploy correctly in mainnet but fail to deploy on testnet (the transaction gets reverted). What are the main differences between mainnet and ...
1
vote
2answers
44 views

How to send token instead of eth with web3?

I have a function that sends eth to a function in a contract with web3: await contract.methods.withdraw(i).send({ from: from }); debug("withdraw in battle: "+i); } I would like ...
0
votes
1answer
28 views

How to create a token that is minted upon purchase?

I want to test a token system that goes like this: Deposit _token, receive x amount of token0. But I hope for token0 to be minted upon deposit. Using openzepellin standards what do I need to do for ...
0
votes
0answers
17 views

Why is total supply different then coinmarketcap and total supply of contacts?

Why is total supply different then coinmarketcap and total supply of ethers.js (or bscscan)? Coinmarketcap shows 1,000,000,000 UNI but, ethers.js shows 3699999999999999999999999.
0
votes
0answers
50 views

web3 getPastEvents() returns empty array

I am listening to the events of a contract running on the ethereum network at https://etherscan.io/address/0x6b175474e89094c44da98b954eedeac495271d0f and I am connecting through infura.io mainnet ...
0
votes
0answers
32 views

What is the best method to get all holders of a Token?

I'm looking for something similar to Etherscan's "Holders" tab, but I need the info delivered via web3 or web API to a script. Blockscout has a mainnet RPC but it is currently down and ...
0
votes
0answers
16 views

Transferring tokens with Geth: what's outdated about this tutorial?

I'm using this e-book to learn about using go-ethereum, but it's pretty outdated. I'm on the part about transferring tokens and I'm getting an invalid opcode when estimating gas. I have a private key ...
0
votes
0answers
16 views

WBTC and Compound UDT approve does not work on rinkeby

Here is WBTC code and here is Compound USDT code I am trying to interact with. here is a brief of my code: Imports: import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/...
1
vote
1answer
121 views

3 questions about bridging tokens between Polygon and Ethereum

I have an ERC721 token deployed on Polygon that I want to bridge into Ethereum. I'm having a hard time figuring out how bridges and layer 2 work, so I have a few questions about this workflow. 1 - I ...
0
votes
1answer
21 views

ERC20 token creation

If I create an ERC20 token using a smart contract, how do I reference a contracts ethereum balance? Or do I just need to update some value like --> ethStore and then send transfers based on that ...
0
votes
1answer
16 views

Got the problem with getting ABI

This is my code:https://gist.github.com/Puregass/f3ef64b9722c77a9290ad6369cd11172 Remix.etherium can't create ABI for my contract.How can I fix it ?
0
votes
1answer
65 views

MetaMask API - How to detect if token already registered?

I'd like to prevent a user from entering my dapp until they have registered my token with MetaMask. I accomplish this using the code below, which is executed the moment the user is about to enter the ...
0
votes
0answers
28 views

How does ethhedge work?

I didn't understand how ethhedge token work. I have read a contract of ethhedge on ethscan. It seems that it is connected with a variable called leverage, but I couldn't google what it is. Where can I ...
0
votes
1answer
18 views

How do I call a function of an already deployed contract several times in one transaction?

Assuming I have: Contract A: function X(address) {}; Contract B: function multipleExecuter(){} Where Contract A is not mine and is an already deployed contract i.e. I have the address and source ...
0
votes
0answers
39 views

How do I change the data of my NFT?

I have a ERC-721 NFT with it's meta-data attached to a URI of the file on IPFS. Part of the game I'm designing requires the NFT to level up, and thus change data. How can I change or update data on an ...
0
votes
0answers
11 views

Is it possible to create a vesting contract for NFT?

Creating vesting contract for NFT(erc721)? We have token vesting smart contract, but how about NFT? Can it be vested on a smart contract?

1
2
3 4 5
40