Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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

Super simple token with Open Zeppelin

I want to create a super simple token for my community. I read some tutorials and I found this code: pragma solidity ^0.5.2; import "./lib/oz/contracts/token/ERC20/ERC20Pausable.sol"; import "./lib/...
2
votes
2answers
19 views

How to generate a new token for ERC1155?

Developing an ERC1155 contract, how to generate an address for a new token? I need to create an API function like function createToken() returns (address). How? Should I just use an incrementing-by-...
0
votes
1answer
15 views

Smart Contract Transfer Event Log Data & transfer _value [Rust]

I'd like to have a better understanding of events and logs data, more specifically when it comes to interacting with ERC20 tokens smart contracts and their Transfer events. I'm looking for a way to ...
0
votes
1answer
17 views

How can I find the block where a user enacted a certain event on a contract?

I'm trying to build a web3.py program to take in a given user's address, and return the amount of ETH traded since they added liquidity to a Uniswap exchange. Uniswap is a smart contract on the ...
0
votes
2answers
414 views

How to destroy a token or list of token from a another contract?

[Edit 14-03-2018] I want to create a contract A that can generate a random number of Token A and another contract B that receive and destroy one or many of this token to generate a new Token B. It's ...
0
votes
1answer
113 views

Cross chain call contract on ethereum from private network

Im looking for a way to call a contract that is deployed on the ethereum main network using Go (or JS/anything). From what i can see the foolproof way is to do so over json RPC but i would love to ...
2
votes
1answer
127 views

Ether balance on Metamask doesn't change after selling tokens

I create a smart contract successfully using Remix IDE , Metamask and Ropsten for testing. I want to sell some tokens using Sell function, so I specified the value "20" for Sell function ,my initial ...
2
votes
1answer
17 views

If external function declarations are saving gas, why aren't we using it for the transfer functions?

All the source code I could find (to date) has declared transfer, transferFrom, approve, approveAndCall as public and not external. Although external can be used, what is the reason behind not using ...
0
votes
1answer
144 views

How can I redeploy my ico/erc20 token from Rinkeby to the main Ethereum network?

If you know and have a tutorial please attach the link in this thread. My token on Rinkeby looks like this: https://dappuniversity.github.io/dapp_token/
0
votes
1answer
19 views

How can I use Ethereum smart contracts with another crypto currency?

I am learning/playing around with some concepts of the blockchain, smart contracts and Ethereum. I have created my own "toy" cryptocurency ("myCoin") by forking a coin using the CryptoNote algo. I ...
1
vote
3answers
215 views

understanding value on token transfer transaction

When a token transfer transaction has an ether price associated with it, is it fair to assume that that transaction used ether to buy the tokens? For example, this transacion triggered by account A ...
0
votes
2answers
613 views

How to get list of Ethereum addresses for Airdrop?

I want to do Airdrop for my tokens and plan to distribute my tokens to 50,000 random Ethereum addresses. How do I get the 50k Ethereum addresses. How do the very well known Tokens airdrops manage to ...
1
vote
0answers
8 views

Offchain voting

Are there any voting based approaches where voting would happen off chain, via signed messages, but then the result could be indepedently verified or even stored on chain? Voting rights are based on ...
0
votes
1answer
167 views

How to send ERC20 to 0x0000000000000000000000000000000000000000

How to send ERC20 to 0x0000000000000000000000000000000000000000 I have tried to do this on myetherwallet and it will not send as a transaction, is there a special way to send here? Thanks
0
votes
2answers
152 views

Cryptocurrency Tutorial: how to transfer on the geth console?

I build, compiled and deployed (to Testrpc) the token contract from the cryptocurrency tutorial. The token offers the transfer(addres _to, uint256 value) method, which I would like to call from ...
0
votes
1answer
96 views

unsold token in a crowdsale ethereum

I'm new in the solidity coding. I'm trying to retrieve the unsold tokens from a crowdsale contract. I add the command tokenReward.transfer(beneficiary, amountRaised); pragma solidity ^0.4.20; ...
1
vote
3answers
399 views

How to transfer token to an address?

Im using truffle and openzeppelin for issuing my ERC20 token. I already can add and buying the token, but still cannot transfer the token to another. when i console.log the contract, it show me: and ...
0
votes
2answers
18 views

Can an Ethereum token be bound or pegged to the value of the gold? [closed]

Could a token be built in ethereum that its price would be bound or pegged to lets say .00006 times the price of an once of gold?
0
votes
1answer
114 views

Problem in Mist :“It seems this transaction will fail. If you submit it, it may consume all the gas you provide”

I have tried creating contracts in Mist. I already made one contract six months ago and everything was fine. Now this error pops up : "It seems this transaction will fail. If you submit it, it may ...
0
votes
1answer
12 views

Tokens are not being transferred with web3js

i have been using following code for transferring tokens from wallet to another with the use of web3js. async Transfer(eth_address, amount){ let tokenAddress = "...
1
vote
1answer
107 views

Solidity IDE Parser Error on Token Name

Getting this in Solidity: browser/ballot.sol:121:16: Parser Error: Expected Primary Expression. Here is my code, says that it is the name line with the parser error function ERC20Token( ) { ...
1
vote
1answer
140 views

Documentation For Token Smart Contracts with JSON RPC

This is the documentation for the Ethereum Json RPC: https://github.com/ethereum/wiki/wiki/JSON-RPC Pretty straight forward, but where is the documentation for dealing with tokens via this protocol? ...
0
votes
2answers
23 views

How can I add mint and burn function to my erc20 contract code? [closed]

How can I add mint and burn function to my erc20 contract code? This code is working properly but I couldn't add mint and burn function that work. Is there anyone who will help me about fixing this ...
0
votes
2answers
122 views

How do I make sure that no one else deploy crowdsale on my token except me?

I have ERC20 fixed amount token, And I want to deploy pre-ICO crowdsale and later ICO crowdsale contracts. How do I make sure that no one else deploy crowdsale on my token except me?
2
votes
1answer
258 views

If a function calls another contract function that throws, will the initial function throw as well?

If I call a function in another contract that doesn't return a boolean, but has throw() invariant checks, is it safe to assume the function finished properly if the transaction isn't reverted? I ask ...
0
votes
1answer
24 views

Can we send tokens with data input? [duplicate]

Can we send tokens with data input? I did a bit of research on erc20 but maybe this is quite complicated. Will erc 721 do this?
6
votes
1answer
359 views

creation ERC721 error: Transaction failed, invalid address,

I would like to learn how ERC721 token works. I found some sample contracts online and tried to use remix and Ethereum Wallet to deploy the contract. The compile was fine but failed in the creation. ...
9
votes
1answer
79 views

What will happen to legacy smart contracts when Ethereum 2.0 is released?

Most importantly, ERC20 and ERC721 tokens. Will they be migrated to the new chain? Will migration only be optionally possible for contracts with an owner? What about contracts which rely on proof of ...
0
votes
2answers
152 views

Create Tokens Pegged to Ether

I would like to create tokens where its price is pegged to the price of Ethereum (i.e. Ether price goes up, my token price goes up). Regardless of number tokens been sold or changed hands.Is it ...
3
votes
1answer
331 views

A list of token holders at a specific time

What's the best way to get the list of token(ERC20) holders with their balance at a specific time? Thank you.
0
votes
2answers
391 views

Help on transferFrom and Approve functions

We have a token contract A and an Escrow contract B. While transferring token from an address to contract B we are using transferFrom function which overridden from contract A. But in need to do the ...
2
votes
0answers
36 views

Combine two addresses into one

I want Solidity code to define a function f that would map two Ethereum addresses A, B into a new address X = f(A,B) such that there is nearly zero probability that X is an already taken address (an ...
1
vote
2answers
41 views

Advantages of using Tokens?

Why should I use a (ERC 20) Token instead of just using Ether? What advatages does it have, besides making money out of nothing?
14
votes
2answers
3k views

How can ERC20 token implementations be verified?

The ERC20 Token Standard is great, in that it allows wallets, exchanges, and client implementations to allow users to interface with a variety of tokens in a common way. But how can one of these ...
2
votes
2answers
369 views

ERC-20 contract from another contract

I am trying to create contract which can access functions of any ERC-20 standard token contract. At first, I'd like to get balance of given address. I run private testnet using geth, I have deployed ...
1
vote
1answer
259 views

transfer ERC20 Tokens by web3

I'm a beginner of ethereum. I have seen some solutions. I can use sendRawTransaction to transfer costumed tokens from one account to another account. But my boss asked me to use ERC-20 "transfer" ...
0
votes
2answers
113 views

Ethereum Token Nam Redundancy

I have created a ERC20 token in ethereum blockchain with token name as TestToken and Symbol as TTT. Now how can I ensure that others cant create a token with the same name and same symbol? Is there is ...
0
votes
1answer
28 views

How to set different signer and gas payer for a single transaction

I am trying to make a transaction of DAI tokens from user wallet 0xDAIUserWallet to some random token contract say 0xRandomContractAddress. In this scenario I am using the private key of DAI User to ...
0
votes
1answer
13 views

Is QTUM is a coin or a Token?

According to Etherscan Qtum is a Token, holding supply with verified smart contract. But its official site contains its own protocol and integration mechanism. Is it still a token under ETH or it has ...
2
votes
2answers
94 views

Best way to create identity contracts for organisations

What is the best way to create identity contracts for organisations based on their information like name, address, organisation type(buyer/seller) etc. I have tried using factory pattern to create ...
0
votes
1answer
157 views

JavascriptVM(remix) bug deploying multiple tokens

I'm currently coding a crowdsale for school in which the fictious participants can buy a token. During the first round the participants would also get a second token which would act as a governance ...
0
votes
2answers
34 views

Could I use Infura to get the token details?

I went through https://infura.io/docs but not sure if Infura could allow me to read token details like owner, token Id, etc. I also googled on how to read token using Infura but to no avail. Has ...
0
votes
0answers
19 views

Transfer ERC20 Token with vyper

Hello i m learning vyper and i have this issue: I deployed a standard ERC20 token contract using vyper default contract: https://github.com/ethereum/vyper/blob/master/examples/tokens/ERC20.vy When i ...
0
votes
1answer
184 views

Custom token transfer, what am I doing wrong?

I am trying to hash an address then send tokens to a mapping of the hash in the token contract, then be able to withdraw those tokens using a hash of the address. It compiles but cannot make it work. ...
0
votes
2answers
203 views

Guidance on creating new token with value tied to fiat currency & fixed increases in price (newbie)

I would like to create a new token, but I'm a complete newbie when it comes to Ethereum and cryptocurrencies/blockchain in general. I'm also not a programmer. My goal is to create a fixed number of ...
1
vote
1answer
148 views

What data should be stored in contracts or tokens

After watching a sales force movie where they have a session on how they are integrating their product into the blockchain they talk of an example on capturing all the data from the supply chain ...
1
vote
1answer
80 views

How can I collect the tokens inside smart contract that people will send accidentally?

I have an ERC20 token XYZ smart contract created. People will send certain amount of tokens back to the contract address to initiate certain functions. I just want to know that what will happen if ...
0
votes
1answer
272 views

Created Token, now can't see my tokens in my account

I followed the basic tutorial to create a new Token, it all seems to have worked correctly, yet I can't see my new tokens in my account (Ethereum Wallet on mac v0.9.3). Also tried via MyEtherWaller....
2
votes
2answers
292 views

ValueError: {'code': -32000, 'message': 'invalid sender'} when calling transferFrom using web3.py

I want to make a function that allows you to send tokens from one owner to another. nonce = w3.eth.getTransactionCount(from_['address']) unsigned_transaction = contract.functions....