From eb798662dbeddc8e02e28db41cf14a45aa60323d Mon Sep 17 00:00:00 2001 From: Krzysztof Kaczor Date: Tue, 28 Apr 2020 22:24:12 +0200 Subject: [PATCH] Add Ethers-v4 example --- examples/ethers-v4/README.md | 11 + examples/ethers-v4/abi/dai.json | 277 +++++++++ examples/ethers-v4/package.json | 22 + examples/ethers-v4/src/index.ts | 24 + examples/ethers-v4/tsconfig.json | 11 + .../ethers-v4/types/ethers-contracts/Dai.d.ts | 393 ++++++++++++ .../types/ethers-contracts/DaiFactory.ts | 577 ++++++++++++++++++ .../types/ethers-contracts/index.d.ts | 27 + examples/ethers-v4/yarn.lock | 472 ++++++++++++++ 9 files changed, 1814 insertions(+) create mode 100644 examples/ethers-v4/README.md create mode 100644 examples/ethers-v4/abi/dai.json create mode 100644 examples/ethers-v4/package.json create mode 100644 examples/ethers-v4/src/index.ts create mode 100644 examples/ethers-v4/tsconfig.json create mode 100644 examples/ethers-v4/types/ethers-contracts/Dai.d.ts create mode 100644 examples/ethers-v4/types/ethers-contracts/DaiFactory.ts create mode 100644 examples/ethers-v4/types/ethers-contracts/index.d.ts create mode 100644 examples/ethers-v4/yarn.lock diff --git a/examples/ethers-v4/README.md b/examples/ethers-v4/README.md new file mode 100644 index 000000000..530d7bed1 --- /dev/null +++ b/examples/ethers-v4/README.md @@ -0,0 +1,11 @@ +# TypeChain x Web3 v1 example + +## Running + +```sh +yarn # it will automatically run TypeChain types generation + +# yarn generate-types to manually regenerate them + +yarn start +``` diff --git a/examples/ethers-v4/abi/dai.json b/examples/ethers-v4/abi/dai.json new file mode 100644 index 000000000..ee0d4c48f --- /dev/null +++ b/examples/ethers-v4/abi/dai.json @@ -0,0 +1,277 @@ +[ + + { + "inputs": [{ "internalType": "uint256", "name": "chainId_", "type": "uint256" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "src", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "guy", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "wad", "type": "uint256" } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": true, + "inputs": [ + { "indexed": true, "internalType": "bytes4", "name": "sig", "type": "bytes4" }, + { "indexed": true, "internalType": "address", "name": "usr", "type": "address" }, + { "indexed": true, "internalType": "bytes32", "name": "arg1", "type": "bytes32" }, + { "indexed": true, "internalType": "bytes32", "name": "arg2", "type": "bytes32" }, + { "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "LogNote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "src", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "dst", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "wad", "type": "uint256" } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "PERMIT_TYPEHASH", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "usr", "type": "address" }, + { "internalType": "uint256", "name": "wad", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "usr", "type": "address" }, + { "internalType": "uint256", "name": "wad", "type": "uint256" } + ], + "name": "burn", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "guy", "type": "address" }], + "name": "deny", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "usr", "type": "address" }, + { "internalType": "uint256", "name": "wad", "type": "uint256" } + ], + "name": "mint", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "src", "type": "address" }, + { "internalType": "address", "name": "dst", "type": "address" }, + { "internalType": "uint256", "name": "wad", "type": "uint256" } + ], + "name": "move", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "nonces", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "holder", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "nonce", "type": "uint256" }, + { "internalType": "uint256", "name": "expiry", "type": "uint256" }, + { "internalType": "bool", "name": "allowed", "type": "bool" }, + { "internalType": "uint8", "name": "v", "type": "uint8" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "s", "type": "bytes32" } + ], + "name": "permit", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "usr", "type": "address" }, + { "internalType": "uint256", "name": "wad", "type": "uint256" } + ], + "name": "pull", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "usr", "type": "address" }, + { "internalType": "uint256", "name": "wad", "type": "uint256" } + ], + "name": "push", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "address", "name": "guy", "type": "address" }], + "name": "rely", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "dst", "type": "address" }, + { "internalType": "uint256", "name": "wad", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "address", "name": "src", "type": "address" }, + { "internalType": "address", "name": "dst", "type": "address" }, + { "internalType": "uint256", "name": "wad", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "version", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "wards", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + } +] diff --git a/examples/ethers-v4/package.json b/examples/ethers-v4/package.json new file mode 100644 index 000000000..89124d889 --- /dev/null +++ b/examples/ethers-v4/package.json @@ -0,0 +1,22 @@ +{ + "name": "web3-v1", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "scripts": { + "generate-types": "typechain --target=ethers-v4 'abi/*.json'", + "postinstall": "yarn generate-types", + "start": "ts-node ./src/index.ts", + "typecheck": "tsc --noEmit" + }, + "devDependencies": { + "@typechain/ethers-v4": "^1.0.0-beta", + "@types/bn.js": "^4.11.6", + "ts-node": "^8.8.2", + "typechain": "^2.0.0-beta1", + "typescript": "^3.8.3" + }, + "dependencies": { + "ethers": "^4.0.47" + } +} diff --git a/examples/ethers-v4/src/index.ts b/examples/ethers-v4/src/index.ts new file mode 100644 index 000000000..aa1ac8c97 --- /dev/null +++ b/examples/ethers-v4/src/index.ts @@ -0,0 +1,24 @@ +import * as ethers from 'ethers' +import { Dai } from '../types/ethers-contracts/Dai' + +const abi = require('../abi/dai.json') + +const RPC_HOST = 'https://mainnet.infura.io/v3/6d6c70e65c77429482df5b64a4d0c943' +const DAI_ADDRESS = '0x6B175474E89094C44Da98b954EedeAC495271d0F' + +async function main() { + const provider = new ethers.providers.JsonRpcProvider(RPC_HOST) + const formatEther = ethers.utils.formatEther + + const dai = (new ethers.Contract(DAI_ADDRESS, abi, provider) as any) as Dai + const balance = await dai.functions.balanceOf('0x70b144972C5Ef6CB941A5379240B74239c418CD4') + + console.log(`Our DAI balance is: ${formatEther(balance)}`) + + dai.interface.events.Transfer +} + +main().catch(e => { + console.error(e) + process.exit(1) +}) diff --git a/examples/ethers-v4/tsconfig.json b/examples/ethers-v4/tsconfig.json new file mode 100644 index 000000000..9c3fe515c --- /dev/null +++ b/examples/ethers-v4/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "lib": ["ES2018", "DOM"], + "module": "CommonJS", + "moduleResolution": "node", + "strict": true, + "target": "ES2018", + "sourceMap": true, + "esModuleInterop": true + } +} diff --git a/examples/ethers-v4/types/ethers-contracts/Dai.d.ts b/examples/ethers-v4/types/ethers-contracts/Dai.d.ts new file mode 100644 index 000000000..4164d8e14 --- /dev/null +++ b/examples/ethers-v4/types/ethers-contracts/Dai.d.ts @@ -0,0 +1,393 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import { Contract, ContractTransaction, EventFilter, Signer } from "ethers"; +import { Listener, Provider } from "ethers/providers"; +import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils"; +import { + TransactionOverrides, + TypedEventDescription, + TypedFunctionDescription +} from "."; + +interface DaiInterface extends Interface { + functions: { + DOMAIN_SEPARATOR: TypedFunctionDescription<{ encode([]: []): string }>; + + PERMIT_TYPEHASH: TypedFunctionDescription<{ encode([]: []): string }>; + + allowance: TypedFunctionDescription<{ + encode([,]: [string, string]): string; + }>; + + approve: TypedFunctionDescription<{ + encode([usr, wad]: [string, BigNumberish]): string; + }>; + + balanceOf: TypedFunctionDescription<{ encode([]: [string]): string }>; + + burn: TypedFunctionDescription<{ + encode([usr, wad]: [string, BigNumberish]): string; + }>; + + decimals: TypedFunctionDescription<{ encode([]: []): string }>; + + deny: TypedFunctionDescription<{ encode([guy]: [string]): string }>; + + mint: TypedFunctionDescription<{ + encode([usr, wad]: [string, BigNumberish]): string; + }>; + + move: TypedFunctionDescription<{ + encode([src, dst, wad]: [string, string, BigNumberish]): string; + }>; + + name: TypedFunctionDescription<{ encode([]: []): string }>; + + nonces: TypedFunctionDescription<{ encode([]: [string]): string }>; + + permit: TypedFunctionDescription<{ + encode([holder, spender, nonce, expiry, allowed, v, r, s]: [ + string, + string, + BigNumberish, + BigNumberish, + boolean, + BigNumberish, + Arrayish, + Arrayish + ]): string; + }>; + + pull: TypedFunctionDescription<{ + encode([usr, wad]: [string, BigNumberish]): string; + }>; + + push: TypedFunctionDescription<{ + encode([usr, wad]: [string, BigNumberish]): string; + }>; + + rely: TypedFunctionDescription<{ encode([guy]: [string]): string }>; + + symbol: TypedFunctionDescription<{ encode([]: []): string }>; + + totalSupply: TypedFunctionDescription<{ encode([]: []): string }>; + + transfer: TypedFunctionDescription<{ + encode([dst, wad]: [string, BigNumberish]): string; + }>; + + transferFrom: TypedFunctionDescription<{ + encode([src, dst, wad]: [string, string, BigNumberish]): string; + }>; + + version: TypedFunctionDescription<{ encode([]: []): string }>; + + wards: TypedFunctionDescription<{ encode([]: [string]): string }>; + }; + + events: { + Approval: TypedEventDescription<{ + encodeTopics([src, guy, wad]: [ + string | null, + string | null, + null + ]): string[]; + }>; + + LogNote: TypedEventDescription<{ + encodeTopics([sig, usr, arg1, arg2, data]: [ + Arrayish | null, + string | null, + Arrayish | null, + Arrayish | null, + null + ]): string[]; + }>; + + Transfer: TypedEventDescription<{ + encodeTopics([src, dst, wad]: [ + string | null, + string | null, + null + ]): string[]; + }>; + }; +} + +export class Dai extends Contract { + connect(signerOrProvider: Signer | Provider | string): Dai; + attach(addressOrName: string): Dai; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): Dai; + once(event: EventFilter | string, listener: Listener): Dai; + addListener(eventName: EventFilter | string, listener: Listener): Dai; + removeAllListeners(eventName: EventFilter | string): Dai; + removeListener(eventName: any, listener: Listener): Dai; + + interface: DaiInterface; + + functions: { + DOMAIN_SEPARATOR(): Promise; + + PERMIT_TYPEHASH(): Promise; + + allowance(arg0: string, arg1: string): Promise; + + approve( + usr: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + balanceOf(arg0: string): Promise; + + burn( + usr: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(): Promise; + + deny( + guy: string, + overrides?: TransactionOverrides + ): Promise; + + mint( + usr: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + move( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + name(): Promise; + + nonces(arg0: string): Promise; + + permit( + holder: string, + spender: string, + nonce: BigNumberish, + expiry: BigNumberish, + allowed: boolean, + v: BigNumberish, + r: Arrayish, + s: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + pull( + usr: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + push( + usr: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + rely( + guy: string, + overrides?: TransactionOverrides + ): Promise; + + symbol(): Promise; + + totalSupply(): Promise; + + transfer( + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + version(): Promise; + + wards(arg0: string): Promise; + }; + + DOMAIN_SEPARATOR(): Promise; + + PERMIT_TYPEHASH(): Promise; + + allowance(arg0: string, arg1: string): Promise; + + approve( + usr: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + balanceOf(arg0: string): Promise; + + burn( + usr: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(): Promise; + + deny( + guy: string, + overrides?: TransactionOverrides + ): Promise; + + mint( + usr: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + move( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + name(): Promise; + + nonces(arg0: string): Promise; + + permit( + holder: string, + spender: string, + nonce: BigNumberish, + expiry: BigNumberish, + allowed: boolean, + v: BigNumberish, + r: Arrayish, + s: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + pull( + usr: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + push( + usr: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + rely( + guy: string, + overrides?: TransactionOverrides + ): Promise; + + symbol(): Promise; + + totalSupply(): Promise; + + transfer( + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + version(): Promise; + + wards(arg0: string): Promise; + + filters: { + Approval(src: string | null, guy: string | null, wad: null): EventFilter; + + LogNote( + sig: Arrayish | null, + usr: string | null, + arg1: Arrayish | null, + arg2: Arrayish | null, + data: null + ): EventFilter; + + Transfer(src: string | null, dst: string | null, wad: null): EventFilter; + }; + + estimate: { + DOMAIN_SEPARATOR(): Promise; + + PERMIT_TYPEHASH(): Promise; + + allowance(arg0: string, arg1: string): Promise; + + approve(usr: string, wad: BigNumberish): Promise; + + balanceOf(arg0: string): Promise; + + burn(usr: string, wad: BigNumberish): Promise; + + decimals(): Promise; + + deny(guy: string): Promise; + + mint(usr: string, wad: BigNumberish): Promise; + + move(src: string, dst: string, wad: BigNumberish): Promise; + + name(): Promise; + + nonces(arg0: string): Promise; + + permit( + holder: string, + spender: string, + nonce: BigNumberish, + expiry: BigNumberish, + allowed: boolean, + v: BigNumberish, + r: Arrayish, + s: Arrayish + ): Promise; + + pull(usr: string, wad: BigNumberish): Promise; + + push(usr: string, wad: BigNumberish): Promise; + + rely(guy: string): Promise; + + symbol(): Promise; + + totalSupply(): Promise; + + transfer(dst: string, wad: BigNumberish): Promise; + + transferFrom( + src: string, + dst: string, + wad: BigNumberish + ): Promise; + + version(): Promise; + + wards(arg0: string): Promise; + }; +} diff --git a/examples/ethers-v4/types/ethers-contracts/DaiFactory.ts b/examples/ethers-v4/types/ethers-contracts/DaiFactory.ts new file mode 100644 index 000000000..18ea9a93f --- /dev/null +++ b/examples/ethers-v4/types/ethers-contracts/DaiFactory.ts @@ -0,0 +1,577 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "ethers/providers"; + +import { Dai } from "./Dai"; + +export class DaiFactory { + static connect(address: string, signerOrProvider: Signer | Provider): Dai { + return new Contract(address, _abi, signerOrProvider) as Dai; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "uint256", + name: "chainId_", + type: "uint256" + } + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "src", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "guy", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "wad", + type: "uint256" + } + ], + name: "Approval", + type: "event" + }, + { + anonymous: true, + inputs: [ + { + indexed: true, + internalType: "bytes4", + name: "sig", + type: "bytes4" + }, + { + indexed: true, + internalType: "address", + name: "usr", + type: "address" + }, + { + indexed: true, + internalType: "bytes32", + name: "arg1", + type: "bytes32" + }, + { + indexed: true, + internalType: "bytes32", + name: "arg2", + type: "bytes32" + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes" + } + ], + name: "LogNote", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "src", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "dst", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "wad", + type: "uint256" + } + ], + name: "Transfer", + type: "event" + }, + { + constant: true, + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + constant: true, + inputs: [], + name: "PERMIT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address" + }, + { + internalType: "address", + name: "", + type: "address" + } + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "usr", + type: "address" + }, + { + internalType: "uint256", + name: "wad", + type: "uint256" + } + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + payable: false, + stateMutability: "nonpayable", + type: "function" + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address" + } + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "usr", + type: "address" + }, + { + internalType: "uint256", + name: "wad", + type: "uint256" + } + ], + name: "burn", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function" + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "guy", + type: "address" + } + ], + name: "deny", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function" + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "usr", + type: "address" + }, + { + internalType: "uint256", + name: "wad", + type: "uint256" + } + ], + name: "mint", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function" + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "src", + type: "address" + }, + { + internalType: "address", + name: "dst", + type: "address" + }, + { + internalType: "uint256", + name: "wad", + type: "uint256" + } + ], + name: "move", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function" + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address" + } + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "holder", + type: "address" + }, + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256" + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256" + }, + { + internalType: "bool", + name: "allowed", + type: "bool" + }, + { + internalType: "uint8", + name: "v", + type: "uint8" + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32" + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32" + } + ], + name: "permit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function" + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "usr", + type: "address" + }, + { + internalType: "uint256", + name: "wad", + type: "uint256" + } + ], + name: "pull", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function" + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "usr", + type: "address" + }, + { + internalType: "uint256", + name: "wad", + type: "uint256" + } + ], + name: "push", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function" + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "guy", + type: "address" + } + ], + name: "rely", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function" + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "dst", + type: "address" + }, + { + internalType: "uint256", + name: "wad", + type: "uint256" + } + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + payable: false, + stateMutability: "nonpayable", + type: "function" + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "src", + type: "address" + }, + { + internalType: "address", + name: "dst", + type: "address" + }, + { + internalType: "uint256", + name: "wad", + type: "uint256" + } + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + payable: false, + stateMutability: "nonpayable", + type: "function" + }, + { + constant: true, + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + payable: false, + stateMutability: "view", + type: "function" + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address" + } + ], + name: "wards", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + payable: false, + stateMutability: "view", + type: "function" + } +]; diff --git a/examples/ethers-v4/types/ethers-contracts/index.d.ts b/examples/ethers-v4/types/ethers-contracts/index.d.ts new file mode 100644 index 000000000..93c86106f --- /dev/null +++ b/examples/ethers-v4/types/ethers-contracts/index.d.ts @@ -0,0 +1,27 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ +import { + BigNumberish, + EventDescription, + FunctionDescription +} from "ethers/utils"; + +export class TransactionOverrides { + nonce?: BigNumberish | Promise; + gasLimit?: BigNumberish | Promise; + gasPrice?: BigNumberish | Promise; + value?: BigNumberish | Promise; + chainId?: number | Promise; +} + +export interface TypedEventDescription< + T extends Pick +> extends EventDescription { + encodeTopics: T["encodeTopics"]; +} + +export interface TypedFunctionDescription< + T extends Pick +> extends FunctionDescription { + encode: T["encode"]; +} diff --git a/examples/ethers-v4/yarn.lock b/examples/ethers-v4/yarn.lock new file mode 100644 index 000000000..0e2e8d60a --- /dev/null +++ b/examples/ethers-v4/yarn.lock @@ -0,0 +1,472 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@typechain/ethers-v4@^1.0.0-beta": + version "1.0.0-beta" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v4/-/ethers-v4-1.0.0-beta.tgz#7c9b530c77d3f939c4945a958d7da42f5d85a814" + integrity sha512-+yg+65UFRJrGnzCpcinK7dYh6HV1G3GkymBriCJsY+eqPk/VXDdYdzTV8KRCDVRbKS6F5kfZg/mLNjuza6JhiA== + +"@types/bn.js@^4.11.6": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + +"@types/mkdirp@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.5.2.tgz#503aacfe5cc2703d5484326b1b27efa67a339c1f" + integrity sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg== + dependencies: + "@types/node" "*" + +"@types/node@*": + version "13.11.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.11.1.tgz#49a2a83df9d26daacead30d0ccc8762b128d53c7" + integrity sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g== + +"@types/prettier@^1.13.2": + version "1.19.1" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f" + integrity sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ== + +"@types/resolve@^0.0.8": + version "0.0.8" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" + integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== + dependencies: + "@types/node" "*" + +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +array-back@^1.0.3, array-back@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.4.tgz#644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b" + integrity sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs= + dependencies: + typical "^2.6.0" + +array-back@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-2.0.0.tgz#6877471d51ecc9c9bfa6136fb6c7d5fe69748022" + integrity sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw== + dependencies: + typical "^2.6.1" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +chalk@^2.4.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +command-line-args@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-4.0.7.tgz#f8d1916ecb90e9e121eda6428e41300bfb64cc46" + integrity sha512-aUdPvQRAyBvQd2n7jXcsMDz68ckBJELXNzBybCHOibUWEg0mWTnaYCSRU8h9R+aNRSvDihJtssSRCiDRpLaezA== + dependencies: + array-back "^2.0.0" + find-replace "^1.0.3" + typical "^2.6.1" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +debug@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +elliptic@6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" + integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +ethers@^4.0.47: + version "4.0.47" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.47.tgz#91b9cd80473b1136dd547095ff9171bd1fc68c85" + integrity sha512-hssRYhngV4hiDNeZmVU/k5/E8xmLG8UpcNUzg6mb7lqhgpFPH/t7nuv20RjRrEf0gblzvi2XwR5Te+V3ZFc9pQ== + dependencies: + aes-js "3.0.0" + bn.js "^4.4.0" + elliptic "6.5.2" + hash.js "1.1.3" + js-sha3 "0.5.7" + scrypt-js "2.0.4" + setimmediate "1.0.4" + uuid "2.0.1" + xmlhttprequest "1.8.0" + +find-replace@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-1.0.3.tgz#b88e7364d2d9c959559f388c66670d6130441fa0" + integrity sha1-uI5zZNLZyVlVnziMZmcNYTBEH6A= + dependencies: + array-back "^1.0.4" + test-value "^2.1.0" + +fs-extra@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +glob@^7.1.2: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +hash.js@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +js-sha3@0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" + integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= + +js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + +lodash@^4.17.15: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +mkdirp@^0.5.1: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +prettier@^1.14.2: + version "1.19.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== + +resolve@^1.8.1: + version "1.15.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" + integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== + dependencies: + path-parse "^1.0.6" + +scrypt-js@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" + integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== + +setimmediate@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" + integrity sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48= + +source-map-support@^0.5.6: + version "0.5.16" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" + integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +test-value@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291" + integrity sha1-Edpv9nDzRxpztiXKTz/c97t0gpE= + dependencies: + array-back "^1.0.3" + typical "^2.6.0" + +ts-essentials@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-1.0.4.tgz#ce3b5dade5f5d97cf69889c11bf7d2da8555b15a" + integrity sha512-q3N1xS4vZpRouhYHDPwO0bDW3EZ6SK9CrrDHxi/D6BPReSjpVgWIOpLS2o0gSBZm+7q/wyKp6RVM1AeeW7uyfQ== + +ts-essentials@^6.0.3: + version "6.0.4" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-6.0.4.tgz#d36055bf0a7620b1338da6aafd2268787e208aab" + integrity sha512-ZtU9zgSnn8DcAxDZY1DJF8rnxsen8M0IVkO7dVB5fTEOVs7o/0RA4V6i99PIg99bpX81Sgb0FCLjQqD5Ufz3rQ== + +ts-generator@^0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/ts-generator/-/ts-generator-0.0.8.tgz#7bd48ca064db026d9520bcb682b69efc20971d6a" + integrity sha512-Gi+aZCELpVL7Mqb+GuMgM+n8JZ/arZZib1iD/R9Ok8JDjOCOCrqS9b1lr72ku7J45WeDCFZxyJoRsiQvhokCnw== + dependencies: + "@types/mkdirp" "^0.5.2" + "@types/prettier" "^1.13.2" + "@types/resolve" "^0.0.8" + chalk "^2.4.1" + glob "^7.1.2" + mkdirp "^0.5.1" + prettier "^1.14.2" + resolve "^1.8.1" + ts-essentials "^1.0.0" + +ts-node@^8.8.2: + version "8.8.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.8.2.tgz#0b39e690bee39ea5111513a9d2bcdc0bc121755f" + integrity sha512-duVj6BpSpUpD/oM4MfhO98ozgkp3Gt9qIp3jGxwU2DFvl/3IRaEAvbLa8G60uS7C77457e/m5TMowjedeRxI1Q== + dependencies: + arg "^4.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.6" + yn "3.1.1" + +typechain@^2.0.0-beta1: + version "2.0.0-beta1" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-2.0.0-beta1.tgz#38d7cd3e6c57ae7f0a53915599c1102e10faa4af" + integrity sha512-B3RPy31MTkETWSidUUVHdYd5Xjp01f2E0IyY0r7eEbg5lz9QukJJp4qvJtjeWq5FXQYV4K7wTrYt0NGBl2Qofw== + dependencies: + command-line-args "^4.0.7" + debug "^4.1.1" + fs-extra "^7.0.0" + js-sha3 "^0.8.0" + lodash "^4.17.15" + ts-essentials "^6.0.3" + ts-generator "^0.0.8" + +typescript@^3.8.3: + version "3.8.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" + integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== + +typical@^2.6.0, typical@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d" + integrity sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0= + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +uuid@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" + integrity sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w= + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +xmlhttprequest@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" + integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==