Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • Jun 05 2016 10:31
    @alexvandesande banned @adamskee
  • Mar 16 2016 01:12
    @alexvandesande banned @scbosse
Brooks Boyd
So, for that sample token, if you just want to give another contract some allowance from your stash, you use approve. If the other contract you're giving an allowance to is another smart contract, and it has implemented a receiveApproval function (to let it do some logic immediately after receiving some tokens), use the approveAndCall function to trigger that all in the same transaction call.
Luca Venturella


When a contract is defined in Solidity like the tokenRecipient one in that contract, it acts kind of like what an "interface" would be in other languages.

Ok, but i'm confusing...so in that tutorial, should be corrected from

contract tokenRecipient { function receiveApproval(address from, uint256 value, address token, bytes extraData); }


interface tokenRecipient { function receiveApproval(address from, uint256 value, address token, bytes extraData); }

right ???

thanks for your help
Luca Venturella
also another question, so to get a full working tutorial (i'm trying to deploy to the ropsten test network using truffle), i have not to deploy that interface/contract tokenRecipient , i need to deploy only the other contracts right?
(i'm using that documentation as reference http://solidity.readthedocs.io/en/v0.4.15/contracts.html#interfaces )
Brooks Boyd
No, "interface" is not a keyword in Solidity; you leave it as "contract", it just behaves like an interface due to how it's used.
To use, you deploy that whole Solidity script. It has definitions for several contract types, but when deploying only one becomes the main logic for the deployed address. All the other contract definitions in the script are supplemental/reference for the main contact
Oh actually, looking at that documentation, they did add in the "interface" keyword, my bad!
Luca Venturella

Oh actually, looking at that documentation, they did add in the "interface" keyword, my bad!


Brooks Boyd
In that token contract, you don't need to change it to the "interface" keyword, but it wouldn't hurt anything if you did.
Luca Venturella
Also because truffle compile get an error........
Luca Venturella

Anyway, with contract keyword it works.

But for complete understanding the tutorial, i need to know this:
Should i deploy only the MyAdvancedToken contract (using truffle)?
Should i call the deployer link also or i don't to link?

This is my migration code:

var owned = artifacts.require("Owned");
var Token = artifacts.require("Token");
var TestCoin = artifacts.require("TestCoin");

module.exports = function(deployer) {

  deployer.link(Token, TestCoin);

  deployer.link(owned, TestCoin);

Thank you very much for help me!

Brooks Boyd
I haven't used the Truffle infrastructure much at all, but you should only need to deploy the one MyAdvancedToken contract for basic functionality. If you want to test the approveAndCall functionality, you'd need to deploy a second contract that implements that one receiveApproval method.
Luca Venturella
ok understood. thanks
Ayushya Chitransh
@MidnightLightning I agree, using docker would be a better choice. I didn't think of it, so I've set it up in my system. I am exploring more cli options to configure it since I need to get this working on server
Hey I need to get one thing straight. Please someone help me . I am confused with this stuff. I want to create a commercial coin on ethereum network. There are 3 pages of tutorial on ethereum.org . I successfully implemented the first one. Now, what do I need to do? how and where to put it on so that people can trade ?
@vishwas96 Did you think it costs nothing to deploy? You have to mine or buy ether to deploy. No free lunch.
Yeah . I'm ok with that but I wanna know how things will work
will I be able to create full coin that people can invest in?
HI, I need to Know that during creating my own currency how to decide the value of my currency and how much amount to pay for my own currency (per token or coin whatever it is)
Hi, I'm trying to set up my first digital token using the tutorial. However, when I cut and paste the provided code into the Solidarity Contract Source code text field, I get the following error:
Source file does not specify required compiler version!Consider adding "pragma solidity ^0.4.11
contract MyToken {
Spanning multiple lines.
Brooks Boyd
@fdgrant That's just a notice, not an actual error. You can add pragma solidity ^0.4.11 as the first line of your contract code to avoid it.
hi everybody
does someone have the Full coin code?
@MidnightLightning Thank you so much dude!! But right now I have another problem, I don't know how to upgrade my Ethereum Wallet to compiler v.0.4.16? CAn you please support me?
Brooks Boyd
Ah. Well, you could use the online Remix tool to compile the contract for you: https://ethereum.github.io/browser-solidity, or you can switch the version indicated in the pragma command to be the version you have.
is there any coin created this way ?
Hello Everyone. I have a problematic wallet contracted that I created using Mist. The wallet is showing a positive balance inside Mist, and on Etherchain and Etherscan. When I try send funds from this wallet address to any other I get an error that says "Unknown Account". I know the password is correct. Interestingly, whenver I search for this wallet on Etherchain/Ethercan I can see the address and the balance, but then the browser tab completely locks up. I've tried everything I can think of. Has anyone else heard of this problem? Do you have any suggestions?
James Ray
I have an issue following the instructions for remix for deploying your first contract. https://medium.com/@jamesray_56543/unfortunately-i-dont-see-any-of-this-d87ca724a22a.
James Ray
I'm still having issues going through the lllc tutorials.
@blacksausage it seems that Mist isn't really ready for use yet, best to wait until it is usable with later releases that aren't pre-releases.
@blacksausage It does not look by your post that you have actually put any ether into that Wallet. If you used Ethereumwallet to create that wallet contract and you've synchronized with the blockchain, perhaps it is a collision, i.e. you have stumbled into someone else's wallet. I don't know what the odds are for two different sets of keys to generate the same address, but it sounds interesting if it did happen.
Satyam Agrawal
how exchanges create the address of other user and store the private and public key on ethereum network
can somebody guide me
can someone explain me the stepps to create a coin/wallets system and the possibilities i can alter the shape of the coin?
Hey. Is it possible to send to multiple addresses with an existing Ethereum Token?
@KingScorpio , follow the steps on the website:)
Vivian Lobo
I used about 10$ worth of Ether
while setting up the wallet
now I cannot find it
any idea where to look
Samuel Tirtawidjaja
where i can put this source code of making my own token?
how do I create a token
Samuel Tirtawidjaja
hey guys
what is a pragma solidity and can i change it?
and i got this error actually Undeclared identifier.
require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead