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.11 to 0.3.12

6

CHANGELOG.md
# Changelog
## [0.3.12] - 2019-03-13
- [Web3] Support for 1.0.0-beta.48. Drop using external types
## [0.3.11] - 2019-01-14
- [Ethers] Support for overrides
## [0.3.10] - 2018-12-23

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

38

dist/targets/web3/generation.js

@@ -6,16 +6,10 @@ "use strict";

const template = `
import Contract, { CustomOptions, contractOptions } from "web3/eth/contract";
import { TransactionObject, BlockType } from "web3/eth/types";
import { Callback, EventLog } from "web3/types";
import { Contract, ContractOptions, Options } from "web3-eth-contract";
import { Block } from "web3-eth";
import { EventLog } from "web3-core";
import { EventEmitter } from "events";
import { Provider } from "web3/providers";
import { Callback, TransactionObject } from "./types";
export class ${contract.name} {
constructor(
jsonInterface: any[],
address?: string,
options?: CustomOptions
);
_address: string;
options: contractOptions;
export class ${contract.name} extends Contract {
constructor(jsonInterface: any[], address?: string, options?: ContractOptions);
methods: {

@@ -26,6 +20,2 @@ ${contract.constantFunctions.map(generateFunction).join("\n")}

};
deploy(options: {
data: string;
arguments: any[];
}): TransactionObject<Contract>;
events: {

@@ -36,3 +26,3 @@ ${contract.events.map(generateEvents).join("\n")}

filter?: object;
fromBlock?: BlockType;
fromBlock?: Block;
topics?: (null|string)[];

@@ -43,14 +33,2 @@ },

};
getPastEvents(
event: string,
options?: {
filter?: object;
fromBlock?: BlockType;
toBlock?: BlockType;
topics?: (null|string)[];
},
cb?: Callback<EventLog[]>
): Promise<EventLog[]>;
setProvider(provider: Provider): void;
clone(): ${contract.name};
}

@@ -93,3 +71,3 @@ `;

filter?: object;
fromBlock?: BlockType;
fromBlock?: Block;
topics?: (null|string)[];

@@ -96,0 +74,0 @@ },

@@ -10,2 +10,3 @@ import { TsGeneratorPlugin, TContext, TFileDesc } from "ts-generator";

transformFile(file: TFileDesc): TFileDesc | void;
afterRun(): TFileDesc[];
}

@@ -29,3 +29,22 @@ "use strict";

}
afterRun() {
return [
{
path: path_1.join(this.outDirAbs, "types.d.ts"),
contents: `
import { Transaction } from "web3-core";
// @ts-ignore
import PromiEvent from "web3-core-promievent";
export type Callback<T> = (error: Error, result: T) => void;
export interface TransactionObject<T> {
arguments: any[];
call(tx?: Transaction): Promise<T>;
send(tx?: Transaction): PromiEvent<T>;
estimateGas(tx?: Transaction): Promise<number>;
encodeABI(): string;
}`,
},
];
}
}
exports.Web3 = Web3;

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

],
"version": "0.3.11",
"version": "0.3.12",
"license": "MIT",

@@ -14,0 +14,0 @@ "repository": "https://github.com/ethereum-ts/Typechain",

@@ -20,4 +20,5 @@ {

"./test/integration/targets/truffle/**/*.ts",
"./test/integration/targets/web3-1.0.0/**/*"
"./test/integration/targets/web3-1.0.0/**/*",
"./test/package-test/**/*"
]
}
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