full-blockchain-solidity-course-js icon indicating copy to clipboard operation
full-blockchain-solidity-course-js copied to clipboard

Buy item script sets chain ID to "31337"

Open jav4di opened this issue 1 year ago • 4 comments

Lesson

Lesson 15

Could you please leave a link to the timestamp in the video where this error occurs? (You can right click a video and "copy video URL at current time")

https://youtu.be/gyMwXuJrbJQ?t=95839

Operating System

No response

Describe the bug

On line 14 of the buy item script, rather than network.config.chainId being compared to "31337" (== or ===), it's set to "31337" (=.)

if ((network.config.chainId = "31337")) {
    await moveBlocks(2, (sleepAmount = 1000))
}

The cancel item script contains the same error on line 12 (and the function is incorrectly named mintAndList.)

jav4di avatar Jul 21 '22 09:07 jav4di

You are using the assignment operator = instead of a comparison operator like == ===. Change it and you will be good to go :)

br0wnD3v avatar Aug 02 '22 20:08 br0wnD3v

You are using the assignment operator = instead of a comparison operator like == ===. Change it and you will be good to go :)

Yes, I opened this issue to point out the mistake in the video/codebase.

ghost avatar Aug 03 '22 07:08 ghost

@jav4di Oh yeah, sorry I read it in the wrong context.

br0wnD3v avatar Aug 05 '22 22:08 br0wnD3v

@jav4di Oh yeah, sorry I read it in the wrong context.

No worries pal, I should’ve been clearer! I have updated the description accordingly.

ghost avatar Aug 06 '22 08:08 ghost

@PatrickAlphaC

krakxn avatar Sep 15 '22 04:09 krakxn

Whoops, thank you for this!

PatrickAlphaC avatar Sep 15 '22 16:09 PatrickAlphaC

I have fixed, appreciate this!

PatrickAlphaC avatar Sep 15 '22 16:09 PatrickAlphaC

I have fixed, appreciate this!

Awesome. Thank you for the brilliant course.

ghost avatar Sep 16 '22 11:09 ghost