---
title: "Comment by Aleš Uršej on \"The 2018 guide to writing (and testing) real world crowdsale contracts\" | Hashnode"
description: "Hello. Thank you for great &quot;howto&quot;. I have a problem when I try to compile. I get: Error parsing D:\\crypto\\coin\\contracts\\HashnodeCrowdsale.sol: Parse"
url: "https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9/comment/5a70e6eed3e3e6ca6266621f"
---

[Discussion](https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9)

Comment [The 2018 guide to writing (and testing) real world crowdsale contracts](https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9)

[Aleš Uršej](https://hashnode.com/@l3ksy)

[Jan 30, 2018](https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9/comment/5a70e6eed3e3e6ca6266621f)

Hello. Thank you for great "howto".

I have a problem when I try to compile. I get: Error parsing D:\\crypto\\coin\\contracts\\HashnodeCrowdsale.sol: ParsedContract.sol:1:1: ParserError: Expected pragma, import directive or contract/interface/library definition. �p r a g m a s o l i d i t y ^ 0 . 4 . 1 8 ; ^ Compilation failed. See above.

What could be the problem?

Thanks,

Ales

[Sandeep Panda](https://hashnode.com/@sandeep)

[Jan 30, 2018](https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9/comment/5a70e6eed3e3e6ca6266621f#reply-5a70e9b39cc7099e7dbf2c35)

Well difficult to say. Could you upload the code to GitHub and share the repo here? I will try to compile it on my machine.

[Aleš Uršej](https://hashnode.com/@l3ksy)

[Jan 30, 2018](https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9/comment/5a70e6eed3e3e6ca6266621f#reply-5a7102a5d3e3e6ca62666324)

Thank you for your reply. Here is the code I tried to compile. I think its all the same as yours :) Maybe I have something wrong with Truffle or something?

[github.com/l3ksy/TheCoin](https://github.com/l3ksy/TheCoin)

[Aleš Uršej](https://hashnode.com/@l3ksy)

[Feb 15, 2018](https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9/comment/5a70e6eed3e3e6ca6266621f#reply-5a85fa84477e924764abf4ca)

Hey. Did you look it? :)

[Vamsee](https://hashnode.com/@vamsee)

[Feb 28, 2018](https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9/comment/5a70e6eed3e3e6ca6266621f#reply-5a964977e96b06960604ffb8)

Hi Sandeep, thanks for publishing this. Just FYI you can simplify the tests like this:

```
   it('should deploy the token and store the address', async () => {
       const instance = await HashnodeCrowdsale.deployed()
       const token = await instance.token.call()
       assert(token, 'Token address couldn\'t be stored')
    });
```
