Parcourir la source

Merge pull request #115 from Janther/main

Generates fresh types after clean
Paul Razvan Berg il y a 3 ans
Parent
commit
87408a83b6
6 fichiers modifiés avec 227 ajouts et 744 suppressions
  1. 14 14
      package.json
  2. 27 18
      src/types/Greeter.ts
  3. 4 0
      src/types/common.ts
  4. 9 6
      src/types/factories/Greeter__factory.ts
  5. 4 4
      src/types/hardhat.d.ts
  6. 169 702
      yarn.lock

+ 14 - 14
package.json

@@ -7,9 +7,9 @@
     "url": "https://github.com/paulrberg"
   },
   "devDependencies": {
-    "@commitlint/cli": "^17.0.2",
-    "@commitlint/config-conventional": "^17.0.2",
-    "@ethersproject/abi": "^5.6.3",
+    "@commitlint/cli": "^17.0.3",
+    "@commitlint/config-conventional": "^17.0.3",
+    "@ethersproject/abi": "^5.6.4",
     "@ethersproject/abstract-signer": "^5.6.2",
     "@ethersproject/bignumber": "^5.6.2",
     "@ethersproject/bytes": "^5.6.1",
@@ -19,31 +19,31 @@
     "@nomiclabs/hardhat-waffle": "^2.0.3",
     "@trivago/prettier-plugin-sort-imports": "^3.2.0",
     "@typechain/ethers-v5": "^10.1.0",
-    "@typechain/hardhat": "^6.1.0",
+    "@typechain/hardhat": "^6.1.2",
     "@types/chai": "^4.3.1",
     "@types/fs-extra": "^9.0.13",
     "@types/mocha": "^9.1.1",
-    "@types/node": "^17.0.42",
-    "@typescript-eslint/eslint-plugin": "^5.27.1",
-    "@typescript-eslint/parser": "^5.27.1",
+    "@types/node": "^18.0.0",
+    "@typescript-eslint/eslint-plugin": "^5.30.0",
+    "@typescript-eslint/parser": "^5.30.0",
     "chai": "^4.3.6",
     "commitizen": "^4.2.4",
     "cross-env": "^7.0.3",
     "cz-conventional-changelog": "^3.3.0",
     "dotenv": "^16.0.1",
-    "eslint": "^8.17.0",
+    "eslint": "^8.18.0",
     "eslint-config-prettier": "^8.5.0",
     "ethereum-waffle": "^3.4.4",
-    "ethers": "^5.6.8",
+    "ethers": "^5.6.9",
     "fs-extra": "^10.1.0",
     "hardhat": "^2.9.9",
     "hardhat-gas-reporter": "^1.0.8",
     "husky": "^8.0.1",
-    "lint-staged": "^13.0.1",
+    "lint-staged": "^13.0.3",
     "lodash": "^4.17.21",
     "mocha": "^10.0.0",
     "pinst": "^3.0.0",
-    "prettier": "^2.6.2",
+    "prettier": "^2.7.1",
     "prettier-plugin-solidity": "^1.0.0-dev.21",
     "shelljs": "^0.8.5",
     "shx": "^0.3.4",
@@ -53,7 +53,7 @@
     "ts-generator": "^0.1.1",
     "ts-node": "^10.8.1",
     "typechain": "^8.1.0",
-    "typescript": "^4.7.3"
+    "typescript": "^4.7.4"
   },
   "files": [
     "/contracts"
@@ -70,10 +70,10 @@
     "access": "public"
   },
   "scripts": {
-    "clean": "shx rm -rf ./artifacts ./cache ./coverage ./src/types ./coverage.json",
+    "clean": "shx rm -rf ./artifacts ./cache ./coverage ./src/types ./coverage.json && yarn typechain",
     "commit": "git-cz",
     "compile": "cross-env TS_NODE_TRANSPILE_ONLY=true hardhat compile",
-    "coverage": "yarn typechain && hardhat coverage --solcoverjs ./.solcover.js --temp artifacts --testfiles \"test/**/*.ts\" && yarn typechain",
+    "coverage": "hardhat coverage --solcoverjs ./.solcover.js --temp artifacts --testfiles \"test/**/*.ts\" && yarn typechain",
     "deploy": "hardhat deploy:Greeter",
     "lint": "yarn lint:sol && yarn lint:ts && yarn prettier:check",
     "lint:sol": "solhint --config ./.solhint.json --max-warnings 0 \"contracts/**/*.sol\"",

+ 27 - 18
src/types/Greeter.ts

@@ -1,6 +1,17 @@
 /* Autogenerated file. Do not edit manually. */
+
 /* tslint:disable */
+
 /* eslint-disable */
+import type {
+  TypedEventFilter,
+  TypedEvent,
+  TypedListener,
+  OnEvent,
+  PromiseOrValue,
+} from "./common";
+import type { FunctionFragment, Result } from "@ethersproject/abi";
+import type { Listener, Provider } from "@ethersproject/providers";
 import type {
   BaseContract,
   BigNumber,
@@ -12,14 +23,6 @@ import type {
   Signer,
   utils,
 } from "ethers";
-import type { FunctionFragment, Result } from "@ethersproject/abi";
-import type { Listener, Provider } from "@ethersproject/providers";
-import type {
-  TypedEventFilter,
-  TypedEvent,
-  TypedListener,
-  OnEvent,
-} from "./common";
 
 export interface GreeterInterface extends utils.Interface {
   functions: {
@@ -35,7 +38,10 @@ export interface GreeterInterface extends utils.Interface {
 
   encodeFunctionData(functionFragment: "greet", values?: undefined): string;
   encodeFunctionData(functionFragment: "greeting", values?: undefined): string;
-  encodeFunctionData(functionFragment: "setGreeting", values: [string]): string;
+  encodeFunctionData(
+    functionFragment: "setGreeting",
+    values: [PromiseOrValue<string>]
+  ): string;
   encodeFunctionData(
     functionFragment: "throwError",
     values?: undefined
@@ -84,8 +90,8 @@ export interface Greeter extends BaseContract {
     greeting(overrides?: CallOverrides): Promise<[string]>;
 
     setGreeting(
-      _greeting: string,
-      overrides?: Overrides & { from?: string | Promise<string> }
+      _greeting: PromiseOrValue<string>,
+      overrides?: Overrides & { from?: PromiseOrValue<string> }
     ): Promise<ContractTransaction>;
 
     throwError(overrides?: CallOverrides): Promise<[void]>;
@@ -96,8 +102,8 @@ export interface Greeter extends BaseContract {
   greeting(overrides?: CallOverrides): Promise<string>;
 
   setGreeting(
-    _greeting: string,
-    overrides?: Overrides & { from?: string | Promise<string> }
+    _greeting: PromiseOrValue<string>,
+    overrides?: Overrides & { from?: PromiseOrValue<string> }
   ): Promise<ContractTransaction>;
 
   throwError(overrides?: CallOverrides): Promise<void>;
@@ -107,7 +113,10 @@ export interface Greeter extends BaseContract {
 
     greeting(overrides?: CallOverrides): Promise<string>;
 
-    setGreeting(_greeting: string, overrides?: CallOverrides): Promise<void>;
+    setGreeting(
+      _greeting: PromiseOrValue<string>,
+      overrides?: CallOverrides
+    ): Promise<void>;
 
     throwError(overrides?: CallOverrides): Promise<void>;
   };
@@ -120,8 +129,8 @@ export interface Greeter extends BaseContract {
     greeting(overrides?: CallOverrides): Promise<BigNumber>;
 
     setGreeting(
-      _greeting: string,
-      overrides?: Overrides & { from?: string | Promise<string> }
+      _greeting: PromiseOrValue<string>,
+      overrides?: Overrides & { from?: PromiseOrValue<string> }
     ): Promise<BigNumber>;
 
     throwError(overrides?: CallOverrides): Promise<BigNumber>;
@@ -133,8 +142,8 @@ export interface Greeter extends BaseContract {
     greeting(overrides?: CallOverrides): Promise<PopulatedTransaction>;
 
     setGreeting(
-      _greeting: string,
-      overrides?: Overrides & { from?: string | Promise<string> }
+      _greeting: PromiseOrValue<string>,
+      overrides?: Overrides & { from?: PromiseOrValue<string> }
     ): Promise<PopulatedTransaction>;
 
     throwError(overrides?: CallOverrides): Promise<PopulatedTransaction>;

+ 4 - 0
src/types/common.ts

@@ -1,5 +1,7 @@
 /* Autogenerated file. Do not edit manually. */
+
 /* tslint:disable */
+
 /* eslint-disable */
 import type { Listener } from "@ethersproject/providers";
 import type { Event, EventFilter } from "ethers";
@@ -42,3 +44,5 @@ export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<
 export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any>
   ? Parameters<F["deploy"]>
   : never;
+
+export type PromiseOrValue<T> = T | Promise<T>;

+ 9 - 6
src/types/factories/Greeter__factory.ts

@@ -1,9 +1,12 @@
 /* Autogenerated file. Do not edit manually. */
+
 /* tslint:disable */
+
 /* eslint-disable */
-import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
-import type { Provider, TransactionRequest } from "@ethersproject/providers";
 import type { Greeter, GreeterInterface } from "../Greeter";
+import type { PromiseOrValue } from "../common";
+import type { Provider, TransactionRequest } from "@ethersproject/providers";
+import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
 
 const _abi = [
   {
@@ -91,14 +94,14 @@ export class Greeter__factory extends ContractFactory {
   }
 
   override deploy(
-    _greeting: string,
-    overrides?: Overrides & { from?: string | Promise<string> }
+    _greeting: PromiseOrValue<string>,
+    overrides?: Overrides & { from?: PromiseOrValue<string> }
   ): Promise<Greeter> {
     return super.deploy(_greeting, overrides || {}) as Promise<Greeter>;
   }
   override getDeployTransaction(
-    _greeting: string,
-    overrides?: Overrides & { from?: string | Promise<string> }
+    _greeting: PromiseOrValue<string>,
+    overrides?: Overrides & { from?: PromiseOrValue<string> }
   ): TransactionRequest {
     return super.getDeployTransaction(_greeting, overrides || {});
   }

+ 4 - 4
src/types/hardhat.d.ts

@@ -1,14 +1,14 @@
 /* Autogenerated file. Do not edit manually. */
+
 /* tslint:disable */
-/* eslint-disable */
 
-import { ethers } from "ethers";
+/* eslint-disable */
+import * as Contracts from ".";
 import {
   FactoryOptions,
   HardhatEthersHelpers as HardhatEthersHelpersBase,
 } from "@nomiclabs/hardhat-ethers/types";
-
-import * as Contracts from ".";
+import { ethers } from "ethers";
 
 declare module "hardhat/types/runtime" {
   interface HardhatEthersHelpers extends HardhatEthersHelpersBase {

Fichier diff supprimé car celui-ci est trop grand
+ 169 - 702
yarn.lock


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff