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 2124

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

2 votes

Token amount in smart contract

If the total supply is 1000 tokens, in the contract is stored as 1000. If you set decimals to 2, then you can split 1 token into smaller units. The minimal unit is 0.01 token. … If the total supply is 1000 tokens it is stored in the contract as 100009. The two extra ceros are because of the decimals. …
Ismael's user avatar
  • 30.3k
1 vote

Some questions about altering new Tokens from a non developer (ELI5 Please).

Yes, you can have as many tokens as you want, and create them on demand. You can create a token factory contract, and use it to deploy contract for new tokens. a. … Yes, you can lock all transactions for a token without affecting other tokens. If a token support ERC20 you have to block the operations transfer and transferFrom. …
Ismael's user avatar
  • 30.3k
1 vote

Crowdsale over, how to send back token not sold?

No contract returns ethers/tokens automatically, you have to program something in the contract to do it. It depends on your crowdsale implementation. … to return remaining tokens uint remaining = token.balanceOf(this); token.transfer(owner, remaining); You can change owner for the destination address, and token is the crowdsale token. …
Ismael's user avatar
  • 30.3k
0 votes
Accepted

About issuing token on private ethereum chain (POA Consensus )

In geth version of PoA "Clique" you set the total of coins in the genesis blocks and no other coins will be mined ever. Validators get the transaction fee, but there's no reward for block creation.
Ismael's user avatar
  • 30.3k
1 vote
Accepted

How to increase balance constantly?

An approach is to store the time of the last transaction and when needed calculate the balance based on the time elapsed. Those changes aren't stored in the contract until a transfer modifies the bala …
Ismael's user avatar
  • 30.3k
1 vote
Accepted

How large is the key-value dataset of Tether?

As of 2022-05-18 14:35:00 UTC the Tether USDT contract has a total of 4,568,883 holders. It will consume 4,568,883 x 32 bytes = 146,204,256 bytes = 139.43 Mbytes.
Ismael's user avatar
  • 30.3k
2 votes
Accepted

What was the Rebase Bug on the YAM smart contract?

They wrote SAVE YAM! 🍠 with details of the error totalSupply = initSupply.mul(yamsScalingFactor); should have been: totalSupply = initSupply.mul(yamsScalingFactor).div(BASE); Line on github: http …
Ismael's user avatar
  • 30.3k
0 votes

Linking Two Event emissions

You can emit a new event with the required information event TransferWithPrice(address sender, address recipient, uint tokenId, uint price);
Ismael's user avatar
  • 30.3k
1 vote

Does a token-transfer always have a value of zero?

Yes, usually the token contract will reject a transfer with a non zero value. For a contract method to receive ethers it should be marked as payable, but the transfer method does not have such modif …
Ismael's user avatar
  • 30.3k
0 votes

Why do the example token contracts give the initial supply to the owner?

If tokens are not assigned to someone they cannot be used for anything, it is like they didn't exist at all. …
Ismael's user avatar
  • 30.3k
2 votes
Accepted

How to call Token function & transfer owner does not change owner

To allow the crowdsale contract to create new tokens you set it as the owner of the token contract. The owner of the token can create new tokens through mint function. … At the end of the crowdsale minting of new tokens is disabled and ownership is transfered to the owner of the crowdsale (I suppose a team account) so they can act in the case of an emergency. …
Ismael's user avatar
  • 30.3k
1 vote

Mintable Token with Inflation

The account calling mint will be assigned the new created tokens. …
Ismael's user avatar
  • 30.3k
1 vote
Accepted

Sending Ether to my contract address fails

The problem is with _tranfer(this, msg.sender, amount); For this to work you need this to have at least amount tokens in this balance. But nowhere in your contract there is assignment for that. …
Ismael's user avatar
  • 30.3k
0 votes
Accepted

smart contract token & 18 decimals

Normally your contract will only handle tokens with full precision (with 18 decimals in your case). … The frontend allows the user to enter the amount of tokens, 0.1 for example, and it will convert to 0.1 * 10^18 when sending the transaction to the contract. …
Ismael's user avatar
  • 30.3k
1 vote

Is there anyway to burn/get tokens back from a contract address?

From your link the issue is that you override _transfer in RETNToken function _transfer(address _from, address _to, uint _value) internal { require (_to != 0x0); // …
Ismael's user avatar
  • 30.3k

1
2 3 4 5
8
15 30 50 per page