Giter Club home page Giter Club logo

hoscdev's People

Contributors

brunodavies avatar dependabot[bot] avatar ksolo avatar randallkanna avatar redsquirrel avatar vanjan 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

hoscdev's Issues

Your chapter 5 exercises are impossible to complete as written

The folder structure in your github repository doesn't align with with the copy/paste noted in the book (i.e., chapter 9 does not contain the required UI code for 'Greeter'...

EDIT: spelling. I solved my problem so am less mad but still, the fact that I had to scramble around for this UI code was VERY frustrating...

Migrations could not deploy due to insufficient funds on Goerli Testnet

Hello I have been trying to deploy my contract to the goerli test network but i get this error.

Migrations dry-run (simulation)

Network name: 'goerli-fork'
Network id: 5
Block gas limit: 8000000 (0x7a1200)

1_initial_migration.js

Replacing 'Migrations'

Error: *** Deployment Failed ***

"Migrations" could not deploy due to insufficient funds

  • Account: 0x23D4441385418144Eb3F75Caa9F5d043a1A74BDC
  • Balance: 0 wei
  • Message: insufficient funds for gas * price + value
  • Try:
    • Using an adequately funded account
    • If you are using a local Geth node, verify that your node is synced.

If you check my wallet address on the goerli test network you will see i have sufficient ETHER.
Thank you

"truffle test" command does not work on chapter-4/greeter

I bought the book, "Hands-On Smart Contract Development with Solidity and Ethereum" in Japanese Edition.

I run the first truffle test command in chapter4 in hoscdev/chapter-4/greeter path.

const GreeterContract = artifacts.require("Greeter");

contract("Greeter", () => {
    it("has been deployed successfully", async () => {
        const greeter = await GreeterContract.deployed();
        assert(greeter, "contract failed to deploy");
    });
});

The book says the result is "Could not find artifacts got Greeter grom any sources".
However, the commands stop forever.

Error: Provided address "Greeter" is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can't be converted.

Help me.

test-solidity(master*) » truffle test

Compiling your contracts...
===========================
> Compiling ./contracts/Greeter.sol
> Compiling ./contracts/Migrations.sol
> Artifacts written to /var/folders/nv/d2vh2f4j2jv32rxxwsqfllpc0000gn/T/test-2021717-69448-160y8cv.3w5p
> Compiled successfully using:
   - solc: 0.5.16+commit.9c3226ce.Emscripten.clang

Error: Provided address "Greeter" is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can't be converted.

Code

// Greeter.sol
pragma solidity >=0.4.0 <0.9.0;

contract Greeter {}
// greeter_test.js
const GreeterContract = artifacts.require("Greeter")

GreeterContract("Greeter", () => {
  it("has been deployed successfully", async () => {
    const greeter = await GreeterContract.deployed()
    RTCIdentityAssertion(greeter, "contract was not deployed")
  })
})
// 2_deploy_greeter.js
const GreeterContract = artifacts.require("Greeter")

module.exports = function (deployer) {
  deployer.deploy(GreeterContract)
}

Fix openzeppelin-solidity/contracts/ownership/Ownable.sol

In the latest version of openzeppelin, this has been moved.

Install
npm install @openzeppelin/contracts --save

Instead of

import "openzeppelin-solidity/contracts/ownership/Ownable.sol";

use it like this

import "@openzeppelin/contracts/access/Ownable.sol";

Chapter 7 UI alert

I know there is an older issue regarding Chapter 7 (still open and demonstrating the same error that I was having).

I discovered first that web3 needed to be updated to 1.2.2 (works around a v8 and node-gyp error), but the alert is still appearing about failing to connect. The specific error is that callbackify is missing.

I used the chapter10+11 project as described in the book. Sidenote: it appears that project is based on yarn - should the instructions be to use yarn instead of npm? I am getting several warnings about the mix.

Chapter 5: wrong folder structure

In chapter 5, there's this following instruction:

cp -r hoscdev/chapter-9/client greeter/client

Currently the folder client doesn't exist in the repo.

unbox react -- npm run start fails

Tagging @ksolo . I am able to get most of the steps to work in ch9 but get an error on run start. Here are the steps I take:

  1. clean directory: /greeter-dapp; truffle unbox react; success!
  2. truffle develop; compile; migrate; success!
  3. open other terminal; cd ~/test/client/src; npm i; dependencies install successfully (one warning, no errors)
  4. cd up to /client; attempt npm run start; failure :( with the below:
    Unbox runstart error

Any idea how I can fix this?

Chapter 4: TypeError: Overriding modifier is missing "override" specifier. /

At the beginning of chapter 5 I try to compile previously added code in chapter 4 and receive the following output:
image

Here's my Greeter.sol code:
`pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";

contract Greeter is Ownable {
string private _greeting = "Hello, World!";
address private _owner;

constructor() {
    _owner = msg.sender;
}

modifier onlyOwner() {
    require(
        msg.sender == _owner,
        "Ownable: caller is not the owner!"
    );
    _;
}

function greet() external view returns(string memory) {
    return _greeting;
}

function setGreeting(string calldata greeting) external {
    _greeting = greeting;
}

function owner() public view returns(address) {
return _owner;
}

} `

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.