Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic Crowdfunding contract from eth tutorial problem #2726

Closed
Dohtar1337 opened this issue Aug 10, 2017 · 4 comments
Closed

Basic Crowdfunding contract from eth tutorial problem #2726

Dohtar1337 opened this issue Aug 10, 2017 · 4 comments

Comments

@Dohtar1337
Copy link

hello, newbie here with some basic programming knowledge here.
I created my own token, now I want to add crowdfunding contract to it. I get this error when copying code from official tutorial.
Using the latest ethereum mist and solidity 0.4.2

Unused local variable
contract token { function transfer(address receiver, uint amount){  } }

This is the code:

pragma solidity ^0.4.2;
contract token { function transfer(address receiver, uint amount){  } }

contract Crowdsale {
    address public beneficiary;
    uint public fundingGoal; uint public amountRaised; uint public deadline; uint public price;
    token public tokenReward;
    mapping(address => uint256) public balanceOf;
    ...

Thank you for your help! :)

@axic
Copy link
Member

axic commented Aug 10, 2017

The two variables address receiver, uint amount are not used in the code, please remove their names and just leave their types:

contract token { function transfer(address, uint){  } }

@axic
Copy link
Member

axic commented Aug 10, 2017

@alexvandesande is there a way to show warnings as warnings in Mist? They are currently treated as errors. This has come up quite a few times so far.

Perhaps with a tick box for "treat warnings as errors", which is on by default and turning it off shows a giant red popup message :)

@alexvandesande
Copy link

@axic you're correct I will fix that

@axic
Copy link
Member

axic commented Aug 24, 2017

Tracked in ethereum/mist#2797.

@alexvandesande apparently I've created an issue a while ago :)

@axic axic closed this as completed Aug 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants