Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5fcd03f27e | ||
|
|
cb8f4a3a4e | ||
|
|
8facc1a530 | ||
|
|
17fdca8994 | ||
|
|
df0caab5d6 | ||
|
|
9733927f82 | ||
|
|
28dbcfc38c | ||
|
|
bb8e77dc70 | ||
|
|
ae619bcfc7 | ||
|
|
5b5904ea99 | ||
|
|
8f4b3027ef | ||
|
|
e9009631d5 | ||
|
|
be273f26e9 | ||
|
|
b0c082d728 |
24
.github/workflows/nodejs.yml
vendored
24
.github/workflows/nodejs.yml
vendored
@@ -21,9 +21,10 @@ jobs:
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- run: npm ci
|
||||
- run: npm run bootstrap
|
||||
- run: npm run build-all
|
||||
- run: npm run test-node
|
||||
|
||||
@@ -41,9 +42,10 @@ jobs:
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- run: npm ci
|
||||
- run: npm run bootstrap
|
||||
- run: npm run build-all
|
||||
- run: npm run test-browser-${{ matrix.module }}
|
||||
|
||||
@@ -60,8 +62,24 @@ jobs:
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- run: npm ci
|
||||
- run: npm run bootstrap
|
||||
- run: npm run build-all
|
||||
- run: npm run test-coverage
|
||||
|
||||
- name: Upload coverage summary
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: coverage-summary
|
||||
path: ./output/summary.txt
|
||||
|
||||
- name: Tar files
|
||||
run: tar -cvf ./output/coverage.tar ./output/lcov-report/
|
||||
|
||||
- name: Upload coverage
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: coverage-complete
|
||||
path: ./output/coverage.tar
|
||||
|
||||
@@ -3,6 +3,14 @@ Changelog
|
||||
|
||||
This change log is managed by `scripts/cmds/update-versions` but may be manually updated.
|
||||
|
||||
ethers/v5.0.9 (2020-08-25 01:45)
|
||||
--------------------------------
|
||||
|
||||
- Updated docs for all packages on npm pages. ([#1013](https://github.com/ethers-io/ethers.js/issues/1013); [cb8f4a3](https://github.com/ethers-io/ethers.js/commit/cb8f4a3a4e378a749c6bbbddf46d8d79d35722cc))
|
||||
- Added JSON support to BigNumber. ([#1010](https://github.com/ethers-io/ethers.js/issues/1010); [8facc1a](https://github.com/ethers-io/ethers.js/commit/8facc1a5305b1f699aa3afc5a0a692abe7927652))
|
||||
- Updated packages for security audit. ([5b5904e](https://github.com/ethers-io/ethers.js/commit/5b5904ea9977ecf8c079a57593b627553f0126a0))
|
||||
- Fix emitted error for ABI code array count mismatch. ([#1004](https://github.com/ethers-io/ethers.js/issues/1004); [b0c082d](https://github.com/ethers-io/ethers.js/commit/b0c082d728dc66b0f2a5ec315da44d6295716284))
|
||||
|
||||
ethers/v5.0.8 (2020-08-04 20:55)
|
||||
--------------------------------
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ A complete Ethereum wallet implementation and utilities in JavaScript (and TypeS
|
||||
- **Tiny** (~104kb compressed; 322kb uncompressed)
|
||||
- **Modular** packages; include only what you need
|
||||
- **Complete** functionality for all your Ethereum desires
|
||||
- Extensive [documentation](https://docs.ethers.io/ethers.js/html/)
|
||||
- Extensive [documentation](https://docs.ethers.io/ethers.js/v5/)
|
||||
- Large collection of **test cases** which are maintained and added to
|
||||
- Fully **TypeScript** ready, with definition files and full TypeScript source
|
||||
- **MIT License** (including ALL dependencies); completely open source to do with as you please
|
||||
@@ -75,7 +75,7 @@ Ancillary Packages
|
||||
These are a number of packages not included in the umbrella `ethers` npm package, and
|
||||
additional packages are always being added. Often these packages are for specific
|
||||
use-cases, so rather than adding them to the umbrella package, they are added as
|
||||
ancillary packaged, which can be included by those who need them, while not bloating
|
||||
ancillary packages, which can be included by those who need them, while not bloating
|
||||
everyone else with packages they do not need.
|
||||
|
||||
We will keep a list of useful packages here.
|
||||
|
||||
15
admin/cmds/npm-skip-node8.js
Normal file
15
admin/cmds/npm-skip-node8.js
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
const { major } = require("semver");
|
||||
|
||||
// This should be used like `node npm-skip-node8 || COMMAND`.
|
||||
// - If node 8, this script returns true, skipping COMMAND
|
||||
// - Otherwise, return false, running COMMAND
|
||||
|
||||
if (major(process.version) > 8) {
|
||||
// Node >8; return "false" (wrt to shell scripting)
|
||||
process.exit(1);
|
||||
} else {
|
||||
// Node 8; return "true" (wrt to shell scripting)
|
||||
process.exit(0);
|
||||
}
|
||||
@@ -1,5 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
const { basename, resolve } = require("path");
|
||||
const fs = require("fs");
|
||||
|
||||
const AWS = require('aws-sdk');
|
||||
|
||||
const config = require("../config");
|
||||
|
||||
const { ChangelogPath, latestChange } = require("../changelog");
|
||||
@@ -33,6 +38,45 @@ if (process.argv.length > 2) {
|
||||
dirnames = dirnames.filter((dirname) => (filter.indexOf(dirname) >= 0));
|
||||
}
|
||||
|
||||
|
||||
function putObject(s3, info) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
s3.putObject(info, function(error, data) {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
resolve({
|
||||
name: info.Key,
|
||||
hash: data.ETag.replace(/"/g, '')
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function invalidate(cloudfront, distributionId) {
|
||||
return new Promise((resolve, reject) => {
|
||||
cloudfront.createInvalidation({
|
||||
DistributionId: distributionId,
|
||||
InvalidationBatch: {
|
||||
CallerReference: `${ USER_AGENT }-${ parseInt(((new Date()).getTime()) / 1000) }`,
|
||||
Paths: {
|
||||
Quantity: "1",
|
||||
Items: [
|
||||
"/\*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}, function(error, data) {
|
||||
if (error) {
|
||||
console.log(error);
|
||||
return;
|
||||
}
|
||||
resolve(data.Invalidation.Id);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
(async function() {
|
||||
let token = null;
|
||||
|
||||
@@ -98,27 +142,69 @@ if (process.argv.length > 2) {
|
||||
// Publish the GitHub release
|
||||
const beta = false;
|
||||
if (includeEthers) {
|
||||
|
||||
// Get the latest change from the changelog
|
||||
const change = latestChange();
|
||||
|
||||
// Publish the release to GitHub
|
||||
{
|
||||
// The password above already succeeded
|
||||
const username = await config.get("github-user");
|
||||
const password = await config.get("github-release");
|
||||
|
||||
// Get the latest change from the changelog
|
||||
const change = latestChange();
|
||||
|
||||
// Publish the release
|
||||
const link = await createRelease(username, password, change.version, change.title, change.content, beta, gitCommit);
|
||||
log(`<bold:Published Release:> ${ link }`);
|
||||
}
|
||||
|
||||
/*
|
||||
// Upload the scripts to the CDN and refresh the edge caches
|
||||
{
|
||||
const accessKey = await config.get("aws-upload-scripts-accesskey");
|
||||
const secretKey = await config.get("aws-upload-scripts-secretkey");
|
||||
const s3 =
|
||||
}
|
||||
*/
|
||||
const awsAccessId = await config.get("aws-upload-scripts-accesskey");
|
||||
const awsSecretKey = await config.get("aws-upload-scripts-secretkey");
|
||||
const bucketName = await config.get("aws-upload-scripts-bucket");
|
||||
const originRoot = await config.get("aws-upload-scripts-root");
|
||||
const distributionId = await config.get("aws-upload-scripts-distribution-id");
|
||||
|
||||
const s3 = new AWS.S3({
|
||||
apiVersion: '2006-03-01',
|
||||
accessKeyId: awsAccessId,
|
||||
secretAccessKey: awsSecretKey
|
||||
});
|
||||
|
||||
// Upload the libs to ethers-v5.0 and ethers-5.0.x
|
||||
const fileInfos = [
|
||||
{ filename: "packages/ethers/dist/ethers.esm.min.js", key: `ethers-${ change.version.substring(1) }.esm.min.js` },
|
||||
{ filename: "packages/ethers/dist/ethers.umd.min.js", key: `ethers-${ change.version.substring(1) }.umd.min.js` },
|
||||
{ filename: "packages/ethers/dist/ethers.esm.min.js", key: `ethers-5.0.esm.min.js` },
|
||||
{ filename: "packages/ethers/dist/ethers.umd.min.js", key: `ethers-5.0.umd.min.js` },
|
||||
];
|
||||
|
||||
for (let i = 0; i < fileInfos.length; i++) {
|
||||
const fileInfo = fileInfos[i];
|
||||
const status = await putObject(s3, {
|
||||
ACL: 'public-read',
|
||||
Body: fs.readFileSync(resolve(__dirname, "../../", fileInfo.filename)),
|
||||
Bucket: bucketName,
|
||||
ContentType: "application/javascript; charset=utf-8",
|
||||
Key: (originRoot + fileInfo.key)
|
||||
});
|
||||
|
||||
log(`<bold:Uploaded :> https://cdn.ethers.io/lib/${ fileInfo.key }`);
|
||||
}
|
||||
|
||||
// Flush the edge caches
|
||||
{
|
||||
const cloudfront = new AWS.CloudFront({
|
||||
//apiVersion: '2006-03-01',
|
||||
accessKeyId: awsAccessId,
|
||||
secretAccessKey: awsSecretKey
|
||||
});
|
||||
|
||||
const invalidationId = await invalidate(cloudfront, distributionId);
|
||||
log(`<bold:Invalidated Cache :> ${ invalidationId }`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
@@ -87,7 +87,7 @@ function start(root, options) {
|
||||
});
|
||||
|
||||
server.listen(options.port, () => {
|
||||
console.log(`Listening on port: ${ options.port }`);
|
||||
console.log(`Server running on: http://localhost:${ options.port }`);
|
||||
});
|
||||
|
||||
return server;
|
||||
|
||||
@@ -16,13 +16,13 @@ decrypt decrypted decrypting deployed deploying deprecated detected
|
||||
discontinued earliest email enabled encoded encoding encrypt
|
||||
encrypted encrypting entries euro exceeded existing expected
|
||||
expired failed fetches formatted formatting funding generated
|
||||
hardened has ignoring implemented implementer imported including instantiate
|
||||
hardened has highly ignoring implemented implementer imported including instantiate
|
||||
joined keyword labelled larger lookup matches mined modified modifies multi
|
||||
named needed nested neutered numeric offline optimizer overriding owned packed
|
||||
padded parsed parsing passed placeholder processing properties reached
|
||||
padded parsed parsing passed placeholder processing properties prototyping reached
|
||||
recommended recovered redacted remaining replaced required
|
||||
serializes shared signed signing skipped stored supported tagging targetted
|
||||
transactions uninstall unstake unsubscribe using verifies website
|
||||
throttled transactions uninstall unstake unsubscribe using verifies website
|
||||
|
||||
// Overly Specific Words
|
||||
BIP BIP39 BIP44 crypto eip hashes hmac icap
|
||||
@@ -47,7 +47,7 @@ bytecode callback calldata checksum ciphertext cli codepoint commify config
|
||||
contenthash ctr ctrl debug dd dklen eexist encseed eof ethaddr
|
||||
ethseed ethers eval exec filename func gz hid http https hw iv
|
||||
info init ipc json kdf kdfparams labelhash lang lib mm multihash nfc
|
||||
nfkc nfd nfkd nodehash nullish oob opcode pbkdf pc plugin pragma pre prf
|
||||
nfkc nfd nfkd nodehash notok nullish oob opcode pbkdf pc plugin pragma pre prf
|
||||
repl rpc sighash topichash solc stdin stdout subclasses subnode
|
||||
timeout todo txt ufixed utc utf util url uuid vm vs websocket
|
||||
wikipedia wx xe xpriv xpub xx yyyy zlib
|
||||
|
||||
@@ -178,7 +178,7 @@ _subsection: Meta-Class Filters @NOTE<(added at Runtime)>
|
||||
Since the Contract is a Meta-Class, the methods available here depend
|
||||
on the ABI which was passed into the **Contract**.
|
||||
|
||||
_property: erc20.filters.Transafer([ fromAddress [ , toAddress ] ]) => Filter
|
||||
_property: erc20.filters.Transfer([ fromAddress [ , toAddress ] ]) => Filter
|
||||
Returns a new Filter which can be used to [query](erc20-queryfilter) or
|
||||
to [subscribe/unsubscribe to events](erc20-events).
|
||||
|
||||
|
||||
1
output/.keep
Normal file
1
output/.keep
Normal file
@@ -0,0 +1 @@
|
||||
# Keep this directory for artifacts
|
||||
24930
package-lock.json
generated
24930
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
13
package.json
13
package.json
@@ -6,6 +6,7 @@
|
||||
"url": "git://github.com/ethers-io/ethers.js.git"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "npm run bootstrap",
|
||||
"auto-build": "node ./admin/cmds/reset-build.js && npm run build -- -w",
|
||||
"auto-build-esm": "node ./admin/cmds/set-option esm && npm run build -- -w",
|
||||
"bootstrap": "node ./admin/cmds/reset-build.js && node ./admin/cmds/update-depgraph && lerna bootstrap --hoist",
|
||||
@@ -16,7 +17,8 @@
|
||||
"_dist-ancillary": "node ./admin/cmds/set-option esm && rollup -c rollup-ancillary.config.js",
|
||||
"_dist-umd": "node ./admin/cmds/set-option cjs browser-lang-all && rollup -c && mv ./packages/ethers/dist/ethers.umd.min.js ./packages/ethers/dist/ethers-all.umd.min.js && node ./admin/cmds/set-option cjs && rollup -c",
|
||||
"_dist-esm": "node ./admin/cmds/set-option esm browser-lang-all && rollup -c --configModule && mv ./packages/ethers/dist/ethers.esm.min.js ./packages/ethers/dist/ethers-all.esm.min.js && node ./admin/cmds/set-option esm && rollup -c --configModule",
|
||||
"_dist": "npm run _dist-esm && npm run _dist-ancillary && npm run _dist-umd",
|
||||
"_dist-all": "npm run _dist-esm && npm run _dist-ancillary && npm run _dist-umd",
|
||||
"_dist": "node admin/cmds/npm-skip-node8.js || npm run _dist-all",
|
||||
"clean": "node ./admin/cmds/reset-build.js && tsc --build --clean ./tsconfig.project.json",
|
||||
"_dist-test-esm": "rollup -c rollup-tests.config.js --configModule",
|
||||
"_dist-test-umd": "rollup -c rollup-tests.config.js",
|
||||
@@ -25,8 +27,8 @@
|
||||
"test-browser-umd": "npm run _dist-test-umd && npm run _test-browser-umd",
|
||||
"test-browser-esm": "npm run _dist-test-esm && npm run _test-browser-esm",
|
||||
"test-node": "mocha --no-colors --reporter ./packages/tests/reporter ./packages/tests/lib/test-*.js",
|
||||
"test": "if [ \"$TEST\" == \"\" ]; then npm run test-node; else npm run \"test-$TEST\"; fi",
|
||||
"test-coverage": "nyc mocha --reporter ./packages/tests/reporter-keepalive ./packages/tests/lib/test-*.js",
|
||||
"test": "npm run build-all && npm run test-node",
|
||||
"test-coverage": "nyc --report-dir=output --reporter=lcov --reporter=text mocha --reporter ./packages/tests/reporter-keepalive ./packages/tests/lib/test-*.js | tee output/summary.txt",
|
||||
"lock-versions": "node ./admin/cmds/lock-versions",
|
||||
"build-docs": "flatworm docs.wrm docs",
|
||||
"serve-docs": "node ./admin/cmds/serve-docs.js",
|
||||
@@ -50,7 +52,7 @@
|
||||
"karma": "5.1.0",
|
||||
"karma-chrome-launcher": "3.1.0",
|
||||
"karma-mocha": "2.0.1",
|
||||
"lerna": "^3.20.2",
|
||||
"lerna": "3.22.1",
|
||||
"libnpmpublish": "1.1.3",
|
||||
"mocha": "^7.1.1",
|
||||
"npm-packlist": "1.4.1",
|
||||
@@ -60,8 +62,7 @@
|
||||
"rollup-plugin-json": "4.0.0",
|
||||
"rollup-plugin-node-globals": "1.4.0",
|
||||
"rollup-plugin-node-resolve": "5.2.0",
|
||||
"rollup-plugin-terser": "^5.2.0",
|
||||
"rollup-plugin-uglify": "^6.0.4",
|
||||
"rollup-plugin-terser": "^7.0.0",
|
||||
"rollup-pluginutils": "2.8.1",
|
||||
"scrypt-js": "3.0.1",
|
||||
"semver": "^5.6.0",
|
||||
|
||||
@@ -1,15 +1,50 @@
|
||||
Ethereum ABI Coder
|
||||
==================
|
||||
|
||||
**EXPERIMENTAL**
|
||||
This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js).
|
||||
|
||||
Please see the [ethers](https://github.com/ethers-io/ethers.js) repository
|
||||
for more informations.
|
||||
It is responsible for encoding and decoding the Application Binary Interface (ABI)
|
||||
used by most smart contracts to interoperate between other smart contracts and clients.
|
||||
|
||||
API
|
||||
---
|
||||
For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/abi/).
|
||||
|
||||
`@TODO`
|
||||
Importing
|
||||
---------
|
||||
|
||||
Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers),
|
||||
but for those with more specific needs, individual components can be imported.
|
||||
|
||||
```javascript
|
||||
const {
|
||||
|
||||
ConstructorFragment,
|
||||
EventFragment,
|
||||
Fragment,
|
||||
FunctionFragment,
|
||||
ParamType,
|
||||
FormatTypes,
|
||||
|
||||
AbiCoder,
|
||||
defaultAbiCoder,
|
||||
|
||||
Interface,
|
||||
Indexed,
|
||||
|
||||
/////////////////////////
|
||||
// Types
|
||||
|
||||
CoerceFunc,
|
||||
JsonFragment,
|
||||
JsonFragmentType,
|
||||
|
||||
Result,
|
||||
checkResultErrors,
|
||||
|
||||
LogDescription,
|
||||
TransactionDescription
|
||||
|
||||
} = require("@ethersproject/abi");
|
||||
```
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
2
packages/abi/lib.esm/_version.d.ts
vendored
2
packages/abi/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "abi/5.0.2";
|
||||
export declare const version = "abi/5.0.3";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "abi/5.0.2";
|
||||
export const version = "abi/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -171,7 +171,7 @@ export class ArrayCoder extends Coder {
|
||||
count = value.length;
|
||||
writer.writeValue(value.length);
|
||||
}
|
||||
logger.checkArgumentCount(count, value.length, "coder array" + (this.localName ? (" " + this.localName) : ""));
|
||||
logger.checkArgumentCount(value.length, count, "coder array" + (this.localName ? (" " + this.localName) : ""));
|
||||
let coders = [];
|
||||
for (let i = 0; i < value.length; i++) {
|
||||
coders.push(this.coder);
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
packages/abi/lib/_version.d.ts
vendored
2
packages/abi/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "abi/5.0.2";
|
||||
export declare const version = "abi/5.0.3";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "abi/5.0.2";
|
||||
exports.version = "abi/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -193,7 +193,7 @@ var ArrayCoder = /** @class */ (function (_super) {
|
||||
count = value.length;
|
||||
writer.writeValue(value.length);
|
||||
}
|
||||
logger.checkArgumentCount(count, value.length, "coder array" + (this.localName ? (" " + this.localName) : ""));
|
||||
logger.checkArgumentCount(value.length, count, "coder array" + (this.localName ? (" " + this.localName) : ""));
|
||||
var coders = [];
|
||||
for (var i = 0; i < value.length; i++) {
|
||||
coders.push(this.coder);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/address": "^5.0.0",
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/constants": "^5.0.0",
|
||||
"@ethersproject/hash": "^5.0.0",
|
||||
"@ethersproject/keccak256": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0",
|
||||
"@ethersproject/strings": "^5.0.0"
|
||||
"@ethersproject/address": "^5.0.3",
|
||||
"@ethersproject/bignumber": "^5.0.6",
|
||||
"@ethersproject/bytes": "^5.0.4",
|
||||
"@ethersproject/constants": "^5.0.3",
|
||||
"@ethersproject/hash": "^5.0.3",
|
||||
"@ethersproject/keccak256": "^5.0.3",
|
||||
"@ethersproject/logger": "^5.0.5",
|
||||
"@ethersproject/properties": "^5.0.3",
|
||||
"@ethersproject/strings": "^5.0.3"
|
||||
},
|
||||
"description": "Utilities and Classes for parsing, formatting and managing Ethereum ABIs.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -31,7 +31,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0x7c8172c000fbed977dc2e5acc390200155898e974fdeb3dda590c69f2d99b851",
|
||||
"tarballHash": "0x962158407771047f5f321326b3ddded40e80bef5362dd3b6494fa6fa8d9c9f65",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.2"
|
||||
"version": "5.0.3"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "abi/5.0.2";
|
||||
export const version = "abi/5.0.3";
|
||||
|
||||
@@ -197,7 +197,7 @@ export class ArrayCoder extends Coder {
|
||||
writer.writeValue(value.length);
|
||||
}
|
||||
|
||||
logger.checkArgumentCount(count, value.length, "coder array" + (this.localName? (" "+ this.localName): ""));
|
||||
logger.checkArgumentCount(value.length, count, "coder array" + (this.localName? (" "+ this.localName): ""));
|
||||
|
||||
let coders = [];
|
||||
for (let i = 0; i < value.length; i++) { coders.push(this.coder); }
|
||||
|
||||
@@ -1,15 +1,56 @@
|
||||
Abstract Provider
|
||||
=================
|
||||
|
||||
**EXPERIMENTAL**
|
||||
This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js).
|
||||
|
||||
Please see the [ethers](https://github.com/ethers-io/ethers.js) repository
|
||||
for more informations.
|
||||
It is responsible for defining the common interface for a Provider, which in
|
||||
ethers differs quite substantially from Web3.js.
|
||||
|
||||
API
|
||||
---
|
||||
A Provider is an abstraction of non-account-based operations on a blockchain and
|
||||
is generally not directly involved in signing transaction or data.
|
||||
|
||||
`@TODO`
|
||||
For signing, see the [Abstract Signer](https://www.npmjs.com/package/@ethersproject/abstract-signer)
|
||||
or [Wallet](https://www.npmjs.com/package/@ethersproject/wallet) sub-modules.
|
||||
|
||||
For more information, see the [documentation](https://docs.ethers.io/v5/api/providers/).
|
||||
|
||||
Importing
|
||||
---------
|
||||
|
||||
Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers),
|
||||
but for those with more specific needs, individual components can be imported.
|
||||
|
||||
```javascript
|
||||
const {
|
||||
|
||||
Provider,
|
||||
|
||||
ForkEvent,
|
||||
BlockForkEvent,
|
||||
TransactionForkEvent,
|
||||
TransactionOrderForkEvent,
|
||||
|
||||
// Types
|
||||
BlockTag,
|
||||
|
||||
Block,
|
||||
BlockWithTransactions,
|
||||
|
||||
TransactionRequest,
|
||||
TransactionResponse,
|
||||
TransactionReceipt,
|
||||
|
||||
Log,
|
||||
EventFilter,
|
||||
|
||||
Filter,
|
||||
FilterByBlockHash,
|
||||
|
||||
EventType,
|
||||
Listener
|
||||
|
||||
} = require("@ethersproject/abstract-provider");
|
||||
```
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
@@ -1 +1 @@
|
||||
export declare const version = "abstract-provider/5.0.2";
|
||||
export declare const version = "abstract-provider/5.0.3";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "abstract-provider/5.0.2";
|
||||
export const version = "abstract-provider/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/abstract-provider/lib/_version.d.ts
vendored
2
packages/abstract-provider/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "abstract-provider/5.0.2";
|
||||
export declare const version = "abstract-provider/5.0.3";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "abstract-provider/5.0.2";
|
||||
exports.version = "abstract-provider/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/networks": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0",
|
||||
"@ethersproject/transactions": "^5.0.0",
|
||||
"@ethersproject/web": "^5.0.0"
|
||||
"@ethersproject/bignumber": "^5.0.6",
|
||||
"@ethersproject/bytes": "^5.0.4",
|
||||
"@ethersproject/logger": "^5.0.5",
|
||||
"@ethersproject/networks": "^5.0.3",
|
||||
"@ethersproject/properties": "^5.0.3",
|
||||
"@ethersproject/transactions": "^5.0.3",
|
||||
"@ethersproject/web": "^5.0.4"
|
||||
},
|
||||
"description": "An Abstract Class for describing an Ethereum Provider for ethers.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -29,7 +29,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0x120c5b90fb0ce1be086365f497e10fa31cfecf28eb5f0c7c66ac9c6a12e2e27e",
|
||||
"tarballHash": "0x13ce72ddb8feb32c257d0a5b9db9469fe6738021d7aeebbdc57797bcde731967",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.2"
|
||||
"version": "5.0.3"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "abstract-provider/5.0.2";
|
||||
export const version = "abstract-provider/5.0.3";
|
||||
|
||||
@@ -1,15 +1,32 @@
|
||||
Abstract Signer
|
||||
===============
|
||||
|
||||
**EXPERIMENTAL**
|
||||
This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js).
|
||||
|
||||
Please see the [ethers](https://github.com/ethers-io/ethers.js) repository
|
||||
for more informations.
|
||||
It is an abstraction of an Ethereum account, which may be backed by a [private key](https://www.npmjs.com/package/@ethersproject/wallet),
|
||||
signing service (such as Geth or Parity with key managment enabled, or a
|
||||
dedicated signing service such as Clef),
|
||||
[hardware wallets](https://www.npmjs.com/package/@ethersproject/hardware-wallets), etc.
|
||||
|
||||
API
|
||||
---
|
||||
For more information, see the [documentation](https://docs.ethers.io/v5/api/signer/).
|
||||
|
||||
`@TODO`
|
||||
Importing
|
||||
---------
|
||||
|
||||
Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers),
|
||||
but for those with more specific needs, individual components can be imported.
|
||||
|
||||
```javascript
|
||||
const {
|
||||
|
||||
Signer,
|
||||
VoidSigner,
|
||||
|
||||
// Types
|
||||
ExternallyOwnedAccount
|
||||
|
||||
} = require("@ethersproject/abstract-signer");
|
||||
```
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
@@ -1 +1 @@
|
||||
export declare const version = "abstract-signer/5.0.2";
|
||||
export declare const version = "abstract-signer/5.0.3";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "abstract-signer/5.0.2";
|
||||
export const version = "abstract-signer/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/abstract-signer/lib/_version.d.ts
vendored
2
packages/abstract-signer/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "abstract-signer/5.0.2";
|
||||
export declare const version = "abstract-signer/5.0.3";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "abstract-signer/5.0.2";
|
||||
exports.version = "abstract-signer/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/abstract-provider": "^5.0.0",
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0"
|
||||
"@ethersproject/abstract-provider": "^5.0.3",
|
||||
"@ethersproject/bignumber": "^5.0.6",
|
||||
"@ethersproject/bytes": "^5.0.4",
|
||||
"@ethersproject/logger": "^5.0.5",
|
||||
"@ethersproject/properties": "^5.0.3"
|
||||
},
|
||||
"description": "An Abstract Class for desribing an Ethereum Signer for ethers.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -27,7 +27,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0xa70f4f59e607668a7cda943cbe2dd204eb1bbf11f118eb886e6a179130bfcdfa",
|
||||
"tarballHash": "0x131afd17269cdc0590a1a86a4bdf0ff706660470f449d958ed6dde965180384c",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.2"
|
||||
"version": "5.0.3"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "abstract-signer/5.0.2";
|
||||
export const version = "abstract-signer/5.0.3";
|
||||
|
||||
@@ -1,15 +1,33 @@
|
||||
Ethereum Address Utilities
|
||||
==========================
|
||||
|
||||
**EXPERIMENTAL**
|
||||
This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js).
|
||||
|
||||
Please see the [ethers](https://github.com/ethers-io/ethers.js) repository
|
||||
for more informations.
|
||||
It is responsible for encoding, verifying and computing checksums for
|
||||
Ethereum addresses and computing special addresses, such as those
|
||||
enerated by and for contracts under various situations.
|
||||
|
||||
API
|
||||
---
|
||||
For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/address/).
|
||||
|
||||
`@TODO`
|
||||
Importing
|
||||
---------
|
||||
|
||||
Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers),
|
||||
but for those with more specific needs, individual components can be imported.
|
||||
|
||||
```javascript
|
||||
const {
|
||||
|
||||
getAddress,
|
||||
isAddress,
|
||||
|
||||
getIcapAddress,
|
||||
|
||||
getContractAddress,
|
||||
getCreate2Address
|
||||
|
||||
} = require("@ethersproject/address");
|
||||
```
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
2
packages/address/lib.esm/_version.d.ts
vendored
2
packages/address/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "address/5.0.2";
|
||||
export declare const version = "address/5.0.3";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "address/5.0.2";
|
||||
export const version = "address/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/address/lib/_version.d.ts
vendored
2
packages/address/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "address/5.0.2";
|
||||
export declare const version = "address/5.0.3";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "address/5.0.2";
|
||||
exports.version = "address/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/bignumber": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/keccak256": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/rlp": "^5.0.0",
|
||||
"@ethersproject/bignumber": "^5.0.6",
|
||||
"@ethersproject/bytes": "^5.0.4",
|
||||
"@ethersproject/keccak256": "^5.0.3",
|
||||
"@ethersproject/logger": "^5.0.5",
|
||||
"@ethersproject/rlp": "^5.0.3",
|
||||
"bn.js": "^4.4.0"
|
||||
},
|
||||
"description": "Utilities for handling Ethereum Addresses for ethers.",
|
||||
@@ -28,7 +28,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0x0f595beeb84e927ba96d0cf8ccca8415f72bf256e434e9d6083edb28a4dae655",
|
||||
"tarballHash": "0x195038a2102c64522cea63b3aba2fcd606b3e87e59379644fd75cd10e7931b88",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.2"
|
||||
"version": "5.0.3"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "address/5.0.2";
|
||||
export const version = "address/5.0.3";
|
||||
|
||||
@@ -205,6 +205,7 @@ Building
|
||||
If you make changes to the `grammar.jison` file, make sure to run the `npm generate`
|
||||
command to re-build the AST parser.
|
||||
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
|
||||
2
packages/asm/lib.esm/_version.d.ts
vendored
2
packages/asm/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "asm/5.0.2";
|
||||
export declare const version = "asm/5.0.3";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "asm/5.0.2";
|
||||
export const version = "asm/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/asm/lib/_version.d.ts
vendored
2
packages/asm/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "asm/5.0.2";
|
||||
export declare const version = "asm/5.0.3";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "asm/5.0.2";
|
||||
exports.version = "asm/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"ethers": "^5.0.0"
|
||||
"ethers": "^5.0.9"
|
||||
},
|
||||
"description": "ASM libraries and tools for the Ethereum EVM.",
|
||||
"devDependencies": {
|
||||
@@ -29,7 +29,7 @@
|
||||
"generate": "node ./generate.js",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0x6d299a226f941f183406beb8660a6dce0bf78e097641dd5b1e04ad5a9b80ace5",
|
||||
"tarballHash": "0xd964782cc2027d96f0bd4437c283e8cfc4c7918c46ab9afaed77ebb4533aa5ac",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.2"
|
||||
"version": "5.0.3"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "asm/5.0.2";
|
||||
export const version = "asm/5.0.3";
|
||||
|
||||
@@ -29,7 +29,6 @@ console.log(encodedData);
|
||||
// "..."
|
||||
```
|
||||
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
|
||||
2
packages/base64/lib.esm/_version.d.ts
vendored
2
packages/base64/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "base64/5.0.2";
|
||||
export declare const version = "base64/5.0.3";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "base64/5.0.2";
|
||||
export const version = "base64/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/base64/lib/_version.d.ts
vendored
2
packages/base64/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "base64/5.0.2";
|
||||
export declare const version = "base64/5.0.3";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "base64/5.0.2";
|
||||
exports.version = "base64/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -4,7 +4,7 @@
|
||||
"browser.esm": "./lib.esm/browser.js",
|
||||
"browser.umd": "./lib/browser.js",
|
||||
"dependencies": {
|
||||
"@ethersproject/bytes": "^5.0.0"
|
||||
"@ethersproject/bytes": "^5.0.4"
|
||||
},
|
||||
"description": "Base64 coder.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -26,7 +26,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0x0acd5bf2ef31a913816b0213f3e64303d8661a245962cc2f2290a96fefe4fbea",
|
||||
"tarballHash": "0xd87924f90f2c2a9122dc0de216f0eeec3d4c371b4241fe22ea1df3970873c757",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.2"
|
||||
"version": "5.0.3"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "base64/5.0.2";
|
||||
export const version = "base64/5.0.3";
|
||||
|
||||
@@ -1,5 +1,31 @@
|
||||
Base X
|
||||
Base-X
|
||||
======
|
||||
|
||||
**EXPERIMENTAL**
|
||||
This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js).
|
||||
|
||||
It is responsible for encoding and decoding vinary data in arbitrary bases, but
|
||||
is primarily for Base58 encoding which is used for various blockchain data.
|
||||
|
||||
For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/encoding/).
|
||||
|
||||
Importing
|
||||
---------
|
||||
|
||||
Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers),
|
||||
but for those with more specific needs, individual components can be imported.
|
||||
|
||||
```javascript
|
||||
const {
|
||||
|
||||
BaseX,
|
||||
|
||||
Base32,
|
||||
Base58
|
||||
|
||||
} = require("@ethersproject/basex");
|
||||
```
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
MIT License
|
||||
|
||||
2
packages/basex/lib.esm/_version.d.ts
vendored
2
packages/basex/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "basex/5.0.2";
|
||||
export declare const version = "basex/5.0.3";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "basex/5.0.2";
|
||||
export const version = "basex/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/basex/lib/_version.d.ts
vendored
2
packages/basex/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "basex/5.0.2";
|
||||
export declare const version = "basex/5.0.3";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "basex/5.0.2";
|
||||
exports.version = "basex/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/properties": "^5.0.0"
|
||||
"@ethersproject/bytes": "^5.0.4",
|
||||
"@ethersproject/properties": "^5.0.3"
|
||||
},
|
||||
"description": "Base-X without Buffer.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -24,7 +24,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0x16eaad9f8f29d4609670a24ff552b49edda5b2ac78ed4e0da267e13ece47e0c3",
|
||||
"tarballHash": "0x6474b3e488a215b45db9ab589839a5b44146e6e720a86ccd81de292447325fc0",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.2"
|
||||
"version": "5.0.3"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "basex/5.0.2";
|
||||
export const version = "basex/5.0.3";
|
||||
|
||||
@@ -1,15 +1,39 @@
|
||||
Big Numbers
|
||||
===========
|
||||
|
||||
**EXPERIMENTAL**
|
||||
This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js).
|
||||
|
||||
Please see the [ethers](https://github.com/ethers-io/ethers.js) repository
|
||||
for more informations.
|
||||
It is responsible for handling arbitrarily large numbers and mathematic operations.
|
||||
|
||||
API
|
||||
---
|
||||
For more information, see the documentation for [Big Numbers](https://docs.ethers.io/v5/api/utils/bignumber/)
|
||||
and [Fixed-Point Numbers](https://docs.ethers.io/v5/api/utils/fixednumber/).
|
||||
|
||||
|
||||
Importing
|
||||
---------
|
||||
|
||||
Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers),
|
||||
but for those with more specific needs, individual components can be imported.
|
||||
|
||||
```javascript
|
||||
const {
|
||||
|
||||
BigNumber,
|
||||
|
||||
FixedFormat,
|
||||
FixedNumber,
|
||||
|
||||
formatFixed,
|
||||
|
||||
parseFixed
|
||||
|
||||
// Types
|
||||
|
||||
BigNumberish
|
||||
|
||||
} = require("@ethersproject/bignumber");
|
||||
```
|
||||
|
||||
`@TODO`
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
2
packages/bignumber/lib.esm/_version.d.ts
vendored
2
packages/bignumber/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "bignumber/5.0.5";
|
||||
export declare const version = "bignumber/5.0.6";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "bignumber/5.0.5";
|
||||
export const version = "bignumber/5.0.6";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
1
packages/bignumber/lib.esm/bignumber.d.ts
vendored
1
packages/bignumber/lib.esm/bignumber.d.ts
vendored
@@ -30,6 +30,7 @@ export declare class BigNumber implements Hexable {
|
||||
toNumber(): number;
|
||||
toString(): string;
|
||||
toHexString(): string;
|
||||
toJSON(key?: string): any;
|
||||
static from(value: any): BigNumber;
|
||||
static isBigNumber(value: any): value is BigNumber;
|
||||
}
|
||||
|
||||
@@ -154,6 +154,9 @@ export class BigNumber {
|
||||
toHexString() {
|
||||
return this._hex;
|
||||
}
|
||||
toJSON(key) {
|
||||
return { type: "BigNumber", hex: this.toHexString() };
|
||||
}
|
||||
static from(value) {
|
||||
if (value instanceof BigNumber) {
|
||||
return value;
|
||||
@@ -176,19 +179,33 @@ export class BigNumber {
|
||||
}
|
||||
return BigNumber.from(String(value));
|
||||
}
|
||||
if (typeof (value) === "bigint") {
|
||||
return BigNumber.from(value.toString());
|
||||
const anyValue = value;
|
||||
if (typeof (anyValue) === "bigint") {
|
||||
return BigNumber.from(anyValue.toString());
|
||||
}
|
||||
if (isBytes(value)) {
|
||||
return BigNumber.from(hexlify(value));
|
||||
if (isBytes(anyValue)) {
|
||||
return BigNumber.from(hexlify(anyValue));
|
||||
}
|
||||
if (value._hex && isHexString(value._hex)) {
|
||||
return BigNumber.from(value._hex);
|
||||
}
|
||||
if (value.toHexString) {
|
||||
value = value.toHexString();
|
||||
if (typeof (value) === "string") {
|
||||
return BigNumber.from(value);
|
||||
if (anyValue) {
|
||||
// Hexable interface (takes piority)
|
||||
if (anyValue.toHexString) {
|
||||
const hex = anyValue.toHexString();
|
||||
if (typeof (hex) === "string") {
|
||||
return BigNumber.from(hex);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// For now, handle legacy JSON-ified values (goes away in v6)
|
||||
let hex = anyValue._hex;
|
||||
// New-form JSON
|
||||
if (hex == null && anyValue.type === "BigNumber") {
|
||||
hex = anyValue.hex;
|
||||
}
|
||||
if (typeof (hex) === "string") {
|
||||
if (isHexString(hex) || (hex[0] === "-" && isHexString(hex.substring(1)))) {
|
||||
return BigNumber.from(hex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return logger.throwArgumentError("invalid BigNumber value", "value", value);
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
packages/bignumber/lib/_version.d.ts
vendored
2
packages/bignumber/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "bignumber/5.0.5";
|
||||
export declare const version = "bignumber/5.0.6";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "bignumber/5.0.5";
|
||||
exports.version = "bignumber/5.0.6";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
1
packages/bignumber/lib/bignumber.d.ts
vendored
1
packages/bignumber/lib/bignumber.d.ts
vendored
@@ -30,6 +30,7 @@ export declare class BigNumber implements Hexable {
|
||||
toNumber(): number;
|
||||
toString(): string;
|
||||
toHexString(): string;
|
||||
toJSON(key?: string): any;
|
||||
static from(value: any): BigNumber;
|
||||
static isBigNumber(value: any): value is BigNumber;
|
||||
}
|
||||
|
||||
@@ -157,6 +157,9 @@ var BigNumber = /** @class */ (function () {
|
||||
BigNumber.prototype.toHexString = function () {
|
||||
return this._hex;
|
||||
};
|
||||
BigNumber.prototype.toJSON = function (key) {
|
||||
return { type: "BigNumber", hex: this.toHexString() };
|
||||
};
|
||||
BigNumber.from = function (value) {
|
||||
if (value instanceof BigNumber) {
|
||||
return value;
|
||||
@@ -179,19 +182,33 @@ var BigNumber = /** @class */ (function () {
|
||||
}
|
||||
return BigNumber.from(String(value));
|
||||
}
|
||||
if (typeof (value) === "bigint") {
|
||||
return BigNumber.from(value.toString());
|
||||
var anyValue = value;
|
||||
if (typeof (anyValue) === "bigint") {
|
||||
return BigNumber.from(anyValue.toString());
|
||||
}
|
||||
if (bytes_1.isBytes(value)) {
|
||||
return BigNumber.from(bytes_1.hexlify(value));
|
||||
if (bytes_1.isBytes(anyValue)) {
|
||||
return BigNumber.from(bytes_1.hexlify(anyValue));
|
||||
}
|
||||
if (value._hex && bytes_1.isHexString(value._hex)) {
|
||||
return BigNumber.from(value._hex);
|
||||
}
|
||||
if (value.toHexString) {
|
||||
value = value.toHexString();
|
||||
if (typeof (value) === "string") {
|
||||
return BigNumber.from(value);
|
||||
if (anyValue) {
|
||||
// Hexable interface (takes piority)
|
||||
if (anyValue.toHexString) {
|
||||
var hex = anyValue.toHexString();
|
||||
if (typeof (hex) === "string") {
|
||||
return BigNumber.from(hex);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// For now, handle legacy JSON-ified values (goes away in v6)
|
||||
var hex = anyValue._hex;
|
||||
// New-form JSON
|
||||
if (hex == null && anyValue.type === "BigNumber") {
|
||||
hex = anyValue.hex;
|
||||
}
|
||||
if (typeof (hex) === "string") {
|
||||
if (bytes_1.isHexString(hex) || (hex[0] === "-" && bytes_1.isHexString(hex.substring(1)))) {
|
||||
return BigNumber.from(hex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return logger.throwArgumentError("invalid BigNumber value", "value", value);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/bytes": "^5.0.0",
|
||||
"@ethersproject/logger": "^5.0.0",
|
||||
"@ethersproject/bytes": "^5.0.4",
|
||||
"@ethersproject/logger": "^5.0.5",
|
||||
"bn.js": "^4.4.0"
|
||||
},
|
||||
"description": "BigNumber library used in ethers.js.",
|
||||
@@ -26,7 +26,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0xcdc00c893b74d6eae49a2fc685a6d4c5801067505feb0e38f0ad366f6c37e0fd",
|
||||
"tarballHash": "0x7352ebc10e5e62e5ff3374291634be629727a4103f07bdb118886965bc1c663d",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.5"
|
||||
"version": "5.0.6"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "bignumber/5.0.5";
|
||||
export const version = "bignumber/5.0.6";
|
||||
|
||||
@@ -198,6 +198,10 @@ export class BigNumber implements Hexable {
|
||||
return this._hex;
|
||||
}
|
||||
|
||||
toJSON(key?: string): any {
|
||||
return { type: "BigNumber", hex: this.toHexString() };
|
||||
}
|
||||
|
||||
static from(value: any): BigNumber {
|
||||
if (value instanceof BigNumber) { return value; }
|
||||
|
||||
@@ -225,22 +229,39 @@ export class BigNumber implements Hexable {
|
||||
return BigNumber.from(String(value));
|
||||
}
|
||||
|
||||
if (typeof(value) === "bigint") {
|
||||
return BigNumber.from((<any>value).toString());
|
||||
const anyValue = <any>value;
|
||||
|
||||
if (typeof(anyValue) === "bigint") {
|
||||
return BigNumber.from(anyValue.toString());
|
||||
}
|
||||
|
||||
if (isBytes(value)) {
|
||||
return BigNumber.from(hexlify(value));
|
||||
if (isBytes(anyValue)) {
|
||||
return BigNumber.from(hexlify(anyValue));
|
||||
}
|
||||
|
||||
if ((<any>value)._hex && isHexString((<any>value)._hex)) {
|
||||
return BigNumber.from((<any>value)._hex);
|
||||
}
|
||||
if (anyValue) {
|
||||
|
||||
if ((<any>value).toHexString) {
|
||||
value = (<any>value).toHexString();
|
||||
if (typeof(value) === "string") {
|
||||
return BigNumber.from(value);
|
||||
// Hexable interface (takes piority)
|
||||
if (anyValue.toHexString) {
|
||||
const hex = anyValue.toHexString();
|
||||
if (typeof(hex) === "string") {
|
||||
return BigNumber.from(hex);
|
||||
}
|
||||
|
||||
} else {
|
||||
// For now, handle legacy JSON-ified values (goes away in v6)
|
||||
let hex = anyValue._hex;
|
||||
|
||||
// New-form JSON
|
||||
if (hex == null && anyValue.type === "BigNumber") {
|
||||
hex = anyValue.hex;
|
||||
}
|
||||
|
||||
if (typeof(hex) === "string") {
|
||||
if (isHexString(hex) || (hex[0] === "-" && isHexString(hex.substring(1)))) {
|
||||
return BigNumber.from(hex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,62 @@
|
||||
Byte Manipulation Libraries
|
||||
===========================
|
||||
Byte Manipulation
|
||||
=================
|
||||
|
||||
**EXPERIMENTAL**
|
||||
This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js).
|
||||
|
||||
Please see the [ethers](https://github.com/ethers-io/ethers.js) repository
|
||||
for more informations.
|
||||
It is responsible for manipulating binary data.
|
||||
|
||||
API
|
||||
---
|
||||
For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/bytes/).
|
||||
|
||||
|
||||
Importing
|
||||
---------
|
||||
|
||||
Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers),
|
||||
but for those with more specific needs, individual components can be imported.
|
||||
|
||||
```javascript
|
||||
const {
|
||||
|
||||
isBytesLike,
|
||||
isBytes,
|
||||
|
||||
arrayify,
|
||||
|
||||
concat,
|
||||
|
||||
stripZeros,
|
||||
zeroPad,
|
||||
|
||||
isHexString,
|
||||
hexlify,
|
||||
|
||||
hexDataLength,
|
||||
hexDataSlice,
|
||||
hexConcat,
|
||||
|
||||
hexValue,
|
||||
|
||||
hexStripZeros,
|
||||
hexZeroPad,
|
||||
|
||||
splitSignature,
|
||||
joinSignature,
|
||||
|
||||
// Types
|
||||
|
||||
Bytes,
|
||||
BytesLike,
|
||||
|
||||
DataOptions,
|
||||
|
||||
Hexable,
|
||||
|
||||
SignatureLike,
|
||||
Signature
|
||||
|
||||
} = require("@ethersproject/bytes");
|
||||
```
|
||||
|
||||
`@TODO`
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
2
packages/bytes/lib.esm/_version.d.ts
vendored
2
packages/bytes/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "bytes/5.0.3";
|
||||
export declare const version = "bytes/5.0.4";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "bytes/5.0.3";
|
||||
export const version = "bytes/5.0.4";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/bytes/lib/_version.d.ts
vendored
2
packages/bytes/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "bytes/5.0.3";
|
||||
export declare const version = "bytes/5.0.4";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "bytes/5.0.3";
|
||||
exports.version = "bytes/5.0.4";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/logger": "^5.0.0"
|
||||
"@ethersproject/logger": "^5.0.5"
|
||||
},
|
||||
"description": "Bytes utility functions for ethers.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -25,7 +25,7 @@
|
||||
"build": "tsc -p ./tsconfig.json",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0xca093eb960bdb8b5fa26c9f986319425697a906b12e1250f579d0f4676fbf72f",
|
||||
"tarballHash": "0xa07a7f838f037d4fae18f8877e868590567fe55052f629da882680b5e0eca355",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.3"
|
||||
"version": "5.0.4"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "bytes/5.0.3";
|
||||
export const version = "bytes/5.0.4";
|
||||
|
||||
@@ -12,6 +12,7 @@ and debug Ethereum-related tasks using the ethers.js library.
|
||||
|
||||
-----
|
||||
|
||||
|
||||
Sandbox Utility
|
||||
===============
|
||||
|
||||
|
||||
2
packages/cli/lib.esm/_version.d.ts
vendored
2
packages/cli/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "cli/5.0.2";
|
||||
export declare const version = "cli/5.0.3";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "cli/5.0.2";
|
||||
export const version = "cli/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/cli/lib/_version.d.ts
vendored
2
packages/cli/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "cli/5.0.2";
|
||||
export declare const version = "cli/5.0.3";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "cli/5.0.2";
|
||||
exports.version = "cli/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -9,9 +9,9 @@
|
||||
"dependencies": {
|
||||
"@babel/parser": "7.8.4",
|
||||
"@babel/types": "7.8.3",
|
||||
"@ethersproject/asm": "^5.0.0",
|
||||
"@ethersproject/basex": "^5.0.0",
|
||||
"ethers": "^5.0.0",
|
||||
"@ethersproject/asm": "^5.0.3",
|
||||
"@ethersproject/basex": "^5.0.3",
|
||||
"ethers": "^5.0.9",
|
||||
"mime-types": "2.1.11",
|
||||
"scrypt-js": "3.0.1",
|
||||
"solc": "0.5.10",
|
||||
@@ -41,7 +41,7 @@
|
||||
"scripts": {
|
||||
"test": "exit 1"
|
||||
},
|
||||
"tarballHash": "0xfdc0fad9825a96be6014812af5569db22a09cbf187160093655e0760ea47b114",
|
||||
"tarballHash": "0xed228fdbbb6124ddd1378a2bd80bf33815dfb6b88bbf349544f919e2247eeeb6",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.2"
|
||||
"version": "5.0.3"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "cli/5.0.2";
|
||||
export const version = "cli/5.0.3";
|
||||
|
||||
@@ -1,15 +1,37 @@
|
||||
Etehreum Constants
|
||||
==================
|
||||
|
||||
**EXPERIMENTAL**
|
||||
This sub-module is part of the [ethers project](https://github.com/ethers-io/ethers.js).
|
||||
|
||||
Please see the [ethers](https://github.com/ethers-io/ethers.js) repository
|
||||
for more informations.
|
||||
It contains many frequently used constants when dealing with Ethereum.
|
||||
|
||||
API
|
||||
---
|
||||
For more information, see the [documentation](https://docs.ethers.io/v5/api/utils/constants/).
|
||||
|
||||
Importing
|
||||
---------
|
||||
|
||||
Most users will prefer to use the [umbrella package](https://www.npmjs.com/package/ethers),
|
||||
but for those with more specific needs, individual components can be imported.
|
||||
|
||||
```javascript
|
||||
const {
|
||||
|
||||
AddressZero,
|
||||
HashZero,
|
||||
|
||||
EtherSymbol,
|
||||
|
||||
NegativeOne,
|
||||
Zero,
|
||||
One,
|
||||
Two,
|
||||
|
||||
WeiPerEther,
|
||||
MaxUint256
|
||||
|
||||
} = require("@ethersproject/constants");
|
||||
```
|
||||
|
||||
`@TODO`
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
2
packages/constants/lib.esm/_version.d.ts
vendored
2
packages/constants/lib.esm/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "constants/5.0.2";
|
||||
export declare const version = "constants/5.0.3";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export const version = "constants/5.0.2";
|
||||
export const version = "constants/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
2
packages/constants/lib/_version.d.ts
vendored
2
packages/constants/lib/_version.d.ts
vendored
@@ -1 +1 @@
|
||||
export declare const version = "constants/5.0.2";
|
||||
export declare const version = "constants/5.0.3";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = "constants/5.0.2";
|
||||
exports.version = "constants/5.0.3";
|
||||
//# sourceMappingURL=_version.js.map
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"dependencies": {
|
||||
"@ethersproject/bignumber": "^5.0.0"
|
||||
"@ethersproject/bignumber": "^5.0.6"
|
||||
},
|
||||
"description": "Common Ethereum constants used for ethers.",
|
||||
"ethereum": "donations.ethers.eth",
|
||||
@@ -23,7 +23,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"tarballHash": "0xb10f7d9416d1edb4ca778aa710edf2312e55928f4901ebabf515b1f6beda4c0c",
|
||||
"tarballHash": "0x0857b467c02b5e09d00255c6c8f952fd79a6b706c411da895bd829a3afbf099e",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.0.2"
|
||||
"version": "5.0.3"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "constants/5.0.2";
|
||||
export const version = "constants/5.0.3";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user