Skip to content

Commit

Permalink
merged master including transaction type 0 legacy constant (#1610).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jun 24, 2021
2 parents 91fff14 + 8ba64af commit 2a7ce0e
Show file tree
Hide file tree
Showing 329 changed files with 3,034 additions and 1,404 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@ Changelog

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

ethers/v5.3.1 (2021-06-10 18:28)
--------------------------------

- 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))
- 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))
- Match Solidity identifier regex. ([#1657](https://github.com/ethers-io/ethers.js/issues/1657); [a6e128f](https://github.com/ethers-io/ethers.js/commit/a6e128f5cc566d291b722cca1734ba41aae6c548))

ethers/v5.3.0 (2021-05-31 18:41)
--------------------------------

- 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))
- 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))
- 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))
- 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))
- 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))
- 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))
- 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))

ethers/v5.2.0 (2021-05-17 16:18)
--------------------------------

Expand Down
28 changes: 13 additions & 15 deletions docs.wrm/api/contract/contract-factory.wrm
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,9 @@ override the endowment ``value``, transaction ``nonce``, ``gasLimit`` or

_code: Deploying a Contract @lang<javascript>

// <hide>
const signer = localSigner;
const ContractFactory = ethers.ContractFactory;
const bytecode = "608060405234801561001057600080fd5b5060405161012e38038061012e8339818101604052604081101561003357600080fd5b81019080805190602001909291908051906020019092919050505081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060008190555050506088806100a66000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80633fa4f24514602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000805490509056fea2646970667358221220926465385af0e8706644e1ff3db7161af699dc063beaadd55405f2ccd6478d7564736f6c63430007040033";
// </hide>

//_hide: const signer = localSigner;
//_hide: const ContractFactory = ethers.ContractFactory;
//_hide: const bytecode = "608060405234801561001057600080fd5b5060405161012e38038061012e8339818101604052604081101561003357600080fd5b81019080805190602001909291908051906020019092919050505081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060008190555050506088806100a66000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80633fa4f24514602d575b600080fd5b60336049565b6040518082815260200191505060405180910390f35b6000805490509056fea2646970667358221220926465385af0e8706644e1ff3db7161af699dc063beaadd55405f2ccd6478d7564736f6c63430007040033";

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

// Deploy an instance of the contract
contract = await factory.deploy("ricmoo.eth", 42);
//<hide>
//! async contract
//</hide>

// The address is available immediately, but the contract
// is NOT deployed yet
//_result:
contract.address
//!
//_log:

// The transaction that the signer sent to deploy
//_result:
contract.deployTransaction
//!
//_log:

// Wait until the transaction is mined (i.e. contract is deployed)
// - returns the receipt
// - throws on failure (the reciept is on the error)
contract.deployTransaction.wait()
//!
//_result:
await contract.deployTransaction.wait()
//_log:

// Now the contract is safe to interact with
contract.value()
//!
//_result:
await contract.value()
//_log:
28 changes: 28 additions & 0 deletions docs.wrm/api/experimental.wrm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ to be included in the base library. The API should not be considered
stable and does not follow [[link-semver]] versioning, so applications
requiring it should specify the //exact version// needed.

These features are not available in the core ethers package, so to use them
you must install the ``@ethersproject/experimental`` package and import them
from that.

_subsection: BrainWallet @<experimental-brainwallet> @INHERIT<[[Wallet]]>

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

_code: Importing @lang<script>

// Node
const { BrainWallet } = require("@ethersproject/experimental");

// ESM/TypeScript
import { BrainWallet } from "@ethersproject/experimental";


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

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

_code: Importing @lang<script>

// Node
const { Eip1193Bridge } = require("@ethersproject/experimental");

// ESM/TypeScript
import { Eip1193Bridge } from "@ethersproject/experimental";


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

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

This may be useful in interacting with the signer outside of using
this class.

_code: Importing @lang<script>

// Node
const { NonceManager } = require("@ethersproject/experimental");

// ESM/TypeScript
import { NonceManager } from "@ethersproject/experimental";
41 changes: 13 additions & 28 deletions docs.wrm/api/providers/api-providers.wrm
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ _definition: **Supported Networks**

_code: Etherscan Examples @lang<javascript>

// <hide>
const EtherscanProvider = ethers.providers.EtherscanProvider;
const apiKey = "...";
// </hide>
//_hide: const EtherscanProvider = ethers.providers.EtherscanProvider;
//_hide: const apiKey = "...";

// Connect to mainnet (homestead)
provider = new EtherscanProvider();
Expand All @@ -59,12 +57,9 @@ provider = new EtherscanProvider();
provider = new EtherscanProvider("rinkeby");
provider = new EtherscanProvider(4);

const network = ethers.providers.getNetwork("rinkeby");
// <hide>
delete network._defaultProvider;
network
// </hide>
//!
network = ethers.providers.getNetwork("rinkeby");
//_hide: delete network._defaultProvider;
//_log: network

provider = new EtherscanProvider(network);

Expand Down Expand Up @@ -119,11 +114,9 @@ _definition: **Supported Networks**

_code: INFURA Examples @lang<javascript>

// <hide>
const InfuraProvider = ethers.providers.InfuraProvider;
const projectId = "...";
const projectSecret = "...";
// </hide>
//_hide: const InfuraProvider = ethers.providers.InfuraProvider;
//_hide: const projectId = "...";
//_hide: const projectSecret = "...";

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

// Connect to the INFURA WebSocket endpoints with a WebSocketProvider
provider = InfuraProvider.getWebSocketProvider()
// <hide>
provider.destroy();
// </hide>
//_hide: await provider.destroy();


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

_code: Alchemy Examples @lang<javascript>

// <hide>
const AlchemyProvider = ethers.providers.AlchemyProvider;
const apiKey = "...";
// </hide>
//_hide: const AlchemyProvider = ethers.providers.AlchemyProvider;
//_hide: const apiKey = "...";

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

// Connect to the Alchemy WebSocket endpoints with a WebSocketProvider
provider = AlchemyProvider.getWebSocketProvider()
// <hide>
provider.destroy();
// </hide>
//_hide: provider.destroy();


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

_code: Cloudflare Examples @lang<javascript>

// <hide>
const CloudflareProvider = ethers.providers.CloudflareProvider;
// </hide>
//_hide: const CloudflareProvider = ethers.providers.CloudflareProvider;

// Connect to mainnet (homestead)
provider = new CloudflareProvider();
31 changes: 28 additions & 3 deletions docs.wrm/api/providers/index.wrm
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,33 @@ _subsection: Networks
There are several official common Ethereum networks as well as custom
networks and other compatible projects.

Any API that accept a [[providers-Networkish]] can be passed a common name (such as
``"mainnet"`` or ``"ropsten"``) to use that network definition or may specify
custom parameters.
Any API that accept a [[providers-Networkish]] can be passed a common
name (such as ``"mainnet"`` or ``"ropsten"``) or chain ID to use that
network definition or may specify custom parameters.

_property: ethers.providers.getNetwork(aNetworkish) => [[providers-Network]]

Returns the full [[providers-Network]] for the given standard
//aNetworkish// [[providers-Networkish]].

This is useful for functions and classes which wish to accept [[providers-Networkish]]
as an input parameter.

_code: @lang<javascript>

//_hide: const getNetwork = ethers.providers.getNetwork;

// By Chain Name
//_result:
getNetwork("homestead");
//_hide: delete _._defaultProvider;
//_log:

// By Chain ID
//_result:
getNetwork(1);
//_hide: delete _._defaultProvider;
//_log:

_heading: Custom ENS Contract

Expand All @@ -96,6 +120,7 @@ const network = {
ensAddress: customEnsAddress
};


_subsection: Provider Documentation

_toc:
Expand Down
Loading

0 comments on commit 2a7ce0e

Please sign in to comment.