Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typechain

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typechain - npm Package Compare versions

Comparing version 0.3.7 to 0.3.8

dist/targets/ethers/generation.d.ts

5

CHANGELOG.md
# Changelog
## [0.3.8] - 2018-10-21
### Added
- Support for ethers.js library
- [Truffle] update `truffle-typings` dependency, extend common ContractInstance type, other small fixes
## [0.3.7] - 2018-10-20

@@ -4,0 +9,0 @@ ### Added

2

dist/index.d.ts
import { TsGeneratorPlugin, TFileDesc, TContext, TOutput } from "ts-generator";
export declare type TTypechainTarget = "truffle" | "web3-1.0.0" | "legacy";
export declare type TTypechainTarget = "truffle" | "web3-1.0.0" | "legacy" | "ethers";
export interface ITypechainCfg {

@@ -4,0 +4,0 @@ target: TTypechainTarget;

@@ -7,2 +7,3 @@ "use strict";

const web3_1 = require("./targets/web3");
const ethers_1 = require("./targets/ethers");
/**

@@ -25,2 +26,4 @@ * Proxies calls to real implementation that is selected based on target parameter.

return new web3_1.Web3(ctx);
case "ethers":
return new ethers_1.Ethers(ctx);
case undefined:

@@ -27,0 +30,0 @@ throw new Error(`Please provide --target parameter!`);

@@ -45,4 +45,4 @@ "use strict";

return `
export interface ${c.name}Instance {
${c.constantFunctions.map(generateFunction).join("\n")}
export interface ${c.name}Instance extends Truffle.ContractInstance {
${c.constantFunctions.map(generateConstantFunction).join("\n")}
${c.functions.map(generateFunction).join("\n")}

@@ -55,2 +55,7 @@ ${c.constants.map(generateConstants).join("\n")}

return `
${fn.name}(${generateInputTypes(fn.inputs)} txDetails?: Truffle.TransactionDetails): Promise<Truffle.TransactionResponse>;
`;
}
function generateConstantFunction(fn) {
return `
${fn.name}(${generateInputTypes(fn.inputs)} txDetails?: Truffle.TransactionDetails): Promise<${generateOutputTypes(fn.outputs)}>;

@@ -57,0 +62,0 @@ `;

@@ -11,3 +11,3 @@ {

],
"version": "0.3.7",
"version": "0.3.8",
"license": "MIT",

@@ -32,2 +32,3 @@ "repository": "https://github.com/ethereum-ts/Typechain",

"coveralls": "^3.0.2",
"ethers": "^4.0.7",
"ganache-cli": "^6.1.8",

@@ -44,3 +45,3 @@ "glob": "^7.1.2",

"truffle": "^4.1.14",
"truffle-typings": "^1.0.1",
"truffle-typings": "^1.0.4",
"ts-node": "^3.3.0",

@@ -47,0 +48,0 @@ "tslint": "^5.11.0",

@@ -28,3 +28,3 @@ <p align="center">

* IDE support - works with any IDE supporting Typescript
* works with multiple libraries - use `truffle`,`Web3.js 1.0`, `Web3.js 0.20.x`
* works with multiple libraries - use `truffle`,`Web3.js 1.0`, `ethers.js`, `Web3.js 0.20.x`
* frictionless - works with simple, JSON ABI files as well as with Truffle style ABIs

@@ -52,3 +52,3 @@

"**/*.json"`
* `--target` - `truffle`, `web3-1.0.0` or `legacy`
* `--target` - `truffle`, `web3-1.0.0`, `ethers` or `legacy`
* `--outDir` - put all generated files to a specific dir

@@ -130,2 +130,6 @@

### Ethers.js
Use `ethers` target to generate wrappers for [ethers.js](https://github.com/ethers-io/ethers.js/) lib.
### Legacy (Web3 0.2.x)

@@ -132,0 +136,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc