---
title: "Mykolas Malaiška (@Maiklas) | Hashnode"
description: "Mykolas Malaiška (@Maiklas) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@Maiklas"
---

@Maiklas

# Mykolas Malaiška

@Maiklas · Joined March 2018

## Comments

[Hello, An error occurred while testing Contract: HashnodeCrowdsale ✓ should deploy the token and store the address (97ms) ✓ should set stage to PreICO (109ms) 1) one ETH should buy 5 Hashnode Tokens in PreICO Events emitted during test: --------------------------- Mint(to: <indexed>, amount: 5000000000000000000) Transfer(from: <indexed>, to: <indexed>, value: 5000000000000000000) TokenPurchase(purchaser: <indexed>, beneficiary: <indexed>, value: 1000000000000000000, amount: 5000000000000000000) EthTransferred(text: forwarding funds to wallet) --------------------------- ✓ should transfer the ETH to wallet immediately in Pre ICO (572ms) ✓ should set variable \`totalWeiRaisedDuringPreICO\` correctly (41ms) ✓ should set stage to ICO (103ms) 2) one ETH should buy 2 Hashnode Tokens in ICO Events emitted during test: --------------------------- Mint(to: <indexed>, amount: 3000000000000000000) Transfer(from: <indexed>, to: <indexed>, value: 3000000000000000000) TokenPurchase(purchaser: <indexed>, beneficiary: <indexed>, value: 1500000000000000000, amount: 3000000000000000000) EthTransferred(text: forwarding funds to refundable vault) --------------------------- ✓ should transfer the raised ETH to RefundVault during ICO (265ms) ✓ Vault balance should be added to our wallet once ICO is over (767ms) 7 passing (3s) 2 failing 1) Contract: HashnodeCrowdsale one ETH should buy 5 Hashnode Tokens in PreICO: Uncaught ReferenceError: HashnodeToken is not defined at test/TestCrowdsale.js:26:32 at <anonymous> at process.\_tickCallback (internal/process/next\_tick.js:188:7) 2) Contract: HashnodeCrowdsale one ETH should buy 2 Hashnode Tokens in ICO: Uncaught ReferenceError: HashnodeToken is not defined at test/TestCrowdsale.js:69:32 at <anonymous> at process.\_tickCallback (internal/process/next\_tick.js:188:7)](https://hashnode.com/posts/the-2018-guide-to-writing-and-testing-real-world-crowdsale-contracts/5a67bb65357c012503a334c9/comment/5aa057a80430f87244d40ca8)

Comment · Article · Mar 7, 2018 · 1 · [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)
