Skip to content

Commit

Permalink
Tweak readme badges
Browse files Browse the repository at this point in the history
  • Loading branch information
krzkaczor committed Dec 5, 2020
1 parent d5548a2 commit 6faff34
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 26 deletions.
30 changes: 19 additions & 11 deletions packages/target-ethers-v4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<p align="center">🔌 TypeScript bindings for Ethers 4.x.x smartcontracts</p>

<p align="center">
<a href="https://circleci.com/gh/ethereum-ts/TypeChain"><img alt="Build Status" src="https://circleci.com/gh/ethereum-ts/TypeChain/tree/master.svg?style=svg"></a>
<a href="https://github.com/ethereum-ts/TypeChain/actions"><img alt="Build Status" src="https://github.com/ethereum-ts/TypeChain/workflows/CI/badge.svg"></a>
<a href="https://coveralls.io/github/ethereum-ts/TypeChain?branch=master"><img alt="Coverage" src="https://coveralls.io/repos/github/ethereum-ts/TypeChain/badge.svg?branch=master"></a>
<img alt="Downloads" src="https://img.shields.io/npm/dm/typechain.svg">
<a href="https://github.com/prettier/prettier"><img alt="Prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg"></a>
Expand All @@ -22,21 +22,29 @@

## Contract typings

The main files generated by this target are `<contract-name>.d.ts`. They declare typesafe interfaces for your contracts on top of ethers `Contract` instances:
* typed contract's methods, available both at `contract.someMethod(...)` and `contract.functions.someMethod(...)`
* typed events in `contract.interface.events.AnEvent` and filters in `contract.filters.AnEvent`
* typed method gas estimates in `contract.estimate.someMethod`
* overrides for the event listener methods (`on`, `once`, etc) that return the same contract type.
The main files generated by this target are `<contract-name>.d.ts`. They declare typesafe interfaces for your contracts
on top of ethers `Contract` instances:

Note: these are just _type declarations_ to help you call the blockchain properly, so they're not available at runtime, and all of the contracts are still instances of the same `Contract` class.
- typed contract's methods, available both at `contract.someMethod(...)` and `contract.functions.someMethod(...)`
- typed events in `contract.interface.events.AnEvent` and filters in `contract.filters.AnEvent`
- typed method gas estimates in `contract.estimate.someMethod`
- overrides for the event listener methods (`on`, `once`, etc) that return the same contract type.

Note: these are just _type declarations_ to help you call the blockchain properly, so they're not available at runtime,
and all of the contracts are still instances of the same `Contract` class.

## Contract factories

This target also generates a concrete factory class for each contract, to help you deploy or connect to contract instances. The factory classes are an extension of ethers' `ContractFactory`. They serve two main purposes:
* wrap passing contract ABI and bytecode to the `ContractFactory` class, so you don't have to load and parse the JSON manually
* provide a correctly typed interface to `ContractFactory` (since it returns plain `Contract` instances).
This target also generates a concrete factory class for each contract, to help you deploy or connect to contract
instances. The factory classes are an extension of ethers' `ContractFactory`. They serve two main purposes:

- wrap passing contract ABI and bytecode to the `ContractFactory` class, so you don't have to load and parse the JSON
manually
- provide a correctly typed interface to `ContractFactory` (since it returns plain `Contract` instances).

Abstract contracts or solidity interfaces are handled a bit different, because they have no bytecode. For those, a simplified factory is generated that doesn't extends `ContractFactory`, and only includes the static `connect` method, so you can easily connect to a deployed instance without having to pass the ABI manually.
Abstract contracts or solidity interfaces are handled a bit different, because they have no bytecode. For those, a
simplified factory is generated that doesn't extends `ContractFactory`, and only includes the static `connect` method,
so you can easily connect to a deployed instance without having to pass the ABI manually.

## Basic example

Expand Down
33 changes: 21 additions & 12 deletions packages/target-ethers-v5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<p align="center">🔌 TypeScript bindings for Ethers 5.x.x smartcontracts</p>

<p align="center">
<a href="https://circleci.com/gh/ethereum-ts/TypeChain"><img alt="Build Status" src="https://circleci.com/gh/ethereum-ts/TypeChain/tree/master.svg?style=svg"></a>
<a href="https://github.com/ethereum-ts/TypeChain/actions"><img alt="Build Status" src="https://github.com/ethereum-ts/TypeChain/workflows/CI/badge.svg"></a>
<a href="https://coveralls.io/github/ethereum-ts/TypeChain?branch=master"><img alt="Coverage" src="https://coveralls.io/repos/github/ethereum-ts/TypeChain/badge.svg?branch=master"></a>
<img alt="Downloads" src="https://img.shields.io/npm/dm/typechain.svg">
<a href="https://github.com/prettier/prettier"><img alt="Prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg"></a>
Expand All @@ -18,27 +18,36 @@
</p>
</p>

This package requires TypeScript >= 3.8. If you need support for earlier TS versions check out: 1.0 version of this package.
This package requires TypeScript >= 3.8. If you need support for earlier TS versions check out: 1.0 version of this
package.

## [TypeChain readme](https://github.com/ethereum-ts/TypeChain)

## Contract typings

The main files generated by this target are `<contract-name>.d.ts`. They declare typesafe interfaces for your contracts on top of ethers `Contract` instances:
* typed contract's methods, available both at `contract.someMethod(...)` and `contract.functions.someMethod(...)`
* typed events in `contract.interface.events.AnEvent` and filters in `contract.filters.AnEvent`
* typed method gas estimates in `contract.estimateGas.someMethod`
* overrides for the event listener methods (`on`, `once`, etc) that return the same contract type.
The main files generated by this target are `<contract-name>.d.ts`. They declare typesafe interfaces for your contracts
on top of ethers `Contract` instances:

Note: these are just _type declarations_ to help you call the blockchain properly, so they're not available at runtime, and all of the contracts are still instances of the same `Contract` class.
- typed contract's methods, available both at `contract.someMethod(...)` and `contract.functions.someMethod(...)`
- typed events in `contract.interface.events.AnEvent` and filters in `contract.filters.AnEvent`
- typed method gas estimates in `contract.estimateGas.someMethod`
- overrides for the event listener methods (`on`, `once`, etc) that return the same contract type.

Note: these are just _type declarations_ to help you call the blockchain properly, so they're not available at runtime,
and all of the contracts are still instances of the same `Contract` class.

## Contract factories

This target also generates a concrete factory class for each contract, to help you deploy or connect to contract instances. The factory classes are an extension of ethers' `ContractFactory`. They serve two main purposes:
* wrap passing contract ABI and bytecode to the `ContractFactory` class, so you don't have to load and parse the JSON manually
* provide a correctly typed interface to `ContractFactory` (since it returns plain `Contract` instances).
This target also generates a concrete factory class for each contract, to help you deploy or connect to contract
instances. The factory classes are an extension of ethers' `ContractFactory`. They serve two main purposes:

- wrap passing contract ABI and bytecode to the `ContractFactory` class, so you don't have to load and parse the JSON
manually
- provide a correctly typed interface to `ContractFactory` (since it returns plain `Contract` instances).

Abstract contracts or solidity interfaces are handled a bit different, because they have no bytecode. For those, a simplified factory is generated that doesn't extends `ContractFactory`, and only includes the static `connect` method, so you can easily connect to a deployed instance without having to pass the ABI manually.
Abstract contracts or solidity interfaces are handled a bit different, because they have no bytecode. For those, a
simplified factory is generated that doesn't extends `ContractFactory`, and only includes the static `connect` method,
so you can easily connect to a deployed instance without having to pass the ABI manually.

## Basic example

Expand Down
2 changes: 1 addition & 1 deletion packages/target-truffle-v4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<p align="center">🔌 TypeScript bindings for Truffle 4.x.x smartcontracts</p>

<p align="center">
<a href="https://circleci.com/gh/ethereum-ts/TypeChain"><img alt="Build Status" src="https://circleci.com/gh/ethereum-ts/TypeChain/tree/master.svg?style=svg"></a>
<a href="https://github.com/ethereum-ts/TypeChain/actions"><img alt="Build Status" src="https://github.com/ethereum-ts/TypeChain/workflows/CI/badge.svg"></a>
<a href="https://coveralls.io/github/ethereum-ts/TypeChain?branch=master"><img alt="Coverage" src="https://coveralls.io/repos/github/ethereum-ts/TypeChain/badge.svg?branch=master"></a>
<img alt="Downloads" src="https://img.shields.io/npm/dm/typechain.svg">
<a href="https://github.com/prettier/prettier"><img alt="Prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg"></a>
Expand Down
2 changes: 1 addition & 1 deletion packages/target-truffle-v5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<p align="center">🔌 TypeScript bindings for Truffle 5.x.x smartcontracts</p>

<p align="center">
<a href="https://circleci.com/gh/ethereum-ts/TypeChain"><img alt="Build Status" src="https://circleci.com/gh/ethereum-ts/TypeChain/tree/master.svg?style=svg"></a>
<a href="https://github.com/ethereum-ts/TypeChain/actions"><img alt="Build Status" src="https://github.com/ethereum-ts/TypeChain/workflows/CI/badge.svg"></a>
<a href="https://coveralls.io/github/ethereum-ts/TypeChain?branch=master"><img alt="Coverage" src="https://coveralls.io/repos/github/ethereum-ts/TypeChain/badge.svg?branch=master"></a>
<img alt="Downloads" src="https://img.shields.io/npm/dm/typechain.svg">
<a href="https://github.com/prettier/prettier"><img alt="Prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg"></a>
Expand Down
2 changes: 1 addition & 1 deletion packages/target-web3-v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<p align="center">🔌 TypeScript bindings for Web3 1.x.x smartcontracts</p>

<p align="center">
<a href="https://circleci.com/gh/ethereum-ts/TypeChain"><img alt="Build Status" src="https://circleci.com/gh/ethereum-ts/TypeChain/tree/master.svg?style=svg"></a>
<a href="https://github.com/ethereum-ts/TypeChain/actions"><img alt="Build Status" src="https://github.com/ethereum-ts/TypeChain/workflows/CI/badge.svg"></a>
<a href="https://coveralls.io/github/ethereum-ts/TypeChain?branch=master"><img alt="Coverage" src="https://coveralls.io/repos/github/ethereum-ts/TypeChain/badge.svg?branch=master"></a>
<img alt="Downloads" src="https://img.shields.io/npm/dm/typechain.svg">
<a href="https://github.com/prettier/prettier"><img alt="Prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg"></a>
Expand Down

0 comments on commit 6faff34

Please sign in to comment.