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

How to handle refer by register functionality in Dapp with Smart Contract?

I've just started to learn solidity programming..Firstly, I have a register page, in which the metamask opens up an popup and connect the user address to my dapp by registering the user on their ...
0
votes
1answer
33 views

How to register USER in my Smart Contract using Solidity?

I can't figure out how do we register user in smart contract and get the userdata when he/she tries to login after register through our website..I didn't see any article regarding this..Kindly ...
0
votes
2answers
26 views

How to verify the type/name of token received in a smart contract?

Here is a sample contract which is designed to take xyz token. How can the contract verify that the sent is the xyz token? pragma "^0.7.0" contract myContract { address public payable ...
0
votes
1answer
15 views

Get ERC20 balance of token holder as of block number with C# Nethereum and Infura

When this code runs, it throws an error "RpcResponseException: header not found", and I don't understand why or how to fix it. Any advice? Notes: I am using Nethereum in C#.net and using ...
0
votes
2answers
28 views

How to generate a transaction for ERC20 token?

I'm currently use this package to generate new transaction in ETH: https://github.com/kornrunner/php-ethereum-offline-raw-tx Now I want to generate a transaction for an ERC20 token like Tether. As I ...
0
votes
2answers
15 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
0answers
14 views

Revert error when sending ERC20 token on Ethereum mainnet fork

I am trying to send an ERC token (USDC) on the Ethereum Mainnet fork made with ganache-cli --fork. The transfer is made from the unlocked account that has both ETH and USDC balances available to the ...
0
votes
0answers
18 views

Can I have some feedback for my blockchain festival idea? Please [closed]

I came up with this idea for a blockchain style festival which runs on Ethereum. I know there are already blockchain festivals but I wanted to know what you think of my idea and if you have any tips ...
1
vote
2answers
16 views

Sending token with contract interaction in Remix

I'm aware of using the value field in Remix to include ETH with my function call transaction but is there a way to send another token with my transaction, for example, LINK? Additionally I would like ...
0
votes
0answers
28 views

How do I edit this contract to remove the fee payment and mint a new token?

So I have a contract, What I wanna do? Remove the payment fee; Replace variables to deploy my own token; Here is the original contract https://ropsten.etherscan.io/address/...
0
votes
0answers
22 views

Contract Logic guidance [closed]

I am a beginner in smart contract development. I need guidance, an overview type of how I can the following tasks be accomplished. I already know how to make an erc20 token. ERC20 standard Token ...
0
votes
0answers
23 views

where is the ico price of this contract? [closed]

these codes are the codes of a contract approved in etherscan. it contains tokens and ico contracts in one contract, and it is an actively used contract. When I ran the same contract in tesnet I did ...
0
votes
1answer
22 views

Contract Interaction and Batch Transaction with Web3

I've reviewed most all of the posts on this topic, but none of the answers are doing exactly what I need. I have an application that allows users to submit their tokens from their contract into my &...
1
vote
0answers
14 views

how to get list of transactions history about specific contract address using web3?

I really don't know how to get a list of transactions history about specific contract address using web3.py and I use Infura HTTPProvider I just have only one 'contract address'. Can i get information ...
0
votes
0answers
20 views

change from old to new contract address [closed]

How do I change a contract address to a token to the new one? Example: I'm trying to sent TRAT token to Mercatox and they told me you sent it from an old contract address.
0
votes
2answers
16 views

I need a smart wallet contract (for testing)

The testing specification for my current task requires Create 50 smart wallets that can hold M+ tokens. Thus I need a smart wallet contract. Please give me source of a simple smart wallet contract. It ...
0
votes
1answer
22 views

Contract example of staking ERC20 token and unstake return will be another token needed [closed]

I'm currently looking for an example of how to stake an ERC20 token but the return will be another ERC20 token. I already have an example of standard Stake and Unstake contract code, I want to edit ...
0
votes
1answer
17 views

Why does this code not work with Tron address?

function transfer(address to, uint256 value) public returns (bool) { require(value <= _balances[msg.sender]); require(to != address(0)); uint256 tokensToBurn = findPercent(value); ...
0
votes
0answers
28 views

Tron vs Ethereum differences?

I'm a new coder, just trying to experiment with things. I was looking at an Ethereum smart contract, and trying to see how it would work with Tron. It is a contract that has an address where for every ...
0
votes
0answers
33 views

Copy paste contract problem [closed]

I'm trying to understand Solidty and focused on internet tutorials. Meanwhile, I'm trying to write tokens to be practical. I wrote a few contracts, but when I ran a contract I came across things I ...
1
vote
1answer
40 views

Are there any wrapped ERC20 tokens that are privacy coins?

ERC20 tokens by itself are not private as anyone can see everyone's balance. But a wrapped token for a privacy coin like Monero or Zcash can be anonymous when converted from the wrapped version. Does ...
0
votes
1answer
16 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 ...
3
votes
1answer
33 views

How do I send multiple transactions as one transaction?

Say I need a user to approve a contract with an erc20 token balance and then the contract can execute it's function after. Typically, I would have to do an approve transaction with a nonce of 1 and ...
1
vote
1answer
37 views

Why can smart contracts receive ETH but not other ERC-20 tokens?

From what I've gathered (and I'm new to Ethereum), smart contracts can receive ETH payments and hold them through the receive/fallback blocks, but cannot directly hold ERC-20 tokens, but rather they ...
0
votes
1answer
19 views

Is it possible to work with stable coin currency in Ethereum smart contracts using solidity?

I know in solidity you can use identifiers like ether and wei. For example, I can do something like if (msg.value == 1 ether) { //do something } Is it possible for me to use stable coins as a type ...
0
votes
1answer
23 views

Revert error on delegated transfer function

Here is my code base, first I am deploying the tokenPS contract on the tesnet which generates an addr(0xaddr) and then I am deploying the caller contract. In caller contract when I am trying to ...
0
votes
1answer
22 views

A contract inherit from a token contract

I have a token contract(ERC20) A, then another contract B inherited from A (B is A). A contract C imported B. questions are: if I deployed B alone, is the address of this contract B represent the ...
0
votes
0answers
25 views

Calculate exchange rate

I am running am ethereum node and I'd like to calculate the exchange rate of any token into USD, without using any external API. How do i accomplish this?
0
votes
1answer
13 views

Linking Two Event emissions

If I have a (NFT) token that has a TransferSingle event emitted when the token is transferred, and I emit a second event that indicates it was a sale at a certain price--how do I link the sale to the ...
0
votes
0answers
28 views

How to get the Etheruem contract init code hash by using remix.ethereum.org?

How to get the Etheruem contract init code hash by using remix.ethereum.org ? It's a little fuzzy with bytecode and deployedBytecode, I use the contract code deploy on mainnet by others, I try to ...
0
votes
0answers
17 views

Etherium Token code won't run on Remix

so I'm very new to crypto and such but I thought it would be fun to make my own token. The code initially compiled on https:// remix, but I realized the following morning that I had to run the code on ...
0
votes
1answer
13 views

How to create an ICO token that can be tradeable

How to create an ICO token with low fees that can be tradeable on decentralized exchanges. E.g bob send 0.1ETH to the smart contract ,he receives the Eth for the ICO and can trade it, also the ...
0
votes
0answers
27 views

Can we compare bonding curve tokens to a ponzi scheme?

Bonding curve tokens are, unlike ICO, not driven by the market, but priced by a smart contract. They are based on the following two main properties : Limitless supply : Tokens are minted as the ...
0
votes
1answer
18 views

How to create an automatic smart payment ERC20 system

how can I create an automatic smart contract to send tokens ,if a user send ETH to the smart contract and also to bee able to recover ETH from the smart contract and tokens too thank you. To explain ...
0
votes
1answer
27 views

How to add USDT ERC20 Token to private blockchain

I am running a private ethereum blockchain on my machine using geth. I want to send USDT token from one address to another, but I could not because neither address have any USDT token. I have tried ...
0
votes
1answer
26 views

Prevent Transfer of ERC20 token to contract address?

I want my ERC20 contract to be transferred to EOA addresses only and some specific contract address only. I don't want to lose my tokens by mistakenly transferring to a contract address that cannot ...
0
votes
1answer
28 views

Cannot figure out how to set constructors and ABI for a contract

So I've been breaking my head over this for the last 2 days. I cannot seem to figure out how to get the constructors and ABI set up properly. I'm testing smart contracts by copying Sushi contract from ...
1
vote
1answer
107 views

How to calculate the number of tokens owned by the liquidity pool via bonding curve on Uniswap?

I know a little bit about the Uniswap, providing liquidity, bonding curves... But I'm still struggling to perform the actual math - what is the actual formula? Real-life example (easier to operate on ...
0
votes
1answer
41 views

What is the best way to implement a dividend paying contract? [closed]

Every block x amount of ether is put into the smart contract - Where x is variable. And a user with a token balance of y is entitled to y / total token supply of the total dividends in the smart ...
0
votes
1answer
13 views

How to calculate the right amount of a token to use in 0x quote endpoint

I'm trying to use 0x to buy tokens with ETH. I'm following the sample at https://0x.org/docs/guides/swap-tokens-with-0x-api#swap-eth-for-1-dai. I got the token address, and the decimals. let's say ...
1
vote
1answer
26 views

how to use eth_estimateGas for erc20 tokens?

i wanna calculate estimate gas for BNB, PAX, LINK i have used geth 1.8 and web3.php my contract data that used (i found them from etherscan): <?php /** * @var array */ public ...
0
votes
1answer
12 views

sent 500 lend tokens to my ETH crypto wallet in error

Hi there I hope you can help. I have mistakenly sent 500 Aave (Lend) tokens to my ETH wallet address on crypto.com. Please can you advise what I can do to get back into my orginal wallet? Below is the ...
0
votes
0answers
46 views

Gas estimation fail

I am using remix and ganache and metamask and I encounter a confusing error. I compiled and deployed USDT at 0xdac17f958d2ee523a2206206994597c13d831ec7 on ganache with no problem. In order to do ...
0
votes
1answer
25 views

I accidentally sent a BPT token to a token contract. Can I get it back?

Instead of transferring my BPT token to my wallet, I accidentally sent it to the contract itself. I sent 99,546.988023218400325838 BPT to the address 0x471eb7dcf6647abaf838a5aad94940ce6932198c The ...
2
votes
1answer
111 views

i am new to this, can someone steal my erc20 token with the Function approve()

I have been using yield Farming (YFValue) and I noticed when I accept the contract via MetaMask. I set faming 500 USDT but in the contract the input was: Function: approve(address _spender, uint256 ...
0
votes
0answers
25 views

Why is the ERC721 metadata limited to images?

Why is the ERC721 metadata JSON Schema limited to images? If I specify a file other than the image, does it cause an error when issuing the token? If it can be issued, what will be sacrificed? (e.g., ...
0
votes
0answers
13 views

An ERC-1151 with two kinds of tokens, how to number them?

I have a potentially infinite set of each of the two kinds of tokens: seller tokens corresponding to Ethereum addresses; merchandise tokens corresponding to small uint256 values (item IDs). What is ...
0
votes
1answer
14 views

Token Restrictions Helping me Understand Blockchain Logic

To execute the transfer or transferFrom ERC-20 token functions in a Solidity contract, ie: // moves token from contract to personal address ERC20Token.transfer(msg.sender, tokenamount); // ...
0
votes
1answer
48 views

Attempting to transfer erc20 token, but keep encountering insufficient funds for gas * price + value

I'm attempting to transfer an erc20 token, but keep running into insufficiant funds for gas * price + value, regardles of how much eth I have, I also have an estimate function which returns a value ...
0
votes
0answers
6 views

How to show token balance from a ETH address in my Android App?

I have an Android App and I want to show the balance of an especific token of the user wallet Address IE: show how many CHAINLINK are holding the user on his wallet Thanks in advance

1
2 3 4 5
30