Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 34929

A token is a transferable, divisible object on the blockchain, such as a subcurrency or a prediction market share.

0 votes
Accepted

Interaction between 2 smart contracts?

Detecting the transfer of token A to contract 1 What you ask is possible, but the difficulty lies in detecting that contract A has transferred it's tokens to contract 1. … In this case you may have to get the holder of token A to approve contract 1 to transfer tokens on their behalf, then call contract 1, which will transfer the A token and issue the B tokens. …
supakaity's user avatar
  • 1,478
1 vote

When and why should one choose to use tokens over ether?

Currencies or assets (tokens) inside Ethereum's blockchains are not (directly) tied to the value of Ethereum. … You see tokens can represent anything. I could have a token which is a deed to my car, and which people can use to rent my car, or buy it from me. …
supakaity's user avatar
  • 1,478
1 vote

How transfer ethereum token

This sale contract would have tokens transferred to it from the main ECR20 token's contract and will have a payable function that accepts payment of Ether in exchange for the tokens. … It then transfers that number of tokens from it's balance to the sender. …
supakaity's user avatar
  • 1,478
1 vote

How does one implement different token prices at different rounds (or times in the contract)...

. /// @return Amount of tokens per ETH paid. function unitsOneEthCanBuy() public view returns (uint _units) { if (block.timestamp > end) { return 0; // Sale has ended } else if (block.timestamp … Example: This is not enough to make your contract ERC223 compliant, but it's enough to ensure your tokens don't get lost Add the following to your transfer and transferFrom functions just before you …
supakaity's user avatar
  • 1,478
1 vote
Accepted

Three tokens transfer between each other

It will initially give the creator 1000 Main tokens, then the owner could call for example Main.buyB(10). The owner would then have 990 Main, and 10 B. … Sub public c_token; /// @notice Creates a new Main token, then creates 2 sub-tokens and saves them. function Main() public { // Grant the creator 1000 Main tokens. …
supakaity's user avatar
  • 1,478
1 vote

Is it possible for smart contract to link received tokens to the senders

No, but with a caveat... No, you can't get called upon token transfer with just plain old ERC20. However the extensions in ERC223 support this via the mandated check to your tokenFallback() function …
supakaity's user avatar
  • 1,478
22 votes

Send tokens using approve and transferFrom vs only transfer

Transfer method The transfer method is for a 2 party transfer, where a sender wishes to transfer some tokens to a receiver. … Approve and transferFrom method The approve + transferFrom is for a 3 party transfer, usually, but not necessarily that of an exchange, where the sender wishes to authorise a second party to transfer some tokens
supakaity's user avatar
  • 1,478
2 votes
Accepted

Whats the best way to distribute tokens

The best way The best way is quite an objective term. The most cost effective way is definitely to execute them all in one loop (option 1), although there will be a limit to how many addresses you c …
supakaity's user avatar
  • 1,478
2 votes

Why standard tokens manually create getters for balanceOf and totalSupply

It can't implement the interface Even though this is a duplicate question, I'm not sure the other answers adequately explain the issue. The problem is easily demonstable with a simple example: Exa …
supakaity's user avatar
  • 1,478
1 vote

URGENT-refinding the private key in metamask

You'll need your Mnemonic Phrase Unfortunately, without your Mnemonic Phrase (or a backup of your private keys) there's no way to recover the accounts. So you'll need to get that phrase off your othe …
supakaity's user avatar
  • 1,478
1 vote

Create Tokens Pegged to Ether

In this case, the easiest way is if you're willing to simply pay back the person in Ethereum for their tokens using a simple sell function in your contract. … However if there's a limited supply of your tokens and nobody wants to sell, you may end up in a situation where scarcity forces a higher value than you. …
supakaity's user avatar
  • 1,478
0 votes

Are events in Ethereum Tokens worth it?

It's the standard From a functionality standpoint there's no reason why you need to call the transfer function. I mean the net result is the same regardless of if you call it or not, so if all you wa …
supakaity's user avatar
  • 1,478
0 votes

how to send tokens back from escrow smartcontract to wallet

will need a function like the following, which will allow the owner to recover a specified _value of units of the given token at _token and transfer them to _to: Example: /** * @notice Recover ERC20 tokens … * @param _to Address to send the tokens to. …
supakaity's user avatar
  • 1,478
1 vote

Can a smart contract transfer (steal) another contract's tokens?

Decentralized exchanges Most exchanges utilise a contract's ability to delegate authority for control of a portion of your tokens to a third party. …
supakaity's user avatar
  • 1,478
3 votes

Can ERC20 Token be minted and rewarded automatically based on whatever command?

To answer your question specifically, yes, you can have a function which only you can call that will create new tokens out of thin air based upon user actions external to the contract. Gas costly? … Be aware that calling the mint() function as defined about will cost you (or someone) gas each time you execute the function to create the new tokens. …
supakaity's user avatar
  • 1,478