Skip to content

Commit 2a7ce0e

Browse files
committed
merged master including transaction type 0 legacy constant (#1610).
2 parents 91fff14 + 8ba64af commit 2a7ce0e

File tree

329 files changed

+3034
-1404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

329 files changed

+3034
-1404
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@ Changelog
33

44
This change log is managed by `admin/cmds/update-versions` but may be manually updated.
55

6+
ethers/v5.3.1 (2021-06-10 18:28)
7+
--------------------------------
8+
9+
- Fixed replacement transaction detection for JsonRpcSigner. ([#1658](https://github.com/ethers-io/ethers.js/issues/1658); [ee82e86](https://github.com/ethers-io/ethers.js/commit/ee82e86ccc439825259d20825a00050217890ad3))
10+
- Added Matic testnet info to networks. ([#1546](https://github.com/ethers-io/ethers.js/issues/1546); [376cf3c](https://github.com/ethers-io/ethers.js/commit/376cf3cdbf6d2281331d36c5742414a425927318))
11+
- Match Solidity identifier regex. ([#1657](https://github.com/ethers-io/ethers.js/issues/1657); [a6e128f](https://github.com/ethers-io/ethers.js/commit/a6e128f5cc566d291b722cca1734ba41aae6c548))
12+
13+
ethers/v5.3.0 (2021-05-31 18:41)
14+
--------------------------------
15+
16+
- Added MinInt256 and MaxInt256 constants. ([#1576](https://github.com/ethers-io/ethers.js/issues/1576); [bfcd05f](https://github.com/ethers-io/ethers.js/commit/bfcd05fcbb132d456d6f22f70c8ac9cf5b1826f7))
17+
- Version bumps for bn.js and hash.js to match elliptic and fix some build tools. ([#1478](https://github.com/ethers-io/ethers.js/issues/1478); [819b1ac](https://github.com/ethers-io/ethers.js/commit/819b1ace5c9b16e29dc354ad80e0e5b71ac63c52))
18+
- Removed Hangul checks in shims which crashes Android. ([#1519](https://github.com/ethers-io/ethers.js/issues/1519); [4b33114](https://github.com/ethers-io/ethers.js/commit/4b331148d980e3056ceaabdcd6e50a2aa1beb40d))
19+
- Fixed ENS namehash with leading and trailing dots. ([#1605](https://github.com/ethers-io/ethers.js/issues/1605); [7adcf3b](https://github.com/ethers-io/ethers.js/commit/7adcf3b154669d9d1a0a66d5e15dabfbf6618180))
20+
- Fixed broken variable in template string. ([#1624](https://github.com/ethers-io/ethers.js/issues/1624), [#1626](https://github.com/ethers-io/ethers.js/issues/1626); [630656e](https://github.com/ethers-io/ethers.js/commit/630656e949a8ffd940e4b66ec93ec07cd6ec2634))
21+
- Fixed FixedNumber rounding for non-default formats. ([#1629](https://github.com/ethers-io/ethers.js/issues/1629); [8681cd5](https://github.com/ethers-io/ethers.js/commit/8681cd59698d02d040871aa889fc6ccc8550df98))
22+
- Update ws dependency version to fix security. ([#1633](https://github.com/ethers-io/ethers.js/issues/1633), [#1634](https://github.com/ethers-io/ethers.js/issues/1634); [470551e](https://github.com/ethers-io/ethers.js/commit/470551e4ee3f1e343a26fc0775f9d9f7489129f8))
23+
624
ethers/v5.2.0 (2021-05-17 16:18)
725
--------------------------------
826

docs.wrm/api/contract/contract-factory.wrm

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,9 @@ override the endowment ``value``, transaction ``nonce``, ``gasLimit`` or
7878

7979
_code: Deploying a Contract @lang<javascript>
8080

81-
// <hide>
82-
const signer = localSigner;
83-
const ContractFactory = ethers.ContractFactory;
84-
const bytecode = "608060405234801561001057600080fd5b5060405161012e38038061012e8339818101604052604081101561003357600080fd5b81019080805190602001909291908051906020019092919050505081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060008190555050506088806100a66000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80633fa4f24514602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000805490509056fea2646970667358221220926465385af0e8706644e1ff3db7161af699dc063beaadd55405f2ccd6478d7564736f6c63430007040033";
85-
// </hide>
86-
81+
//_hide: const signer = localSigner;
82+
//_hide: const ContractFactory = ethers.ContractFactory;
83+
//_hide: const bytecode = "608060405234801561001057600080fd5b5060405161012e38038061012e8339818101604052604081101561003357600080fd5b81019080805190602001909291908051906020019092919050505081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060008190555050506088806100a66000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80633fa4f24514602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000805490509056fea2646970667358221220926465385af0e8706644e1ff3db7161af699dc063beaadd55405f2ccd6478d7564736f6c63430007040033";
8784

8885
// If your contract constructor requires parameters, the ABI
8986
// must include the constructor
@@ -97,25 +94,26 @@ factory = new ContractFactory(abi, bytecode, signer)
9794

9895
// Deploy an instance of the contract
9996
contract = await factory.deploy("ricmoo.eth", 42);
100-
//<hide>
101-
//! async contract
102-
//</hide>
10397

10498
// The address is available immediately, but the contract
10599
// is NOT deployed yet
100+
//_result:
106101
contract.address
107-
//!
102+
//_log:
108103

109104
// The transaction that the signer sent to deploy
105+
//_result:
110106
contract.deployTransaction
111-
//!
107+
//_log:
112108

113109
// Wait until the transaction is mined (i.e. contract is deployed)
114110
// - returns the receipt
115111
// - throws on failure (the reciept is on the error)
116-
contract.deployTransaction.wait()
117-
//!
112+
//_result:
113+
await contract.deployTransaction.wait()
114+
//_log:
118115

119116
// Now the contract is safe to interact with
120-
contract.value()
121-
//!
117+
//_result:
118+
await contract.value()
119+
//_log:

docs.wrm/api/experimental.wrm

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ to be included in the base library. The API should not be considered
55
stable and does not follow [[link-semver]] versioning, so applications
66
requiring it should specify the //exact version// needed.
77

8+
These features are not available in the core ethers package, so to use them
9+
you must install the ``@ethersproject/experimental`` package and import them
10+
from that.
11+
812
_subsection: BrainWallet @<experimental-brainwallet> @INHERIT<[[Wallet]]>
913

1014
Ethers removed support for BrainWallets in v4, since they are unsafe and
@@ -19,13 +23,29 @@ the generated wallet has a mnemonic.
1923
_property: BrainWallet.generateLegacy(username, password [ , progressCallback ]) => [[experimental-brainwallet]]
2024
Generate a brain wallet which is compatible with the ethers v3 and earlier.
2125

26+
_code: Importing @lang<script>
27+
28+
// Node
29+
const { BrainWallet } = require("@ethersproject/experimental");
30+
31+
// ESM/TypeScript
32+
import { BrainWallet } from "@ethersproject/experimental";
33+
2234

2335
_subsection: EIP1193Bridge @<experimental-eip1193bridge> @INHERIT<[[link-npm-events]]>
2436

2537
The **EIP1193Bridge** allows a normal Ethers [[Signer]] and [[Provider]] to be
2638
exposed in as a standard [EIP-1193 Provider](link-eip-1193), which may be useful
2739
when interacting with other libraries.
2840

41+
_code: Importing @lang<script>
42+
43+
// Node
44+
const { Eip1193Bridge } = require("@ethersproject/experimental");
45+
46+
// ESM/TypeScript
47+
import { Eip1193Bridge } from "@ethersproject/experimental";
48+
2949

3050
_subsection: NonceManager @<experimental-noncemanager> @INHERIT<[[Signer]]>
3151

@@ -63,3 +83,11 @@ Bump the current transaction count (nonce) by //count//.
6383

6484
This may be useful in interacting with the signer outside of using
6585
this class.
86+
87+
_code: Importing @lang<script>
88+
89+
// Node
90+
const { NonceManager } = require("@ethersproject/experimental");
91+
92+
// ESM/TypeScript
93+
import { NonceManager } from "@ethersproject/experimental";

docs.wrm/api/providers/api-providers.wrm

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@ _definition: **Supported Networks**
4747

4848
_code: Etherscan Examples @lang<javascript>
4949

50-
// <hide>
51-
const EtherscanProvider = ethers.providers.EtherscanProvider;
52-
const apiKey = "...";
53-
// </hide>
50+
//_hide: const EtherscanProvider = ethers.providers.EtherscanProvider;
51+
//_hide: const apiKey = "...";
5452

5553
// Connect to mainnet (homestead)
5654
provider = new EtherscanProvider();
@@ -59,12 +57,9 @@ provider = new EtherscanProvider();
5957
provider = new EtherscanProvider("rinkeby");
6058
provider = new EtherscanProvider(4);
6159

62-
const network = ethers.providers.getNetwork("rinkeby");
63-
// <hide>
64-
delete network._defaultProvider;
65-
network
66-
// </hide>
67-
//!
60+
network = ethers.providers.getNetwork("rinkeby");
61+
//_hide: delete network._defaultProvider;
62+
//_log: network
6863

6964
provider = new EtherscanProvider(network);
7065

@@ -119,11 +114,9 @@ _definition: **Supported Networks**
119114

120115
_code: INFURA Examples @lang<javascript>
121116

122-
// <hide>
123-
const InfuraProvider = ethers.providers.InfuraProvider;
124-
const projectId = "...";
125-
const projectSecret = "...";
126-
// </hide>
117+
//_hide: const InfuraProvider = ethers.providers.InfuraProvider;
118+
//_hide: const projectId = "...";
119+
//_hide: const projectSecret = "...";
127120

128121
// Connect to mainnet (homestead)
129122
provider = new InfuraProvider();
@@ -144,9 +137,7 @@ provider = new InfuraProvider("homestead", {
144137

145138
// Connect to the INFURA WebSocket endpoints with a WebSocketProvider
146139
provider = InfuraProvider.getWebSocketProvider()
147-
// <hide>
148-
provider.destroy();
149-
// </hide>
140+
//_hide: await provider.destroy();
150141

151142

152143
_subsection: AlchemyProvider @<AlchemyProvider> @inherit<[[UrlJsonRpcProvider]]> @src<providers:class.AlchemyProvider>
@@ -178,10 +169,8 @@ _definition: **Supported Networks**
178169

179170
_code: Alchemy Examples @lang<javascript>
180171

181-
// <hide>
182-
const AlchemyProvider = ethers.providers.AlchemyProvider;
183-
const apiKey = "...";
184-
// </hide>
172+
//_hide: const AlchemyProvider = ethers.providers.AlchemyProvider;
173+
//_hide: const apiKey = "...";
185174

186175
// Connect to mainnet (homestead)
187176
provider = new AlchemyProvider();
@@ -196,9 +185,7 @@ provider = new AlchemyProvider("homestead", apiKey);
196185

197186
// Connect to the Alchemy WebSocket endpoints with a WebSocketProvider
198187
provider = AlchemyProvider.getWebSocketProvider()
199-
// <hide>
200-
provider.destroy();
201-
// </hide>
188+
//_hide: provider.destroy();
202189

203190

204191
_subsection: CloudflareProvider @<CloudflareProvider> @inherit<[[UrlJsonRpcProvider]]> @src<providers:class.CloudflareProvider>
@@ -214,9 +201,7 @@ _definition: **Supported Networks**
214201

215202
_code: Cloudflare Examples @lang<javascript>
216203

217-
// <hide>
218-
const CloudflareProvider = ethers.providers.CloudflareProvider;
219-
// </hide>
204+
//_hide: const CloudflareProvider = ethers.providers.CloudflareProvider;
220205

221206
// Connect to mainnet (homestead)
222207
provider = new CloudflareProvider();

docs.wrm/api/providers/index.wrm

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,33 @@ _subsection: Networks
7777
There are several official common Ethereum networks as well as custom
7878
networks and other compatible projects.
7979

80-
Any API that accept a [[providers-Networkish]] can be passed a common name (such as
81-
``"mainnet"`` or ``"ropsten"``) to use that network definition or may specify
82-
custom parameters.
80+
Any API that accept a [[providers-Networkish]] can be passed a common
81+
name (such as ``"mainnet"`` or ``"ropsten"``) or chain ID to use that
82+
network definition or may specify custom parameters.
83+
84+
_property: ethers.providers.getNetwork(aNetworkish) => [[providers-Network]]
85+
86+
Returns the full [[providers-Network]] for the given standard
87+
//aNetworkish// [[providers-Networkish]].
88+
89+
This is useful for functions and classes which wish to accept [[providers-Networkish]]
90+
as an input parameter.
91+
92+
_code: @lang<javascript>
93+
94+
//_hide: const getNetwork = ethers.providers.getNetwork;
95+
96+
// By Chain Name
97+
//_result:
98+
getNetwork("homestead");
99+
//_hide: delete _._defaultProvider;
100+
//_log:
101+
102+
// By Chain ID
103+
//_result:
104+
getNetwork(1);
105+
//_hide: delete _._defaultProvider;
106+
//_log:
83107

84108
_heading: Custom ENS Contract
85109

@@ -96,6 +120,7 @@ const network = {
96120
ensAddress: customEnsAddress
97121
};
98122

123+
99124
_subsection: Provider Documentation
100125

101126
_toc:

0 commit comments

Comments
 (0)