# My Coding Journey: Beginner to Pro

**URL:** <https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390>\
**Category:** Showcase\
**Tags:** coding-journey\
**Created:** [February 27, 2020, 11:10pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390 "2020-02-27T23:10:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jshanks21](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jshanks21/32/1772_2.png) [@Jshanks21](https://forum.openzeppelin.com/u/Jshanks21)\
**Post date:** [February 27, 2020, 11:10pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/1 "2020-02-27T23:10:50Z")

</div>

A friend in my Slack group inspired me to start recording my coding journey. I’ve already been learning to code on the blockchain for a few months though. So while this is Day 1, it’s technically Day1 += 4mos;

Day 1:

Building a token contract from scratch & first steps to build a separate token contract using the OpenZeppelin library.

 ![DevToken](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/6/6cb0a649c8c214636441038e32cea8dc2ae512c1.png)  
 ![OZToken](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/8/81d8748d3015269f75df68f9112b4fbb19d2dee9.png)

---

<div class="post-metadata">

**Author:** ![Jshanks21](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jshanks21/32/1772_2.png) [@Jshanks21](https://forum.openzeppelin.com/u/Jshanks21)\
**Post date:** [February 27, 2020, 11:14pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/2 "2020-02-27T23:14:33Z")

</div>

Day 2:  
-Completed chapter 2 and began chapter 3 of CryptoZombies.

-Explored the trufflesuite packages library for standard project dependencies.

-Completed initial set up for a token sale project.

Crowd sale smart contract begins tomorrow!

 ![CZPath_Day2](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/5/5f0dcfc72b15ae79dd7b5710664515abe8f5baf5.png)

 ![truffle_dep](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/1/15be040e11085543576890633b29bea0b6aa28d9.png)

 ![Crowdsale1](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/4/4992b15a4bc0ec3df77a421523aa8d1f4d0d1419.png)

---

<div class="post-metadata">

**Author:** ![Jshanks21](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jshanks21/32/1772_2.png) [@Jshanks21](https://forum.openzeppelin.com/u/Jshanks21)\
**Post date:** [February 27, 2020, 11:16pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/3 "2020-02-27T23:16:50Z")

</div>

Day 3:

-Began crowdsale contract construction and initial unit testing.

-Encountered error in finding the bignumber.js file that accompanies chai. (Updated NODE\_PATH environment variable with no luck.)

-Nearly finished chapter 3 of CryptoZombies.

 ![crowdsaleD3](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/0/0de5858594bd9a4be7fcfa34b912782e5a7d74f4.png)

 ![BNerror_D3](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/d/db62910036a7080cb17a2ec08b988d0a8b1f9dd7.png)

 ![CZPath_D3](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/4/4e5d48761d53d1ad3534ea10bc9063f40be98ed2.png)

---

<div class="post-metadata">

**Author:** ![Jshanks21](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jshanks21/32/1772_2.png) [@Jshanks21](https://forum.openzeppelin.com/u/Jshanks21)\
**Post date:** [February 27, 2020, 11:19pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/4 "2020-02-27T23:19:08Z")

</div>

Day 4:

-Truffle v5.x uses bn.js instead of bignumber.js, so it requires chai-bn instead of chai-bignumber. Issue resolved!

-Also, bignumber \> toNumber() because of Number.MAX\_SAFE\_INTEGER

-Found helpful usage notes for chai-bn in the OpenZeppelin repository. Thanks guys!

 ![BN_res_D4](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/1/101f5b8c47ccbf490c23bd205ff8a0b67bb20659.png)

 ![D4_whyBN](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/d/d2f06d5a7a7f4fcc299ba4e30cf7d510a190cb96.png)

 ![D4_BNdescribed](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/8/862ce826d298a8cc484acb014ceb98a0a9662ed5.png)

---

<div class="post-metadata">

**Author:** ![Jshanks21](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jshanks21/32/1772_2.png) [@Jshanks21](https://forum.openzeppelin.com/u/Jshanks21)\
**Post date:** [February 27, 2020, 11:39pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/5 "2020-02-27T23:39:09Z")

</div>

Day 5:

-Completed Lesson 3 in CryptoZombies & starting Lesson 4.

-Made token and crowdsale mintable by importing the MintableCrowdsale.sol and ERC20Mintable.sol contracts.

-Created a helpers file for to wei conversions, but have a new error: web3.BigNumber is not a constructor

Any feedback is greatly appreciated!

 ![CZPath_D5](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/c/c3df86270fb564feca2e9586b7fa7b19212c2cab.png)

 ![Mintable_D5](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/9/9b356d07b19a9053a5a66fa8eb0139e3121320bb.png)

 ![helpers_D5](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/0/03cf3b512aaadec8317edb89299c5f8f15a33aa6.png)

![error_D5](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/1/1f1fc827edbb8022ccdd4e1ccaf7a892e588b550.png)

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [February 28, 2020, 5:59am UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/6 "2020-02-28T05:59:56Z")

</div>

Hi @Jshanks21,

Thank you so much for sharing your journey. Loving reading your progress so far.

I suggest using [OpenZeppelin Test Helpers](https://docs.openzeppelin.com/test-helpers) for big number support. [Performing Complex Assertions](https://docs.openzeppelin.com/learn/writing-automated-tests#performing-complex-assertions) has an example of how to use (this is with [OpenZeppelin Test Environment](https://docs.openzeppelin.com/test-environment) but can be used with Truffle too). The [OpenZeppelin Contracts tests](https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/test) are also worth looking at.

I really like OpenZeppelin CLI for the interactive commands and now with [OpenZeppelin CLI 2.8: Release Candidate](https://forum.openzeppelin.com/t/openzeppelin-cli-2-8-release-candidate/2297) it supports regular deploys.

Feel free to ask all the questions that you need, and please keep sharing your journey, it is great to follow.

---

<div class="post-metadata">

**Author:** ![Jshanks21](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jshanks21/32/1772_2.png) [@Jshanks21](https://forum.openzeppelin.com/u/Jshanks21)\
**Post date:** [February 28, 2020, 4:52pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/7 "2020-02-28T16:52:37Z")

</div>

Thank you @abcoathup! I’ll be sure to check that out today.

---

<div class="post-metadata">

**Author:** ![Jshanks21](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jshanks21/32/1772_2.png) [@Jshanks21](https://forum.openzeppelin.com/u/Jshanks21)\
**Post date:** [March 1, 2020, 10:39pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/8 "2020-03-01T22:39:00Z")

</div>

Day 6:

-Error resolved! Using web3.utils.toBN in helpers instead of web3.utils.BigNumber b/c Truffle v5 supports BN not bignumber.

-Added some initial minting tests.

-All current tests pass!

-CryptoZombies Lesson 4 @ 38%

// TODO: Read through some [OpenZeppelin tests contracts](https://github.com/OpenZeppelin/openzeppelin-contracts/tree/master/test), check out [Ethernaut](https://ethernaut.openzeppelin.com/), and migrate tests from Truffle to try the OpenZeppelin testing library.

Feedback is always appreciated!

![Resolved_D6](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/a/a5c8d5d30f587b807acf7c755a17bb7639d58aa3.png)

![preAddMinter_D6](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/d/dd0519cf2f631c51b091f3ea1a6521cab28acecd.png)

 ![addMinter_D6](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/c/cc7649ad0064b0a61716fc13c3b82705878f47b8.png)

![passedTests_D6](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/4/4d3f4e83d4e1f65254f076e2c19d26f70144ffca.png)

 ![CZPath_D6](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/2/243b462e89bbe642f5bd93d39cbb8d8e95cf96f7.png)

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [March 1, 2020, 10:58pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/9 "2020-03-01T22:58:13Z")

</div>

Thanks for sharing this awesome series with the community

* * *

I would try the Solidity 0.5 version of Ethernaut ([https://solidity-05.ethernaut.openzeppelin.com/](https://solidity-05.ethernaut.openzeppelin.com/)) (Once OpenZeppelin Contracts 3.0 is out of beta can see who in the community wants to upgrade the contracts to Solidity 0.6).

There are a number of community solutions, though it would be great if you wanted to write your own as well: [Ethernaut Community Solutions](https://forum.openzeppelin.com/t/ethernaut-community-solutions/561)

* * *

It is fairly straight forward to migrate from Truffle tests to OpenZeppelin Test Environment (and vice a versa if using mocha/chai based tests). I used this guide: [https://docs.openzeppelin.com/test-environment/0.1/migrating-from-truffle](https://docs.openzeppelin.com/test-environment/0.1/migrating-from-truffle)  
Feedback on the documentation is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Jshanks21](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jshanks21/32/1772_2.png) [@Jshanks21](https://forum.openzeppelin.com/u/Jshanks21)\
**Post date:** [March 1, 2020, 11:22pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/10 "2020-03-01T23:22:40Z")

</div>

Sweet! Thank you for the resources. I’ll be sure to check them out.

---

<div class="post-metadata">

**Author:** ![Jshanks21](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jshanks21/32/1772_2.png) [@Jshanks21](https://forum.openzeppelin.com/u/Jshanks21)\
**Post date:** [March 2, 2020, 11:26pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/11 "2020-03-02T23:26:13Z")

</div>

Day 7:

-Added the OpenZeppelin test library to my tests  
+Kept getting an error about the timeout exceeding 2000ms, so I added a quick fix that disables the timeout `this.timeout(0);`, but maybe there’s a better fix for this? Perhaps a configuration I overlooked?

-Completed Lesson 4 of CryptoZombies

-Refresher on the batchOverflow hack on BEC

-Studied the MakerDAO vulnerability in the DSChiefApprovals contract, extended by the DSChief contract, identified by OpenZeppelin

 ![OZtests_D7](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/e/e0fced00658c86707a8d25ee03cc2d0291615b9c.png)

![testsPass_D7](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/b/b7952a07a8ac2f39e79f354ae65147bffdd6a3d0.png)

 ![CZPath_D7](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/9/92eb821a9291d025ddc2b90ba9d274e78fd88d95.png)

 ![overflow_D7](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/e/e94f51fba81aca1ad0d09445eb4c602b1ecdc9ed.png)

 ![makerVuln_D7](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/c/c9a11b462fe3b30069d86f6de35371c6bec89742.png)

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [March 3, 2020, 12:36am UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/12 "2020-03-03T00:36:49Z")

</div>

Split this topic on March 3, 2020, 12:36am UTC

A post was split to a new topic: [Timeout exceeding 2000ms](https://forum.openzeppelin.com/t/timeout-exceeding-2000ms/2406)

---

<div class="post-metadata">

**Author:** ![Jshanks21](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jshanks21/32/1772_2.png) [@Jshanks21](https://forum.openzeppelin.com/u/Jshanks21)\
**Post date:** [March 4, 2020, 11:30pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/13 "2020-03-04T23:30:38Z")

</div>

Day 8:

-Imported CappedCrowdsale functionality.

-Added some natspec descriptions.

-Added testing for capped crowdsale functionality. All tests pass! (So far.)

-Completed lesson 5 in CryptoZombies.

 ![addedCappedCS_D8](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/e/e3788a6366a38df51856d84f1d639d9988ea4a2d.png)

 ![natspec_D8](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/c/c62429b0d4b6787eea566dfbf3cd36464cf0ed18.png)

 ![tests1_D8](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/1/1b22c671bb70e2f482cc6e5f6c6d256fc01e6980.png)

 ![tests2_D8](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/f/f0e97f483d8eadfc41218a0db4433f83650a7fa0.png)

![cappedTestPass_D8](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/1/15858cdcda4af85ba2c04cccdaaa41f9756abdf9.png)

 ![CZPath_D8](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/6/62c2cc6af18ae0a587f04b6e7a2ed3b8b84cf8a5.png)

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [March 4, 2020, 11:37pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/14 "2020-03-04T23:37:37Z")

</div>

Hi @Jshanks21,

Thanks for sharing as always. 🙏

Just as an FYI: Crowdsales are not included in the [OpenZeppelin Contracts v3.0](https://forum.openzeppelin.com/t/openzeppelin-contracts-v3-0-beta-release/2256) beta release and there are no plans to migrate them to Solidity 0.6.

> Crowdsales were removed: we’ll continue to provide support for security issues on the v2.5 release, but will not bring them over to v3.0.

---

<div class="post-metadata">

**Author:** ![Jshanks21](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jshanks21/32/1772_2.png) [@Jshanks21](https://forum.openzeppelin.com/u/Jshanks21)\
**Post date:** [March 4, 2020, 11:48pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/15 "2020-03-04T23:48:32Z")

</div>

No worries! Happy to share.

I know they won’t be included in v3.0. However, I never learned how to develop them when they were popular. And in case Hester Pierce passes that bill giving ICOs a 3 year grace period, it could be helpful to know. 🥳

Regardless, this is all educational. I don’t intend to implement this project for production.

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [March 4, 2020, 11:58pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/16 "2020-03-04T23:58:20Z")

</div>

On the note of education about crowdsales, it would be worth having a look at [TokenTimelock](https://docs.openzeppelin.com/contracts/2.x/api/token/erc20#TokenTimelock) and [TokenVesting](https://docs.openzeppelin.com/contracts/2.x/api/drafts#TokenVesting)

I wrote an example recently:

> [@Example using TokenTimelock](https://forum.openzeppelin.com/t/example-using-tokentimelock/2325):
>
> A community member requested an example of using TokenTimelock for an ERC20 token.

---

<div class="post-metadata">

**Author:** ![Jshanks21](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jshanks21/32/1772_2.png) [@Jshanks21](https://forum.openzeppelin.com/u/Jshanks21)\
**Post date:** [March 5, 2020, 12:02am UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/17 "2020-03-05T00:02:51Z")

</div>

Perfect timing! I planned to add some timelock features next. Thank you!

---

<div class="post-metadata">

**Author:** ![Jshanks21](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jshanks21/32/1772_2.png) [@Jshanks21](https://forum.openzeppelin.com/u/Jshanks21)\
**Post date:** [March 6, 2020, 9:37pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/18 "2020-03-06T21:37:05Z")

</div>

Day 9:

-Imported TimedCrowdsale.sol and added constructor arguments for them. I also added some tests, but ran into issues seen below. I believe the issue has to do with the JavaScript integer limitation MAX\_SAFE\_INTEGER. However, I still had issues when trying to wrap the integers in a string or BN though. The specific line of code that seems to cause this error is highlighted below.

-Finished reading about the critical vulnerability in MakerDAO and started reading the initial audit for Compund.

-Reached level 2 in Ethernaut!

 ![addedTimedCS_D9](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/b/b9bcfb300b8829150e2951f27ed7d7fe4f4c1d2e.png)

![timedTests_D9](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/c/c6649c6f26b8ac83accc84fb4351dd4d1b61f827.png)

The line below seems to cause the error. When commented, the tests complete with the given opening and closing times. Of course, they don’t all pass without the line below though.  
 ![timeIncreaseError_D9](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/6/6aa10648628076005328db295812dd566f0b464f.png)

 ![compundAudit_D9](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/2/225a5e3dc4c867c346765978b5621b48ce47cf33.png)

 ![ethernautLvl2_D9](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/a/ae7f32f8fe7ff42a0949dc0f35b48605932551f3.png)

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [March 9, 2020, 9:13pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/19 "2020-03-09T21:13:47Z")

</div>

Hi @Jshanks21,

Would you mind posting the failing test and contract in the forum and I can try to reproduce?

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [March 10, 2020, 2:57pm UTC](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390/20 "2020-03-10T14:57:33Z")

</div>

Split this topic on March 10, 2020, 2:57pm UTC

A post was split to a new topic: [Number can only safely store up to 53 bits](https://forum.openzeppelin.com/t/number-can-only-safely-store-up-to-53-bits/2444)

[Next page](https://forum.openzeppelin.com/t/my-coding-journey-beginner-to-pro/2390.md?page=2)
