Giter VIP home page Giter VIP logo

symfoni-monorepo's People

Contributors

alcuadrado avatar elektronaut0815 avatar ramvi avatar robertosnap avatar turupawn 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

Watchers

 avatar  avatar  avatar  avatar

symfoni-monorepo's Issues

Migrate to @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers

See the beginning installation instructions for hardhat-deploy-ethers.
https://hardhat.org/plugins/hardhat-deploy-ethers.html#installation
From hardhat-deploy-ethers installation:

Since hardhat-deploy-ethers is a fork of @nomiclabs/hardhat-ethers and that other plugin might have an hardcoded dependency on @nomiclabs/hardhat-ethers the best way to install hardhat-deploy-ethers and ensure compatibility is the following:
npm install --save-dev @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers

Only import "@nomiclabs/hardhat-ethers"; is needed now.

Contract address is 0x00.. after successful deployment in hardhat local network

Hey folks!

I was trying out some basic stuff with the hardhat-react plugin and got stuck with connecting to the deployed contract in hardhat local network

https://github.com/Bidon15/piggybank/blob/master/frontend/src/components/PiggyBank.tsx
https://github.com/Bidon15/piggybank/blob/master/hardhat.config.ts
https://github.com/Bidon15/piggybank/blob/master/scripts/deploy.ts

Is it really an issue or what am I getting wrong?

Property 'deploy' in type 'Greeter__factory' is not assignable to the same property in base type 'ContractFactory'.

Just starting with a brand new project, using JS (not typescript) and am hitting this problem when running yarn start:

TypeScript error in /frontend/src/hardhat/typechain/factories/Greeter__factory.ts(16,3):

Property 'deploy' in type 'Greeter__factory' is not assignable to the same property in base type 'ContractFactory'.
  Type '(_greeting: string, overrides?: Overrides | undefined) => Promise<Greeter>' is not assignable to type '(...args: any[]) => Promise<Contract>'.
    Type 'Promise<Greeter>' is not assignable to type 'Promise<Contract>'.
      Type 'Greeter' is not assignable to type 'Contract'.
        The types returned by 'queryFilter(...)' are incompatible between these types.
          Type 'Promise<TypedEvent<unknown>[]>' is not assignable to type 'Promise<Event[]>'.
            Type 'TypedEvent<unknown>[]' is not assignable to type 'Event[]'.
              Type 'TypedEvent<unknown>' is not assignable to type 'Event'.
                Types of property 'args' are incompatible.
                  Type 'unknown' is not assignable to type 'Result | undefined'.
                    Type 'unknown' is not assignable to type 'Result'.  TS2416

here is how I installed:

nvm use 16
npm install --save-dev @symfoni/hardhat-react
npm install --save-dev hardhat hardhat-deploy hardhat-deploy-ethers hardhat-typechain hardhat-typechain ts-morph ts-node typescript ts-generator typechain typechain-target-ethers-v5
npx hardhat // (chose advanced project, javascript)
// added all the reqs to hardhat.config.js
npx create-react-app frontend
npx hardhat react
npx hardhat node --watch&
cd frontend
nvm use 16
npm install --save ethers web3modal
npm i --save-dev @types/react
yarn start

Error: call revert exception

Hi teams.

I followed up your document but i got the issue like below picture
image

//harhat.config.ts

import * as dotenv from "dotenv";

import { HardhatUserConfig, task } from "hardhat/config";
import "@nomiclabs/hardhat-etherscan";
import "@nomiclabs/hardhat-waffle";
import "@typechain/hardhat";
import "hardhat-gas-reporter";
import "solidity-coverage";

import "@nomiclabs/hardhat-ethers";
import "hardhat-deploy-ethers";
import "hardhat-deploy";
import "@symfoni/hardhat-react";
import "@typechain/ethers-v5";

dotenv.config();

// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
  const accounts = await hre.ethers.getSigners();

  for (const account of accounts) {
    console.log(account.address);
  }
});

// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more

const config: HardhatUserConfig = {
  solidity: "0.8.4",
  networks: {
    ropsten: {
      // url: process.env.ROPSTEN_URL || "",
      url: "https://api.baobab.klaytn.net:8651",
      accounts:
        process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
    },
  },
  gasReporter: {
    enabled: process.env.REPORT_GAS !== undefined,
    currency: "USD",
  },
  etherscan: {
    apiKey: process.env.ETHERSCAN_API_KEY,
  },
};

export default config;

I set up the config at the hardhat.config.ts

I tried to follow up your hardhat-react-boilerplate repo. But i got the same issue.

And then i searched at the google about it, there are same problem like me. To solve it, it is likely network issue.

How can i solve the issue?

Contract Context not being generated in SyfoniContext. Latest HardHat w/ NextJS

Support multiple instances deployed as proxies of the same contract

Support multiple instances deployed as proxies of the same contract. Hardhat-react have trouble parsing such deployments.

Say I have a Token.sol and I deploy 3 instances of it, which are TokenA, TokenB, and TokenC. Last time I checked, the hardhat-deploy will generate a Token.json and have TokenA, TokenB, TokenC, and their addresses inside the same JSON file. While hardhat-react only looked for the JSON files to create corresponding contract instances, it will only have Token component generated without any instance.

My workaround is to explicitly create contracts TokenA, TokenB, and TokenC inheriting from Token, and then deploy each of them to have TokenA.json, TokenB.json, TokenC.json generated respectively.

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.