Giter VIP home page Giter VIP logo

ethereum-solidity-course-updated-code's People

Contributors

owanhunte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ethereum-solidity-course-updated-code's Issues

Important Solidity compiler version note

Currently the latest version of Solidity is 0.7.4. The purpose of this repo is to provide up-to-date Solidity (and other) code for the benefit of the students enrolled and enrolling in the udemy.com course Ethereum and Solidity: The Complete Developer's Guide and to this end it achieves that goal, that is, all of the updated Solidity code in this repo is fully compatible with version 0.5.0 and higher of Solidity. However if you want to deploy these smart contracts to the Rinkeby Test Network and then work with them without issues, you will need to use ABI and Bytecodes generated by a 0.5.x version of the Solidity compiler, e.g. 0.5.15.

I learned this the hard way as I was compiling using the 0.6.0 compiler when I started this repo only to realise that although I had no issue working with the contracts after deploying them to Ganache CLI's local test blockchain, this was not the case after deploying the same compiled bytecodes to Rinkeby, specifically all method calls to the contracts were only returning empty results.

Web3 Error

Please tell how to connect metamask to the browser.
And Please upload the latest web3.js file attached to this project
Your web3.js file of lottery-react is also not working on my project

Solidity 0.8 Update

First of all, I just wanted to say thank you for picking this up and carrying on @StephenGrider 's fantastic course! I was just curious if you had any plans to update the code/docs to Solidity 0.8.2, or at least cover the breaking changes.

TypeError: Cannot read properties of undefined (reading '0')

Hi Mr Owan, i would like to say the gratitude to you for the update of the course. I would like to ask question on why there are error on retrieving the wallet address in the page index.js

render() {
   
   return <div> {this.props.campaigns[0]}
        
        </div>

} 

Thanks in advance.

'VM Exception while processing transaction: out of gas' error may occur in Campaign tests

When following along with the tests covered in section 6, lecture 139, but using more up-to-date smart contract code, you may get the error 'VM Exception while processing transaction: out of gas' when you run the tests.

To resolve this error and get passing tests, change the gas amount from 1000000 (1 million) to a higher value, e.g. 1500000 (1.5 million).

Some stackoverflow responses I found when trying to troubleshoot the error suggested setting a value of 3000000 (3 million) but I found 1.5 million to work fine for me.

Error in Kickstart solidity code. "false transaction mined but execution failed" in createRequest().

The error was caused due to the following line of code. I'm using solidity version ^0.8.0 and i was getting that error because requests Array is dynamic and we're trying to access it's index that doesn't even exist.

Request storage r = requests[numRequests++];

fix :

Request storage r = requests.push(); 

Thanks for detailed explanation btw I got stuck for a while finding the correct version of the code.

Error in run tests: Error: The contract code couldn't be stored, please check your gas limit.

I ran the test but I got the below error:
Error: The contract code couldn't be stored, please check your gas limit.

and also I increase the value of gas but still have this problem.

Transaction: 0x87f1d4bb4f8ed49a504e7f800671184c5725499c383ac0914fc2b0e4a55b3802
Contract created: 0xb2a49b958f35427feba2c22e12ec3180bee82f21
Gas usage: 900000
Block number: 1
Block time: Thu Dec 14 2023 18:12:56 GMT
Runtime error: invalid opcode

SyntaxError: Unexpected token u in JSON at position 0 (factory.js)

First off, thanks for this - really appreciate it. I've recently updated to Solidity 0.8.9 and have been struggling to refactor accordingly. I was initially having issues with compile.js and deploy.js but finally got those sorted thanks to your repo.

However, now when I start up the node server and view in browser, I'm getting a "SyntaxError: Unexpected token u in JSON at position 0" error with regards to factory.js which was a file I haven't touched recently. My factory.js looks like this:

import web3 from './web3';
import CampaignFactory from './build/CampaignFactory.json';

const instance = new web3.eth.Contract(
  JSON.parse(CampaignFactory.interface),
  'mydeployedfactoryaddress'
);

export default instance;

However, nothing loads any more. I've checked that the factory contract has successfully been deployed to that stated address (with Etherscan) on the Rinkeby network and it has - no issues there. Any idea what might be causing this? Much appreciated!

All course projects in Typescript

Hi @owanhunte,

First of all thanks for all your hard work on keeping the course projects up to date.
I'm planning to build all the projects with Typescript. May I use your code as the base?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.