Compare commits
No commits in common. "main" and "wip-4844-write" have entirely different histories.
main
...
wip-4844-w
2
.github/workflows/test-ci.yml
vendored
2
.github/workflows/test-ci.yml
vendored
@ -98,7 +98,7 @@ jobs:
|
|||||||
name: coverage-complete
|
name: coverage-complete
|
||||||
path: ./output/coverage.tar
|
path: ./output/coverage.tar
|
||||||
|
|
||||||
- name: Upload coverage to build.ethers.org
|
- name: Upload coverage to to build.ethers.org
|
||||||
uses: ethers-io/sync-s3-action@main
|
uses: ethers-io/sync-s3-action@main
|
||||||
with:
|
with:
|
||||||
aws_access_key_id: ${{ secrets.BUILD_AWS_ACCESS_KEY_ID }}
|
aws_access_key_id: ${{ secrets.BUILD_AWS_ACCESS_KEY_ID }}
|
||||||
|
1
.npmrc
1
.npmrc
@ -1 +0,0 @@
|
|||||||
@tornado:registry=https://git.tornado.ws/api/packages/tornado-packages/npm/
|
|
14
CHANGELOG.md
14
CHANGELOG.md
@ -3,20 +3,6 @@ Change Log
|
|||||||
|
|
||||||
This change log is maintained by `src.ts/_admin/update-changelog.ts` but may also be manually updated.
|
This change log is maintained by `src.ts/_admin/update-changelog.ts` but may also be manually updated.
|
||||||
|
|
||||||
ethers/v6.12.0 (2024-04-17 01:09)
|
|
||||||
---------------------------------
|
|
||||||
|
|
||||||
- Added Linea Sepolia network and Infura endpoint ([#4655](https://github.com/ethers-io/ethers.js/issues/4655); [b4aaab8](https://github.com/ethers-io/ethers.js/commit/b4aaab8d39fe47f8a1a296fa442f0856f84faf03)).
|
|
||||||
- Do not send unsubscribe messages to destroyed Providers ([#4678](https://github.com/ethers-io/ethers.js/issues/4678); [c45935e](https://github.com/ethers-io/ethers.js/commit/c45935e29ca0dd1ecdf1277fa1107246041be580)).
|
|
||||||
- Get definitive network from InfuraProvider when using InfuraWebSocketProvider ([38e32d8](https://github.com/ethers-io/ethers.js/commit/38e32d82145eb289e5179f9b6b11f4a9225a7022)).
|
|
||||||
- Better error messages for transaction field mismatch ([#4659](https://github.com/ethers-io/ethers.js/issues/4659); [9230aa0](https://github.com/ethers-io/ethers.js/commit/9230aa0b9a88b5241915a8d6afa8a522d35abd5d)).
|
|
||||||
- Added prevRandao to block ([#3372](https://github.com/ethers-io/ethers.js/issues/3372); [ec6a754](https://github.com/ethers-io/ethers.js/commit/ec6a754f0c8647dae59c73b2589225cb200d83dd)).
|
|
||||||
- Added Polygon Amoy testnet ([#4645](https://github.com/ethers-io/ethers.js/issues/4645); [1717abb](https://github.com/ethers-io/ethers.js/commit/1717abbf29a14a6f6b106e479fe9a5b1f8768dc4)).
|
|
||||||
- Added Chainstack provider ([#2741](https://github.com/ethers-io/ethers.js/issues/2741); [014004d](https://github.com/ethers-io/ethers.js/commit/014004d9402d7fd8c15553792cfb7a8a84ed327a)).
|
|
||||||
- Added deep convertion to Result for toObject and toArray ([#4681](https://github.com/ethers-io/ethers.js/issues/4681); [03bfe2a](https://github.com/ethers-io/ethers.js/commit/03bfe2a4f7b29b15cd90127974b7fc1d8b03edf9)).
|
|
||||||
- Added EIP-4844 broadcast support ([92bad88](https://github.com/ethers-io/ethers.js/commit/92bad88261a5d8a538535a7d5528162fe5010527)).
|
|
||||||
- Fix ignored throttle parameters ([#4663](https://github.com/ethers-io/ethers.js/issues/4663); [12772e9](https://github.com/ethers-io/ethers.js/commit/12772e9498b70f8538838f30e16f3792ea90e173)).
|
|
||||||
|
|
||||||
ethers/v6.11.1 (2024-02-14 13:13)
|
ethers/v6.11.1 (2024-02-14 13:13)
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
|
399
dist/ethers.js
vendored
399
dist/ethers.js
vendored
@ -3,7 +3,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
/**
|
/**
|
||||||
* The current version of Ethers.
|
* The current version of Ethers.
|
||||||
*/
|
*/
|
||||||
const version = "6.12.0";
|
const version = "6.11.1";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Property helper functions.
|
* Property helper functions.
|
||||||
@ -1608,7 +1608,6 @@ class FetchRequest {
|
|||||||
clone.#preflight = this.#preflight;
|
clone.#preflight = this.#preflight;
|
||||||
clone.#process = this.#process;
|
clone.#process = this.#process;
|
||||||
clone.#retry = this.#retry;
|
clone.#retry = this.#retry;
|
||||||
clone.#throttle = Object.assign({}, this.#throttle);
|
|
||||||
clone.#getUrlFunc = this.#getUrlFunc;
|
clone.#getUrlFunc = this.#getUrlFunc;
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
@ -2738,45 +2737,35 @@ class Result extends Array {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns the Result as a normal Array. If %%deep%%, any children
|
* Returns the Result as a normal Array.
|
||||||
* which are Result objects are also converted to a normal Array.
|
|
||||||
*
|
*
|
||||||
* This will throw if there are any outstanding deferred
|
* This will throw if there are any outstanding deferred
|
||||||
* errors.
|
* errors.
|
||||||
*/
|
*/
|
||||||
toArray(deep) {
|
toArray() {
|
||||||
const result = [];
|
const result = [];
|
||||||
this.forEach((item, index) => {
|
this.forEach((item, index) => {
|
||||||
if (item instanceof Error) {
|
if (item instanceof Error) {
|
||||||
throwError(`index ${index}`, item);
|
throwError(`index ${index}`, item);
|
||||||
}
|
}
|
||||||
if (deep && item instanceof Result) {
|
|
||||||
item = item.toArray(deep);
|
|
||||||
}
|
|
||||||
result.push(item);
|
result.push(item);
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns the Result as an Object with each name-value pair. If
|
* Returns the Result as an Object with each name-value pair.
|
||||||
* %%deep%%, any children which are Result objects are also
|
|
||||||
* converted to an Object.
|
|
||||||
*
|
*
|
||||||
* This will throw if any value is unnamed, or if there are
|
* This will throw if any value is unnamed, or if there are
|
||||||
* any outstanding deferred errors.
|
* any outstanding deferred errors.
|
||||||
*/
|
*/
|
||||||
toObject(deep) {
|
toObject() {
|
||||||
return this.#names.reduce((accum, name, index) => {
|
return this.#names.reduce((accum, name, index) => {
|
||||||
assert(name != null, "value at index ${ index } unnamed", "UNSUPPORTED_OPERATION", {
|
assert(name != null, "value at index ${ index } unnamed", "UNSUPPORTED_OPERATION", {
|
||||||
operation: "toObject()"
|
operation: "toObject()"
|
||||||
});
|
});
|
||||||
// Add values for names that don't conflict
|
// Add values for names that don't conflict
|
||||||
if (!(name in accum)) {
|
if (!(name in accum)) {
|
||||||
let child = this.getValue(name);
|
accum[name] = this.getValue(name);
|
||||||
if (deep && child instanceof Result) {
|
|
||||||
child = child.toObject(deep);
|
|
||||||
}
|
|
||||||
accum[name] = child;
|
|
||||||
}
|
}
|
||||||
return accum;
|
return accum;
|
||||||
}, {});
|
}, {});
|
||||||
@ -9634,15 +9623,6 @@ const BN_27 = BigInt(27);
|
|||||||
const BN_28 = BigInt(28);
|
const BN_28 = BigInt(28);
|
||||||
const BN_35 = BigInt(35);
|
const BN_35 = BigInt(35);
|
||||||
const BN_MAX_UINT = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
const BN_MAX_UINT = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
||||||
const BLOB_SIZE = 4096 * 32;
|
|
||||||
function getVersionedHash(version, hash) {
|
|
||||||
let versioned = version.toString(16);
|
|
||||||
while (versioned.length < 2) {
|
|
||||||
versioned = "0" + versioned;
|
|
||||||
}
|
|
||||||
versioned += sha256(hash).substring(4);
|
|
||||||
return "0x" + versioned;
|
|
||||||
}
|
|
||||||
function handleAddress(value) {
|
function handleAddress(value) {
|
||||||
if (value === "0x") {
|
if (value === "0x") {
|
||||||
return null;
|
return null;
|
||||||
@ -9725,7 +9705,7 @@ function _parseLegacy(data) {
|
|||||||
s: zeroPadValue(fields[8], 32),
|
s: zeroPadValue(fields[8], 32),
|
||||||
v
|
v
|
||||||
});
|
});
|
||||||
//tx.hash = keccak256(data);
|
tx.hash = keccak256(data);
|
||||||
}
|
}
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
@ -9816,7 +9796,7 @@ function _parseEip1559(data) {
|
|||||||
if (fields.length === 9) {
|
if (fields.length === 9) {
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
//tx.hash = keccak256(data);
|
tx.hash = keccak256(data);
|
||||||
_parseEipSignature(tx, fields.slice(9));
|
_parseEipSignature(tx, fields.slice(9));
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
@ -9857,7 +9837,7 @@ function _parseEip2930(data) {
|
|||||||
if (fields.length === 8) {
|
if (fields.length === 8) {
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
//tx.hash = keccak256(data);
|
tx.hash = keccak256(data);
|
||||||
_parseEipSignature(tx, fields.slice(8));
|
_parseEipSignature(tx, fields.slice(8));
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
@ -9880,29 +9860,8 @@ function _serializeEip2930(tx, sig) {
|
|||||||
return concat(["0x01", encodeRlp(fields)]);
|
return concat(["0x01", encodeRlp(fields)]);
|
||||||
}
|
}
|
||||||
function _parseEip4844(data) {
|
function _parseEip4844(data) {
|
||||||
let fields = decodeRlp(getBytes(data).slice(1));
|
const fields = decodeRlp(getBytes(data).slice(1));
|
||||||
let typeName = "3";
|
assertArgument(Array.isArray(fields) && (fields.length === 11 || fields.length === 14), "invalid field count for transaction type: 3", "data", hexlify(data));
|
||||||
let blobs = null;
|
|
||||||
// Parse the network format
|
|
||||||
if (fields.length === 4 && Array.isArray(fields[0])) {
|
|
||||||
typeName = "3 (network format)";
|
|
||||||
const fBlobs = fields[1], fCommits = fields[2], fProofs = fields[3];
|
|
||||||
assertArgument(Array.isArray(fBlobs), "invalid network format: blobs not an array", "fields[1]", fBlobs);
|
|
||||||
assertArgument(Array.isArray(fCommits), "invalid network format: commitments not an array", "fields[2]", fCommits);
|
|
||||||
assertArgument(Array.isArray(fProofs), "invalid network format: proofs not an array", "fields[3]", fProofs);
|
|
||||||
assertArgument(fBlobs.length === fCommits.length, "invalid network format: blobs/commitments length mismatch", "fields", fields);
|
|
||||||
assertArgument(fBlobs.length === fProofs.length, "invalid network format: blobs/proofs length mismatch", "fields", fields);
|
|
||||||
blobs = [];
|
|
||||||
for (let i = 0; i < fields[1].length; i++) {
|
|
||||||
blobs.push({
|
|
||||||
data: fBlobs[i],
|
|
||||||
commitment: fCommits[i],
|
|
||||||
proof: fProofs[i],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
fields = fields[0];
|
|
||||||
}
|
|
||||||
assertArgument(Array.isArray(fields) && (fields.length === 11 || fields.length === 14), `invalid field count for transaction type: ${typeName}`, "data", hexlify(data));
|
|
||||||
const tx = {
|
const tx = {
|
||||||
type: 3,
|
type: 3,
|
||||||
chainId: handleUint(fields[0], "chainId"),
|
chainId: handleUint(fields[0], "chainId"),
|
||||||
@ -9918,10 +9877,7 @@ function _parseEip4844(data) {
|
|||||||
maxFeePerBlobGas: handleUint(fields[9], "maxFeePerBlobGas"),
|
maxFeePerBlobGas: handleUint(fields[9], "maxFeePerBlobGas"),
|
||||||
blobVersionedHashes: fields[10]
|
blobVersionedHashes: fields[10]
|
||||||
};
|
};
|
||||||
if (blobs) {
|
assertArgument(tx.to != null, "invalid address for transaction type: 3", "data", data);
|
||||||
tx.blobs = blobs;
|
|
||||||
}
|
|
||||||
assertArgument(tx.to != null, `invalid address for transaction type: ${typeName}`, "data", data);
|
|
||||||
assertArgument(Array.isArray(tx.blobVersionedHashes), "invalid blobVersionedHashes: must be an array", "data", data);
|
assertArgument(Array.isArray(tx.blobVersionedHashes), "invalid blobVersionedHashes: must be an array", "data", data);
|
||||||
for (let i = 0; i < tx.blobVersionedHashes.length; i++) {
|
for (let i = 0; i < tx.blobVersionedHashes.length; i++) {
|
||||||
assertArgument(isHexString(tx.blobVersionedHashes[i], 32), `invalid blobVersionedHash at index ${i}: must be length 32`, "data", data);
|
assertArgument(isHexString(tx.blobVersionedHashes[i], 32), `invalid blobVersionedHash at index ${i}: must be length 32`, "data", data);
|
||||||
@ -9930,13 +9886,11 @@ function _parseEip4844(data) {
|
|||||||
if (fields.length === 11) {
|
if (fields.length === 11) {
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
// @TODO: Do we need to do this? This is only called internally
|
tx.hash = keccak256(data);
|
||||||
// and used to verify hashes; it might save time to not do this
|
|
||||||
//tx.hash = keccak256(concat([ "0x03", encodeRlp(fields) ]));
|
|
||||||
_parseEipSignature(tx, fields.slice(11));
|
_parseEipSignature(tx, fields.slice(11));
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
function _serializeEip4844(tx, sig, blobs) {
|
function _serializeEip4844(tx, sig) {
|
||||||
const fields = [
|
const fields = [
|
||||||
formatNumber(tx.chainId, "chainId"),
|
formatNumber(tx.chainId, "chainId"),
|
||||||
formatNumber(tx.nonce, "nonce"),
|
formatNumber(tx.nonce, "nonce"),
|
||||||
@ -9954,18 +9908,6 @@ function _serializeEip4844(tx, sig, blobs) {
|
|||||||
fields.push(formatNumber(sig.yParity, "yParity"));
|
fields.push(formatNumber(sig.yParity, "yParity"));
|
||||||
fields.push(toBeArray(sig.r));
|
fields.push(toBeArray(sig.r));
|
||||||
fields.push(toBeArray(sig.s));
|
fields.push(toBeArray(sig.s));
|
||||||
// We have blobs; return the network wrapped format
|
|
||||||
if (blobs) {
|
|
||||||
return concat([
|
|
||||||
"0x03",
|
|
||||||
encodeRlp([
|
|
||||||
fields,
|
|
||||||
blobs.map((b) => b.data),
|
|
||||||
blobs.map((b) => b.commitment),
|
|
||||||
blobs.map((b) => b.proof),
|
|
||||||
])
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return concat(["0x03", encodeRlp(fields)]);
|
return concat(["0x03", encodeRlp(fields)]);
|
||||||
}
|
}
|
||||||
@ -9997,8 +9939,6 @@ class Transaction {
|
|||||||
#accessList;
|
#accessList;
|
||||||
#maxFeePerBlobGas;
|
#maxFeePerBlobGas;
|
||||||
#blobVersionedHashes;
|
#blobVersionedHashes;
|
||||||
#kzg;
|
|
||||||
#blobs;
|
|
||||||
/**
|
/**
|
||||||
* The transaction type.
|
* The transaction type.
|
||||||
*
|
*
|
||||||
@ -10180,7 +10120,7 @@ class Transaction {
|
|||||||
this.#maxFeePerBlobGas = (value == null) ? null : getBigInt(value, "maxFeePerBlobGas");
|
this.#maxFeePerBlobGas = (value == null) ? null : getBigInt(value, "maxFeePerBlobGas");
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The BLOb versioned hashes for Cancun transactions.
|
* The BLOB versioned hashes for Cancun transactions.
|
||||||
*/
|
*/
|
||||||
get blobVersionedHashes() {
|
get blobVersionedHashes() {
|
||||||
// @TODO: Mutation is inconsistent; if unset, the returned value
|
// @TODO: Mutation is inconsistent; if unset, the returned value
|
||||||
@ -10201,87 +10141,6 @@ class Transaction {
|
|||||||
}
|
}
|
||||||
this.#blobVersionedHashes = value;
|
this.#blobVersionedHashes = value;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* The BLObs for the Transaction, if any.
|
|
||||||
*
|
|
||||||
* If ``blobs`` is non-``null``, then the [[seriailized]]
|
|
||||||
* will return the network formatted sidecar, otherwise it
|
|
||||||
* will return the standard [[link-eip-2718]] payload. The
|
|
||||||
* [[unsignedSerialized]] is unaffected regardless.
|
|
||||||
*
|
|
||||||
* When setting ``blobs``, either fully valid [[Blob]] objects
|
|
||||||
* may be specified (i.e. correctly padded, with correct
|
|
||||||
* committments and proofs) or a raw [[BytesLike]] may
|
|
||||||
* be provided.
|
|
||||||
*
|
|
||||||
* If raw [[BytesLike]] are provided, the [[kzg]] property **must**
|
|
||||||
* be already set. The blob will be correctly padded and the
|
|
||||||
* [[KzgLibrary]] will be used to compute the committment and
|
|
||||||
* proof for the blob.
|
|
||||||
*
|
|
||||||
* A BLOb is a sequence of field elements, each of which must
|
|
||||||
* be within the BLS field modulo, so some additional processing
|
|
||||||
* may be required to encode arbitrary data to ensure each 32 byte
|
|
||||||
* field is within the valid range.
|
|
||||||
*
|
|
||||||
* Setting this automatically populates [[blobVersionedHashes]],
|
|
||||||
* overwriting any existing values. Setting this to ``null``
|
|
||||||
* does **not** remove the [[blobVersionedHashes]], leaving them
|
|
||||||
* present.
|
|
||||||
*/
|
|
||||||
get blobs() {
|
|
||||||
if (this.#blobs == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return this.#blobs.map((b) => Object.assign({}, b));
|
|
||||||
}
|
|
||||||
set blobs(_blobs) {
|
|
||||||
if (_blobs == null) {
|
|
||||||
this.#blobs = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const blobs = [];
|
|
||||||
const versionedHashes = [];
|
|
||||||
for (let i = 0; i < _blobs.length; i++) {
|
|
||||||
const blob = _blobs[i];
|
|
||||||
if (isBytesLike(blob)) {
|
|
||||||
assert(this.#kzg, "adding a raw blob requires a KZG library", "UNSUPPORTED_OPERATION", {
|
|
||||||
operation: "set blobs()"
|
|
||||||
});
|
|
||||||
let data = getBytes(blob);
|
|
||||||
assertArgument(data.length <= BLOB_SIZE, "blob is too large", `blobs[${i}]`, blob);
|
|
||||||
// Pad blob if necessary
|
|
||||||
if (data.length !== BLOB_SIZE) {
|
|
||||||
const padded = new Uint8Array(BLOB_SIZE);
|
|
||||||
padded.set(data);
|
|
||||||
data = padded;
|
|
||||||
}
|
|
||||||
const commit = this.#kzg.blobToKzgCommitment(data);
|
|
||||||
const proof = hexlify(this.#kzg.computeBlobKzgProof(data, commit));
|
|
||||||
blobs.push({
|
|
||||||
data: hexlify(data),
|
|
||||||
commitment: hexlify(commit),
|
|
||||||
proof
|
|
||||||
});
|
|
||||||
versionedHashes.push(getVersionedHash(1, commit));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
const commit = hexlify(blob.commitment);
|
|
||||||
blobs.push({
|
|
||||||
data: hexlify(blob.data),
|
|
||||||
commitment: commit,
|
|
||||||
proof: hexlify(blob.proof)
|
|
||||||
});
|
|
||||||
versionedHashes.push(getVersionedHash(1, commit));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.#blobs = blobs;
|
|
||||||
this.#blobVersionedHashes = versionedHashes;
|
|
||||||
}
|
|
||||||
get kzg() { return this.#kzg; }
|
|
||||||
set kzg(kzg) {
|
|
||||||
this.#kzg = kzg;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Creates a new Transaction with default values.
|
* Creates a new Transaction with default values.
|
||||||
*/
|
*/
|
||||||
@ -10300,8 +10159,6 @@ class Transaction {
|
|||||||
this.#accessList = null;
|
this.#accessList = null;
|
||||||
this.#maxFeePerBlobGas = null;
|
this.#maxFeePerBlobGas = null;
|
||||||
this.#blobVersionedHashes = null;
|
this.#blobVersionedHashes = null;
|
||||||
this.#blobs = null;
|
|
||||||
this.#kzg = null;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The transaction hash, if signed. Otherwise, ``null``.
|
* The transaction hash, if signed. Otherwise, ``null``.
|
||||||
@ -10310,7 +10167,7 @@ class Transaction {
|
|||||||
if (this.signature == null) {
|
if (this.signature == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return keccak256(this.#getSerialized(true, false));
|
return keccak256(this.serialized);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The pre-image hash of this transaction.
|
* The pre-image hash of this transaction.
|
||||||
@ -10348,21 +10205,6 @@ class Transaction {
|
|||||||
isSigned() {
|
isSigned() {
|
||||||
return this.signature != null;
|
return this.signature != null;
|
||||||
}
|
}
|
||||||
#getSerialized(signed, sidecar) {
|
|
||||||
assert(!signed || this.signature != null, "cannot serialize unsigned transaction; maybe you meant .unsignedSerialized", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
|
|
||||||
const sig = signed ? this.signature : null;
|
|
||||||
switch (this.inferType()) {
|
|
||||||
case 0:
|
|
||||||
return _serializeLegacy(this, sig);
|
|
||||||
case 1:
|
|
||||||
return _serializeEip2930(this, sig);
|
|
||||||
case 2:
|
|
||||||
return _serializeEip1559(this, sig);
|
|
||||||
case 3:
|
|
||||||
return _serializeEip4844(this, sig, sidecar ? this.blobs : null);
|
|
||||||
}
|
|
||||||
assert(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* The serialized transaction.
|
* The serialized transaction.
|
||||||
*
|
*
|
||||||
@ -10370,7 +10212,18 @@ class Transaction {
|
|||||||
* use [[unsignedSerialized]].
|
* use [[unsignedSerialized]].
|
||||||
*/
|
*/
|
||||||
get serialized() {
|
get serialized() {
|
||||||
return this.#getSerialized(true, true);
|
assert(this.signature != null, "cannot serialize unsigned transaction; maybe you meant .unsignedSerialized", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
|
||||||
|
switch (this.inferType()) {
|
||||||
|
case 0:
|
||||||
|
return _serializeLegacy(this, this.signature);
|
||||||
|
case 1:
|
||||||
|
return _serializeEip2930(this, this.signature);
|
||||||
|
case 2:
|
||||||
|
return _serializeEip1559(this, this.signature);
|
||||||
|
case 3:
|
||||||
|
return _serializeEip4844(this, this.signature);
|
||||||
|
}
|
||||||
|
assert(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The transaction pre-image.
|
* The transaction pre-image.
|
||||||
@ -10379,7 +10232,17 @@ class Transaction {
|
|||||||
* authorize this transaction.
|
* authorize this transaction.
|
||||||
*/
|
*/
|
||||||
get unsignedSerialized() {
|
get unsignedSerialized() {
|
||||||
return this.#getSerialized(false, false);
|
switch (this.inferType()) {
|
||||||
|
case 0:
|
||||||
|
return _serializeLegacy(this);
|
||||||
|
case 1:
|
||||||
|
return _serializeEip2930(this);
|
||||||
|
case 2:
|
||||||
|
return _serializeEip1559(this);
|
||||||
|
case 3:
|
||||||
|
return _serializeEip4844(this);
|
||||||
|
}
|
||||||
|
assert(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".unsignedSerialized" });
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Return the most "likely" type; currently the highest
|
* Return the most "likely" type; currently the highest
|
||||||
@ -10579,24 +10442,15 @@ class Transaction {
|
|||||||
if (tx.accessList != null) {
|
if (tx.accessList != null) {
|
||||||
result.accessList = tx.accessList;
|
result.accessList = tx.accessList;
|
||||||
}
|
}
|
||||||
// This will get overwritten by blobs, if present
|
|
||||||
if (tx.blobVersionedHashes != null) {
|
if (tx.blobVersionedHashes != null) {
|
||||||
result.blobVersionedHashes = tx.blobVersionedHashes;
|
result.blobVersionedHashes = tx.blobVersionedHashes;
|
||||||
}
|
}
|
||||||
// Make sure we assign the kzg before assigning blobs, which
|
|
||||||
// require the library in the event raw blob data is provided.
|
|
||||||
if (tx.kzg != null) {
|
|
||||||
result.kzg = tx.kzg;
|
|
||||||
}
|
|
||||||
if (tx.blobs != null) {
|
|
||||||
result.blobs = tx.blobs;
|
|
||||||
}
|
|
||||||
if (tx.hash != null) {
|
if (tx.hash != null) {
|
||||||
assertArgument(result.isSigned(), "unsigned transaction cannot define '.hash'", "tx", tx);
|
assertArgument(result.isSigned(), "unsigned transaction cannot define hash", "tx", tx);
|
||||||
assertArgument(result.hash === tx.hash, "hash mismatch", "tx", tx);
|
assertArgument(result.hash === tx.hash, "hash mismatch", "tx", tx);
|
||||||
}
|
}
|
||||||
if (tx.from != null) {
|
if (tx.from != null) {
|
||||||
assertArgument(result.isSigned(), "unsigned transaction cannot define '.from'", "tx", tx);
|
assertArgument(result.isSigned(), "unsigned transaction cannot define from", "tx", tx);
|
||||||
assertArgument(result.from.toLowerCase() === (tx.from || "").toLowerCase(), "from mismatch", "tx", tx);
|
assertArgument(result.from.toLowerCase() === (tx.from || "").toLowerCase(), "from mismatch", "tx", tx);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -13986,7 +13840,7 @@ function copyRequest(req) {
|
|||||||
if (req.data) {
|
if (req.data) {
|
||||||
result.data = hexlify(req.data);
|
result.data = hexlify(req.data);
|
||||||
}
|
}
|
||||||
const bigIntKeys = "chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);
|
const bigIntKeys = "chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);
|
||||||
for (const key of bigIntKeys) {
|
for (const key of bigIntKeys) {
|
||||||
if (!(key in req) || req[key] == null) {
|
if (!(key in req) || req[key] == null) {
|
||||||
continue;
|
continue;
|
||||||
@ -14012,20 +13866,6 @@ function copyRequest(req) {
|
|||||||
if ("customData" in req) {
|
if ("customData" in req) {
|
||||||
result.customData = req.customData;
|
result.customData = req.customData;
|
||||||
}
|
}
|
||||||
if ("blobVersionedHashes" in req && req.blobVersionedHashes) {
|
|
||||||
result.blobVersionedHashes = req.blobVersionedHashes.slice();
|
|
||||||
}
|
|
||||||
if ("kzg" in req) {
|
|
||||||
result.kzg = req.kzg;
|
|
||||||
}
|
|
||||||
if ("blobs" in req && req.blobs) {
|
|
||||||
result.blobs = req.blobs.map((b) => {
|
|
||||||
if (isBytesLike(b)) {
|
|
||||||
return hexlify(b);
|
|
||||||
}
|
|
||||||
return Object.assign({}, b);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -14113,11 +13953,6 @@ class Block {
|
|||||||
* including this block.
|
* including this block.
|
||||||
*/
|
*/
|
||||||
miner;
|
miner;
|
||||||
/**
|
|
||||||
* The latest RANDAO mix of the post beacon state of
|
|
||||||
* the previous block.
|
|
||||||
*/
|
|
||||||
prevRandao;
|
|
||||||
/**
|
/**
|
||||||
* Any extra data the validator wished to include.
|
* Any extra data the validator wished to include.
|
||||||
*/
|
*/
|
||||||
@ -14158,7 +13993,6 @@ class Block {
|
|||||||
blobGasUsed: block.blobGasUsed,
|
blobGasUsed: block.blobGasUsed,
|
||||||
excessBlobGas: block.excessBlobGas,
|
excessBlobGas: block.excessBlobGas,
|
||||||
miner: block.miner,
|
miner: block.miner,
|
||||||
prevRandao: getValue(block.prevRandao),
|
|
||||||
extraData: block.extraData,
|
extraData: block.extraData,
|
||||||
baseFeePerGas: getValue(block.baseFeePerGas),
|
baseFeePerGas: getValue(block.baseFeePerGas),
|
||||||
stateRoot: block.stateRoot,
|
stateRoot: block.stateRoot,
|
||||||
@ -14201,7 +14035,7 @@ class Block {
|
|||||||
* Returns a JSON-friendly value.
|
* Returns a JSON-friendly value.
|
||||||
*/
|
*/
|
||||||
toJSON() {
|
toJSON() {
|
||||||
const { baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash, miner, prevRandao, nonce, number, parentHash, parentBeaconBlockRoot, stateRoot, receiptsRoot, timestamp, transactions } = this;
|
const { baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash, miner, nonce, number, parentHash, parentBeaconBlockRoot, stateRoot, receiptsRoot, timestamp, transactions } = this;
|
||||||
return {
|
return {
|
||||||
_type: "Block",
|
_type: "Block",
|
||||||
baseFeePerGas: toJson(baseFeePerGas),
|
baseFeePerGas: toJson(baseFeePerGas),
|
||||||
@ -14211,7 +14045,7 @@ class Block {
|
|||||||
gasUsed: toJson(gasUsed),
|
gasUsed: toJson(gasUsed),
|
||||||
blobGasUsed: toJson(this.blobGasUsed),
|
blobGasUsed: toJson(this.blobGasUsed),
|
||||||
excessBlobGas: toJson(this.excessBlobGas),
|
excessBlobGas: toJson(this.excessBlobGas),
|
||||||
hash, miner, prevRandao, nonce, number, parentHash, timestamp,
|
hash, miner, nonce, number, parentHash, timestamp,
|
||||||
parentBeaconBlockRoot, stateRoot, receiptsRoot,
|
parentBeaconBlockRoot, stateRoot, receiptsRoot,
|
||||||
transactions,
|
transactions,
|
||||||
};
|
};
|
||||||
@ -17006,11 +16840,8 @@ const _formatBlock = object({
|
|||||||
blobGasUsed: allowNull(getBigInt, null),
|
blobGasUsed: allowNull(getBigInt, null),
|
||||||
excessBlobGas: allowNull(getBigInt, null),
|
excessBlobGas: allowNull(getBigInt, null),
|
||||||
miner: allowNull(getAddress),
|
miner: allowNull(getAddress),
|
||||||
prevRandao: allowNull(formatHash, null),
|
|
||||||
extraData: formatData,
|
extraData: formatData,
|
||||||
baseFeePerGas: allowNull(getBigInt)
|
baseFeePerGas: allowNull(getBigInt)
|
||||||
}, {
|
|
||||||
prevRandao: ["mixHash"]
|
|
||||||
});
|
});
|
||||||
function formatBlock(value) {
|
function formatBlock(value) {
|
||||||
const result = _formatBlock(value);
|
const result = _formatBlock(value);
|
||||||
@ -17711,14 +17542,12 @@ function injectCommonNetworks() {
|
|||||||
registerEth("bnbt", 97, {});
|
registerEth("bnbt", 97, {});
|
||||||
registerEth("linea", 59144, { ensNetwork: 1 });
|
registerEth("linea", 59144, { ensNetwork: 1 });
|
||||||
registerEth("linea-goerli", 59140, {});
|
registerEth("linea-goerli", 59140, {});
|
||||||
registerEth("linea-sepolia", 59141, {});
|
|
||||||
registerEth("matic", 137, {
|
registerEth("matic", 137, {
|
||||||
ensNetwork: 1,
|
ensNetwork: 1,
|
||||||
plugins: [
|
plugins: [
|
||||||
getGasStationPlugin("https:/\/gasstation.polygon.technology/v2")
|
getGasStationPlugin("https:/\/gasstation.polygon.technology/v2")
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
registerEth("matic-amoy", 80002, {});
|
|
||||||
registerEth("matic-mumbai", 80001, {
|
registerEth("matic-mumbai", 80001, {
|
||||||
altNames: ["maticMumbai", "maticmum"],
|
altNames: ["maticMumbai", "maticmum"],
|
||||||
plugins: [
|
plugins: [
|
||||||
@ -19537,8 +19366,8 @@ class AbstractSigner {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (pop.type === 2 || pop.type === 3) {
|
else if (pop.type === 2) {
|
||||||
// Explicitly using EIP-1559 or EIP-4844
|
// Explicitly using EIP-1559
|
||||||
// Populate missing fee data
|
// Populate missing fee data
|
||||||
if (pop.maxFeePerGas == null) {
|
if (pop.maxFeePerGas == null) {
|
||||||
pop.maxFeePerGas = feeData.maxFeePerGas;
|
pop.maxFeePerGas = feeData.maxFeePerGas;
|
||||||
@ -19742,9 +19571,6 @@ class FilterIdSubscriber {
|
|||||||
if (filterIdPromise) {
|
if (filterIdPromise) {
|
||||||
this.#filterIdPromise = null;
|
this.#filterIdPromise = null;
|
||||||
filterIdPromise.then((filterId) => {
|
filterIdPromise.then((filterId) => {
|
||||||
if (this.#provider.destroyed) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.#provider.send("eth_uninstallFilter", [filterId]);
|
this.#provider.send("eth_uninstallFilter", [filterId]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -20773,7 +20599,7 @@ function spelunkMessage(value) {
|
|||||||
* @_subsection: api/providers/thirdparty:Ankr [providers-ankr]
|
* @_subsection: api/providers/thirdparty:Ankr [providers-ankr]
|
||||||
*/
|
*/
|
||||||
const defaultApiKey$1 = "9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";
|
const defaultApiKey$1 = "9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";
|
||||||
function getHost$5(name) {
|
function getHost$4(name) {
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case "mainnet":
|
case "mainnet":
|
||||||
return "rpc.ankr.com/eth";
|
return "rpc.ankr.com/eth";
|
||||||
@ -20855,7 +20681,7 @@ class AnkrProvider extends JsonRpcProvider {
|
|||||||
if (apiKey == null) {
|
if (apiKey == null) {
|
||||||
apiKey = defaultApiKey$1;
|
apiKey = defaultApiKey$1;
|
||||||
}
|
}
|
||||||
const request = new FetchRequest(`https:/\/${getHost$5(network.name)}/${apiKey}`);
|
const request = new FetchRequest(`https:/\/${getHost$4(network.name)}/${apiKey}`);
|
||||||
request.allowGzip = true;
|
request.allowGzip = true;
|
||||||
if (apiKey === defaultApiKey$1) {
|
if (apiKey === defaultApiKey$1) {
|
||||||
request.retryFunc = async (request, response, attempt) => {
|
request.retryFunc = async (request, response, attempt) => {
|
||||||
@ -20897,13 +20723,12 @@ class AnkrProvider extends JsonRpcProvider {
|
|||||||
* - Optimism Goerli Testnet (``optimism-goerli``)
|
* - Optimism Goerli Testnet (``optimism-goerli``)
|
||||||
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
||||||
* - Polygon (``matic``)
|
* - Polygon (``matic``)
|
||||||
* - Polygon Amoy Testnet (``matic-amoy``)
|
|
||||||
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
||||||
*
|
*
|
||||||
* @_subsection: api/providers/thirdparty:Alchemy [providers-alchemy]
|
* @_subsection: api/providers/thirdparty:Alchemy [providers-alchemy]
|
||||||
*/
|
*/
|
||||||
const defaultApiKey = "_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";
|
const defaultApiKey = "_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";
|
||||||
function getHost$4(name) {
|
function getHost$3(name) {
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case "mainnet":
|
case "mainnet":
|
||||||
return "eth-mainnet.alchemyapi.io";
|
return "eth-mainnet.alchemyapi.io";
|
||||||
@ -20925,8 +20750,6 @@ function getHost$4(name) {
|
|||||||
return "base-sepolia.g.alchemy.com";
|
return "base-sepolia.g.alchemy.com";
|
||||||
case "matic":
|
case "matic":
|
||||||
return "polygon-mainnet.g.alchemy.com";
|
return "polygon-mainnet.g.alchemy.com";
|
||||||
case "matic-amoy":
|
|
||||||
return "polygon-amoy.g.alchemy.com";
|
|
||||||
case "matic-mumbai":
|
case "matic-mumbai":
|
||||||
return "polygon-mumbai.g.alchemy.com";
|
return "polygon-mumbai.g.alchemy.com";
|
||||||
case "optimism":
|
case "optimism":
|
||||||
@ -21009,7 +20832,7 @@ class AlchemyProvider extends JsonRpcProvider {
|
|||||||
if (apiKey == null) {
|
if (apiKey == null) {
|
||||||
apiKey = defaultApiKey;
|
apiKey = defaultApiKey;
|
||||||
}
|
}
|
||||||
const request = new FetchRequest(`https:/\/${getHost$4(network.name)}/v2/${apiKey}`);
|
const request = new FetchRequest(`https:/\/${getHost$3(network.name)}/v2/${apiKey}`);
|
||||||
request.allowGzip = true;
|
request.allowGzip = true;
|
||||||
if (apiKey === defaultApiKey) {
|
if (apiKey === defaultApiKey) {
|
||||||
request.retryFunc = async (request, response, attempt) => {
|
request.retryFunc = async (request, response, attempt) => {
|
||||||
@ -21021,100 +20844,6 @@ class AlchemyProvider extends JsonRpcProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* [[link-chainstack]] provides a third-party service for connecting to
|
|
||||||
* various blockchains over JSON-RPC.
|
|
||||||
*
|
|
||||||
* **Supported Networks**
|
|
||||||
*
|
|
||||||
* - Ethereum Mainnet (``mainnet``)
|
|
||||||
* - Arbitrum (``arbitrum``)
|
|
||||||
* - BNB Smart Chain Mainnet (``bnb``)
|
|
||||||
* - Polygon (``matic``)
|
|
||||||
*
|
|
||||||
* @_subsection: api/providers/thirdparty:Chainstack [providers-chainstack]
|
|
||||||
*/
|
|
||||||
function getApiKey(name) {
|
|
||||||
switch (name) {
|
|
||||||
case "mainnet": return "39f1d67cedf8b7831010a665328c9197";
|
|
||||||
case "arbitrum": return "0550c209db33c3abf4cc927e1e18cea1";
|
|
||||||
case "bnb": return "98b5a77e531614387366f6fc5da097f8";
|
|
||||||
case "matic": return "cd9d4d70377471aa7c142ec4a4205249";
|
|
||||||
}
|
|
||||||
assertArgument(false, "unsupported network", "network", name);
|
|
||||||
}
|
|
||||||
function getHost$3(name) {
|
|
||||||
switch (name) {
|
|
||||||
case "mainnet":
|
|
||||||
return "ethereum-mainnet.core.chainstack.com";
|
|
||||||
case "arbitrum":
|
|
||||||
return "arbitrum-mainnet.core.chainstack.com";
|
|
||||||
case "bnb":
|
|
||||||
return "bsc-mainnet.core.chainstack.com";
|
|
||||||
case "matic":
|
|
||||||
return "polygon-mainnet.core.chainstack.com";
|
|
||||||
}
|
|
||||||
assertArgument(false, "unsupported network", "network", name);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* The **ChainstackProvider** connects to the [[link-chainstack]]
|
|
||||||
* JSON-RPC end-points.
|
|
||||||
*
|
|
||||||
* By default, a highly-throttled API key is used, which is
|
|
||||||
* appropriate for quick prototypes and simple scripts. To
|
|
||||||
* gain access to an increased rate-limit, it is highly
|
|
||||||
* recommended to [sign up here](link-chainstack).
|
|
||||||
*/
|
|
||||||
class ChainstackProvider extends JsonRpcProvider {
|
|
||||||
/**
|
|
||||||
* The API key for the Chainstack connection.
|
|
||||||
*/
|
|
||||||
apiKey;
|
|
||||||
/**
|
|
||||||
* Creates a new **ChainstackProvider**.
|
|
||||||
*/
|
|
||||||
constructor(_network, apiKey) {
|
|
||||||
if (_network == null) {
|
|
||||||
_network = "mainnet";
|
|
||||||
}
|
|
||||||
const network = Network.from(_network);
|
|
||||||
if (apiKey == null) {
|
|
||||||
apiKey = getApiKey(network.name);
|
|
||||||
}
|
|
||||||
const request = ChainstackProvider.getRequest(network, apiKey);
|
|
||||||
super(request, network, { staticNetwork: network });
|
|
||||||
defineProperties(this, { apiKey });
|
|
||||||
}
|
|
||||||
_getProvider(chainId) {
|
|
||||||
try {
|
|
||||||
return new ChainstackProvider(chainId, this.apiKey);
|
|
||||||
}
|
|
||||||
catch (error) { }
|
|
||||||
return super._getProvider(chainId);
|
|
||||||
}
|
|
||||||
isCommunityResource() {
|
|
||||||
return (this.apiKey === getApiKey(this._network.name));
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Returns a prepared request for connecting to %%network%%
|
|
||||||
* with %%apiKey%% and %%projectSecret%%.
|
|
||||||
*/
|
|
||||||
static getRequest(network, apiKey) {
|
|
||||||
if (apiKey == null) {
|
|
||||||
apiKey = getApiKey(network.name);
|
|
||||||
}
|
|
||||||
const request = new FetchRequest(`https:/\/${getHost$3(network.name)}/${apiKey}`);
|
|
||||||
request.allowGzip = true;
|
|
||||||
if (apiKey === getApiKey(network.name)) {
|
|
||||||
request.retryFunc = async (request, response, attempt) => {
|
|
||||||
showThrottleMessage("ChainstackProvider");
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return request;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* About Cloudflare
|
* About Cloudflare
|
||||||
*
|
*
|
||||||
@ -21144,7 +20873,7 @@ class CloudflareProvider extends JsonRpcProvider {
|
|||||||
* - Ethereum Mainnet (``mainnet``)
|
* - Ethereum Mainnet (``mainnet``)
|
||||||
* - Goerli Testnet (``goerli``)
|
* - Goerli Testnet (``goerli``)
|
||||||
* - Sepolia Testnet (``sepolia``)
|
* - Sepolia Testnet (``sepolia``)
|
||||||
* - Holesky Testnet (``holesky``)
|
* - Sepolia Testnet (``holesky``)
|
||||||
* - Arbitrum (``arbitrum``)
|
* - Arbitrum (``arbitrum``)
|
||||||
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
|
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
|
||||||
* - BNB Smart Chain Mainnet (``bnb``)
|
* - BNB Smart Chain Mainnet (``bnb``)
|
||||||
@ -21690,9 +21419,6 @@ class SocketSubscriber {
|
|||||||
}
|
}
|
||||||
stop() {
|
stop() {
|
||||||
(this.#filterId).then((filterId) => {
|
(this.#filterId).then((filterId) => {
|
||||||
if (this.#provider.destroyed) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.#provider.send("eth_unsubscribe", [filterId]);
|
this.#provider.send("eth_unsubscribe", [filterId]);
|
||||||
});
|
});
|
||||||
this.#filterId = null;
|
this.#filterId = null;
|
||||||
@ -22036,13 +21762,11 @@ class WebSocketProvider extends SocketProvider {
|
|||||||
* - BNB Smart Chain Mainnet (``bnb``)
|
* - BNB Smart Chain Mainnet (``bnb``)
|
||||||
* - BNB Smart Chain Testnet (``bnbt``)
|
* - BNB Smart Chain Testnet (``bnbt``)
|
||||||
* - Linea (``linea``)
|
* - Linea (``linea``)
|
||||||
* - Linea Goerli Testnet (``linea-goerli``)
|
* - Linea Goerlia Testnet (``linea-goerli``)
|
||||||
* - Linea Sepolia Testnet (``linea-sepolia``)
|
|
||||||
* - Optimism (``optimism``)
|
* - Optimism (``optimism``)
|
||||||
* - Optimism Goerli Testnet (``optimism-goerli``)
|
* - Optimism Goerli Testnet (``optimism-goerli``)
|
||||||
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
||||||
* - Polygon (``matic``)
|
* - Polygon (``matic``)
|
||||||
* - Polygon Amoy Testnet (``matic-amoy``)
|
|
||||||
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
||||||
*
|
*
|
||||||
* @_subsection: api/providers/thirdparty:INFURA [providers-infura]
|
* @_subsection: api/providers/thirdparty:INFURA [providers-infura]
|
||||||
@ -22076,12 +21800,8 @@ function getHost$2(name) {
|
|||||||
return "linea-mainnet.infura.io";
|
return "linea-mainnet.infura.io";
|
||||||
case "linea-goerli":
|
case "linea-goerli":
|
||||||
return "linea-goerli.infura.io";
|
return "linea-goerli.infura.io";
|
||||||
case "linea-sepolia":
|
|
||||||
return "linea-sepolia.infura.io";
|
|
||||||
case "matic":
|
case "matic":
|
||||||
return "polygon-mainnet.infura.io";
|
return "polygon-mainnet.infura.io";
|
||||||
case "matic-amoy":
|
|
||||||
return "polygon-amoy.infura.io";
|
|
||||||
case "matic-mumbai":
|
case "matic-mumbai":
|
||||||
return "polygon-mumbai.infura.io";
|
return "polygon-mumbai.infura.io";
|
||||||
case "optimism":
|
case "optimism":
|
||||||
@ -22122,7 +21842,7 @@ class InfuraWebSocketProvider extends WebSocketProvider {
|
|||||||
const req = provider._getConnection();
|
const req = provider._getConnection();
|
||||||
assert(!req.credentials, "INFURA WebSocket project secrets unsupported", "UNSUPPORTED_OPERATION", { operation: "InfuraProvider.getWebSocketProvider()" });
|
assert(!req.credentials, "INFURA WebSocket project secrets unsupported", "UNSUPPORTED_OPERATION", { operation: "InfuraProvider.getWebSocketProvider()" });
|
||||||
const url = req.url.replace(/^http/i, "ws").replace("/v3/", "/ws/v3/");
|
const url = req.url.replace(/^http/i, "ws").replace("/v3/", "/ws/v3/");
|
||||||
super(url, provider._network);
|
super(url, network);
|
||||||
defineProperties(this, {
|
defineProperties(this, {
|
||||||
projectId: provider.projectId,
|
projectId: provider.projectId,
|
||||||
projectSecret: provider.projectSecret
|
projectSecret: provider.projectSecret
|
||||||
@ -23003,7 +22723,6 @@ const Testnets = "goerli kovan sepolia classicKotti optimism-goerli arbitrum-goe
|
|||||||
* - ``"alchemy"``
|
* - ``"alchemy"``
|
||||||
* - ``"ankr"``
|
* - ``"ankr"``
|
||||||
* - ``"cloudflare"``
|
* - ``"cloudflare"``
|
||||||
* - ``"chainstack"``
|
|
||||||
* - ``"etherscan"``
|
* - ``"etherscan"``
|
||||||
* - ``"infura"``
|
* - ``"infura"``
|
||||||
* - ``"publicPolygon"``
|
* - ``"publicPolygon"``
|
||||||
@ -23057,9 +22776,6 @@ function getDefaultProvider(network, options) {
|
|||||||
if (staticNetwork.name === "matic") {
|
if (staticNetwork.name === "matic") {
|
||||||
providers.push(new JsonRpcProvider("https:/\/polygon-rpc.com/", staticNetwork, { staticNetwork }));
|
providers.push(new JsonRpcProvider("https:/\/polygon-rpc.com/", staticNetwork, { staticNetwork }));
|
||||||
}
|
}
|
||||||
else if (staticNetwork.name === "matic-amoy") {
|
|
||||||
providers.push(new JsonRpcProvider("https:/\/rpc-amoy.polygon.technology/", staticNetwork, { staticNetwork }));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (allowService("alchemy")) {
|
if (allowService("alchemy")) {
|
||||||
try {
|
try {
|
||||||
@ -23073,12 +22789,6 @@ function getDefaultProvider(network, options) {
|
|||||||
}
|
}
|
||||||
catch (error) { }
|
catch (error) { }
|
||||||
}
|
}
|
||||||
if (allowService("chainstack")) {
|
|
||||||
try {
|
|
||||||
providers.push(new ChainstackProvider(network, options.chainstack));
|
|
||||||
}
|
|
||||||
catch (error) { }
|
|
||||||
}
|
|
||||||
if (allowService("cloudflare")) {
|
if (allowService("cloudflare")) {
|
||||||
try {
|
try {
|
||||||
providers.push(new CloudflareProvider(network));
|
providers.push(new CloudflareProvider(network));
|
||||||
@ -25442,7 +25152,6 @@ var ethers = /*#__PURE__*/Object.freeze({
|
|||||||
BaseWallet: BaseWallet,
|
BaseWallet: BaseWallet,
|
||||||
Block: Block,
|
Block: Block,
|
||||||
BrowserProvider: BrowserProvider,
|
BrowserProvider: BrowserProvider,
|
||||||
ChainstackProvider: ChainstackProvider,
|
|
||||||
CloudflareProvider: CloudflareProvider,
|
CloudflareProvider: CloudflareProvider,
|
||||||
ConstructorFragment: ConstructorFragment,
|
ConstructorFragment: ConstructorFragment,
|
||||||
Contract: Contract,
|
Contract: Contract,
|
||||||
@ -25624,5 +25333,5 @@ var ethers = /*#__PURE__*/Object.freeze({
|
|||||||
zeroPadValue: zeroPadValue
|
zeroPadValue: zeroPadValue
|
||||||
});
|
});
|
||||||
|
|
||||||
export { AbiCoder, AbstractProvider, AbstractSigner, AlchemyProvider, AnkrProvider, BaseContract, BaseWallet, Block, BrowserProvider, ChainstackProvider, CloudflareProvider, ConstructorFragment, Contract, ContractEventPayload, ContractFactory, ContractTransactionReceipt, ContractTransactionResponse, ContractUnknownEventPayload, EnsPlugin, EnsResolver, ErrorDescription, ErrorFragment, EtherSymbol, EtherscanPlugin, EtherscanProvider, EventFragment, EventLog, EventPayload, FallbackFragment, FallbackProvider, FeeData, FeeDataNetworkPlugin, FetchCancelSignal, FetchRequest, FetchResponse, FetchUrlFeeDataNetworkPlugin, FixedNumber, Fragment, FunctionFragment, GasCostPlugin, HDNodeVoidWallet, HDNodeWallet, Indexed, InfuraProvider, InfuraWebSocketProvider, Interface, IpcSocketProvider, JsonRpcApiProvider, JsonRpcProvider, JsonRpcSigner, LangEn, Log, LogDescription, MaxInt256, MaxUint256, MessagePrefix, MinInt256, Mnemonic, MulticoinProviderPlugin, N$1 as N, NamedFragment, Network, NetworkPlugin, NonceManager, ParamType, PocketProvider, QuickNodeProvider, Result, Signature, SigningKey, SocketBlockSubscriber, SocketEventSubscriber, SocketPendingSubscriber, SocketProvider, SocketSubscriber, StructFragment, Transaction, TransactionDescription, TransactionReceipt, TransactionResponse, Typed, TypedDataEncoder, UndecodedEventLog, UnmanagedSubscriber, Utf8ErrorFuncs, VoidSigner, Wallet, WebSocketProvider, WeiPerEther, Wordlist, WordlistOwl, WordlistOwlA, ZeroAddress, ZeroHash, accessListify, assert, assertArgument, assertArgumentCount, assertNormalize, assertPrivate, checkResultErrors, computeAddress, computeHmac, concat, copyRequest, dataLength, dataSlice, decodeBase58, decodeBase64, decodeBytes32String, decodeRlp, decryptCrowdsaleJson, decryptKeystoreJson, decryptKeystoreJsonSync, defaultPath, defineProperties, dnsEncode, encodeBase58, encodeBase64, encodeBytes32String, encodeRlp, encryptKeystoreJson, encryptKeystoreJsonSync, ensNormalize, ethers, formatEther, formatUnits, fromTwos, getAccountPath, getAddress, getBigInt, getBytes, getBytesCopy, getCreate2Address, getCreateAddress, getDefaultProvider, getIcapAddress, getIndexedAccountPath, getNumber, getUint, hashMessage, hexlify, id, isAddress, isAddressable, isBytesLike, isCallException, isCrowdsaleJson, isError, isHexString, isKeystoreJson, isValidName, keccak256, lock, makeError, mask, namehash, parseEther, parseUnits$1 as parseUnits, pbkdf2, randomBytes, recoverAddress, resolveAddress, resolveProperties, ripemd160, scrypt, scryptSync, sha256, sha512, showThrottleMessage, solidityPacked, solidityPackedKeccak256, solidityPackedSha256, stripZerosLeft, toBeArray, toBeHex, toBigInt, toNumber, toQuantity, toTwos, toUtf8Bytes, toUtf8CodePoints, toUtf8String, uuidV4, verifyMessage, verifyTypedData, version, wordlists, zeroPadBytes, zeroPadValue };
|
export { AbiCoder, AbstractProvider, AbstractSigner, AlchemyProvider, AnkrProvider, BaseContract, BaseWallet, Block, BrowserProvider, CloudflareProvider, ConstructorFragment, Contract, ContractEventPayload, ContractFactory, ContractTransactionReceipt, ContractTransactionResponse, ContractUnknownEventPayload, EnsPlugin, EnsResolver, ErrorDescription, ErrorFragment, EtherSymbol, EtherscanPlugin, EtherscanProvider, EventFragment, EventLog, EventPayload, FallbackFragment, FallbackProvider, FeeData, FeeDataNetworkPlugin, FetchCancelSignal, FetchRequest, FetchResponse, FetchUrlFeeDataNetworkPlugin, FixedNumber, Fragment, FunctionFragment, GasCostPlugin, HDNodeVoidWallet, HDNodeWallet, Indexed, InfuraProvider, InfuraWebSocketProvider, Interface, IpcSocketProvider, JsonRpcApiProvider, JsonRpcProvider, JsonRpcSigner, LangEn, Log, LogDescription, MaxInt256, MaxUint256, MessagePrefix, MinInt256, Mnemonic, MulticoinProviderPlugin, N$1 as N, NamedFragment, Network, NetworkPlugin, NonceManager, ParamType, PocketProvider, QuickNodeProvider, Result, Signature, SigningKey, SocketBlockSubscriber, SocketEventSubscriber, SocketPendingSubscriber, SocketProvider, SocketSubscriber, StructFragment, Transaction, TransactionDescription, TransactionReceipt, TransactionResponse, Typed, TypedDataEncoder, UndecodedEventLog, UnmanagedSubscriber, Utf8ErrorFuncs, VoidSigner, Wallet, WebSocketProvider, WeiPerEther, Wordlist, WordlistOwl, WordlistOwlA, ZeroAddress, ZeroHash, accessListify, assert, assertArgument, assertArgumentCount, assertNormalize, assertPrivate, checkResultErrors, computeAddress, computeHmac, concat, copyRequest, dataLength, dataSlice, decodeBase58, decodeBase64, decodeBytes32String, decodeRlp, decryptCrowdsaleJson, decryptKeystoreJson, decryptKeystoreJsonSync, defaultPath, defineProperties, dnsEncode, encodeBase58, encodeBase64, encodeBytes32String, encodeRlp, encryptKeystoreJson, encryptKeystoreJsonSync, ensNormalize, ethers, formatEther, formatUnits, fromTwos, getAccountPath, getAddress, getBigInt, getBytes, getBytesCopy, getCreate2Address, getCreateAddress, getDefaultProvider, getIcapAddress, getIndexedAccountPath, getNumber, getUint, hashMessage, hexlify, id, isAddress, isAddressable, isBytesLike, isCallException, isCrowdsaleJson, isError, isHexString, isKeystoreJson, isValidName, keccak256, lock, makeError, mask, namehash, parseEther, parseUnits$1 as parseUnits, pbkdf2, randomBytes, recoverAddress, resolveAddress, resolveProperties, ripemd160, scrypt, scryptSync, sha256, sha512, showThrottleMessage, solidityPacked, solidityPackedKeccak256, solidityPackedSha256, stripZerosLeft, toBeArray, toBeHex, toBigInt, toNumber, toQuantity, toTwos, toUtf8Bytes, toUtf8CodePoints, toUtf8String, uuidV4, verifyMessage, verifyTypedData, version, wordlists, zeroPadBytes, zeroPadValue };
|
||||||
//# sourceMappingURL=ethers.js.map
|
//# sourceMappingURL=ethers.js.map
|
||||||
|
2
dist/ethers.js.map
vendored
2
dist/ethers.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/ethers.min.js
vendored
2
dist/ethers.min.js
vendored
File diff suppressed because one or more lines are too long
398
dist/ethers.umd.js
vendored
398
dist/ethers.umd.js
vendored
@ -9,7 +9,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
/**
|
/**
|
||||||
* The current version of Ethers.
|
* The current version of Ethers.
|
||||||
*/
|
*/
|
||||||
const version = "6.12.0";
|
const version = "6.11.1";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Property helper functions.
|
* Property helper functions.
|
||||||
@ -1614,7 +1614,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
clone.#preflight = this.#preflight;
|
clone.#preflight = this.#preflight;
|
||||||
clone.#process = this.#process;
|
clone.#process = this.#process;
|
||||||
clone.#retry = this.#retry;
|
clone.#retry = this.#retry;
|
||||||
clone.#throttle = Object.assign({}, this.#throttle);
|
|
||||||
clone.#getUrlFunc = this.#getUrlFunc;
|
clone.#getUrlFunc = this.#getUrlFunc;
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
@ -2744,45 +2743,35 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns the Result as a normal Array. If %%deep%%, any children
|
* Returns the Result as a normal Array.
|
||||||
* which are Result objects are also converted to a normal Array.
|
|
||||||
*
|
*
|
||||||
* This will throw if there are any outstanding deferred
|
* This will throw if there are any outstanding deferred
|
||||||
* errors.
|
* errors.
|
||||||
*/
|
*/
|
||||||
toArray(deep) {
|
toArray() {
|
||||||
const result = [];
|
const result = [];
|
||||||
this.forEach((item, index) => {
|
this.forEach((item, index) => {
|
||||||
if (item instanceof Error) {
|
if (item instanceof Error) {
|
||||||
throwError(`index ${index}`, item);
|
throwError(`index ${index}`, item);
|
||||||
}
|
}
|
||||||
if (deep && item instanceof Result) {
|
|
||||||
item = item.toArray(deep);
|
|
||||||
}
|
|
||||||
result.push(item);
|
result.push(item);
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns the Result as an Object with each name-value pair. If
|
* Returns the Result as an Object with each name-value pair.
|
||||||
* %%deep%%, any children which are Result objects are also
|
|
||||||
* converted to an Object.
|
|
||||||
*
|
*
|
||||||
* This will throw if any value is unnamed, or if there are
|
* This will throw if any value is unnamed, or if there are
|
||||||
* any outstanding deferred errors.
|
* any outstanding deferred errors.
|
||||||
*/
|
*/
|
||||||
toObject(deep) {
|
toObject() {
|
||||||
return this.#names.reduce((accum, name, index) => {
|
return this.#names.reduce((accum, name, index) => {
|
||||||
assert(name != null, "value at index ${ index } unnamed", "UNSUPPORTED_OPERATION", {
|
assert(name != null, "value at index ${ index } unnamed", "UNSUPPORTED_OPERATION", {
|
||||||
operation: "toObject()"
|
operation: "toObject()"
|
||||||
});
|
});
|
||||||
// Add values for names that don't conflict
|
// Add values for names that don't conflict
|
||||||
if (!(name in accum)) {
|
if (!(name in accum)) {
|
||||||
let child = this.getValue(name);
|
accum[name] = this.getValue(name);
|
||||||
if (deep && child instanceof Result) {
|
|
||||||
child = child.toObject(deep);
|
|
||||||
}
|
|
||||||
accum[name] = child;
|
|
||||||
}
|
}
|
||||||
return accum;
|
return accum;
|
||||||
}, {});
|
}, {});
|
||||||
@ -9640,15 +9629,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
const BN_28 = BigInt(28);
|
const BN_28 = BigInt(28);
|
||||||
const BN_35 = BigInt(35);
|
const BN_35 = BigInt(35);
|
||||||
const BN_MAX_UINT = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
const BN_MAX_UINT = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
||||||
const BLOB_SIZE = 4096 * 32;
|
|
||||||
function getVersionedHash(version, hash) {
|
|
||||||
let versioned = version.toString(16);
|
|
||||||
while (versioned.length < 2) {
|
|
||||||
versioned = "0" + versioned;
|
|
||||||
}
|
|
||||||
versioned += sha256(hash).substring(4);
|
|
||||||
return "0x" + versioned;
|
|
||||||
}
|
|
||||||
function handleAddress(value) {
|
function handleAddress(value) {
|
||||||
if (value === "0x") {
|
if (value === "0x") {
|
||||||
return null;
|
return null;
|
||||||
@ -9731,7 +9711,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
s: zeroPadValue(fields[8], 32),
|
s: zeroPadValue(fields[8], 32),
|
||||||
v
|
v
|
||||||
});
|
});
|
||||||
//tx.hash = keccak256(data);
|
tx.hash = keccak256(data);
|
||||||
}
|
}
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
@ -9822,7 +9802,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
if (fields.length === 9) {
|
if (fields.length === 9) {
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
//tx.hash = keccak256(data);
|
tx.hash = keccak256(data);
|
||||||
_parseEipSignature(tx, fields.slice(9));
|
_parseEipSignature(tx, fields.slice(9));
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
@ -9863,7 +9843,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
if (fields.length === 8) {
|
if (fields.length === 8) {
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
//tx.hash = keccak256(data);
|
tx.hash = keccak256(data);
|
||||||
_parseEipSignature(tx, fields.slice(8));
|
_parseEipSignature(tx, fields.slice(8));
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
@ -9886,29 +9866,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
return concat(["0x01", encodeRlp(fields)]);
|
return concat(["0x01", encodeRlp(fields)]);
|
||||||
}
|
}
|
||||||
function _parseEip4844(data) {
|
function _parseEip4844(data) {
|
||||||
let fields = decodeRlp(getBytes(data).slice(1));
|
const fields = decodeRlp(getBytes(data).slice(1));
|
||||||
let typeName = "3";
|
assertArgument(Array.isArray(fields) && (fields.length === 11 || fields.length === 14), "invalid field count for transaction type: 3", "data", hexlify(data));
|
||||||
let blobs = null;
|
|
||||||
// Parse the network format
|
|
||||||
if (fields.length === 4 && Array.isArray(fields[0])) {
|
|
||||||
typeName = "3 (network format)";
|
|
||||||
const fBlobs = fields[1], fCommits = fields[2], fProofs = fields[3];
|
|
||||||
assertArgument(Array.isArray(fBlobs), "invalid network format: blobs not an array", "fields[1]", fBlobs);
|
|
||||||
assertArgument(Array.isArray(fCommits), "invalid network format: commitments not an array", "fields[2]", fCommits);
|
|
||||||
assertArgument(Array.isArray(fProofs), "invalid network format: proofs not an array", "fields[3]", fProofs);
|
|
||||||
assertArgument(fBlobs.length === fCommits.length, "invalid network format: blobs/commitments length mismatch", "fields", fields);
|
|
||||||
assertArgument(fBlobs.length === fProofs.length, "invalid network format: blobs/proofs length mismatch", "fields", fields);
|
|
||||||
blobs = [];
|
|
||||||
for (let i = 0; i < fields[1].length; i++) {
|
|
||||||
blobs.push({
|
|
||||||
data: fBlobs[i],
|
|
||||||
commitment: fCommits[i],
|
|
||||||
proof: fProofs[i],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
fields = fields[0];
|
|
||||||
}
|
|
||||||
assertArgument(Array.isArray(fields) && (fields.length === 11 || fields.length === 14), `invalid field count for transaction type: ${typeName}`, "data", hexlify(data));
|
|
||||||
const tx = {
|
const tx = {
|
||||||
type: 3,
|
type: 3,
|
||||||
chainId: handleUint(fields[0], "chainId"),
|
chainId: handleUint(fields[0], "chainId"),
|
||||||
@ -9924,10 +9883,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
maxFeePerBlobGas: handleUint(fields[9], "maxFeePerBlobGas"),
|
maxFeePerBlobGas: handleUint(fields[9], "maxFeePerBlobGas"),
|
||||||
blobVersionedHashes: fields[10]
|
blobVersionedHashes: fields[10]
|
||||||
};
|
};
|
||||||
if (blobs) {
|
assertArgument(tx.to != null, "invalid address for transaction type: 3", "data", data);
|
||||||
tx.blobs = blobs;
|
|
||||||
}
|
|
||||||
assertArgument(tx.to != null, `invalid address for transaction type: ${typeName}`, "data", data);
|
|
||||||
assertArgument(Array.isArray(tx.blobVersionedHashes), "invalid blobVersionedHashes: must be an array", "data", data);
|
assertArgument(Array.isArray(tx.blobVersionedHashes), "invalid blobVersionedHashes: must be an array", "data", data);
|
||||||
for (let i = 0; i < tx.blobVersionedHashes.length; i++) {
|
for (let i = 0; i < tx.blobVersionedHashes.length; i++) {
|
||||||
assertArgument(isHexString(tx.blobVersionedHashes[i], 32), `invalid blobVersionedHash at index ${i}: must be length 32`, "data", data);
|
assertArgument(isHexString(tx.blobVersionedHashes[i], 32), `invalid blobVersionedHash at index ${i}: must be length 32`, "data", data);
|
||||||
@ -9936,13 +9892,11 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
if (fields.length === 11) {
|
if (fields.length === 11) {
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
// @TODO: Do we need to do this? This is only called internally
|
tx.hash = keccak256(data);
|
||||||
// and used to verify hashes; it might save time to not do this
|
|
||||||
//tx.hash = keccak256(concat([ "0x03", encodeRlp(fields) ]));
|
|
||||||
_parseEipSignature(tx, fields.slice(11));
|
_parseEipSignature(tx, fields.slice(11));
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
function _serializeEip4844(tx, sig, blobs) {
|
function _serializeEip4844(tx, sig) {
|
||||||
const fields = [
|
const fields = [
|
||||||
formatNumber(tx.chainId, "chainId"),
|
formatNumber(tx.chainId, "chainId"),
|
||||||
formatNumber(tx.nonce, "nonce"),
|
formatNumber(tx.nonce, "nonce"),
|
||||||
@ -9960,18 +9914,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
fields.push(formatNumber(sig.yParity, "yParity"));
|
fields.push(formatNumber(sig.yParity, "yParity"));
|
||||||
fields.push(toBeArray(sig.r));
|
fields.push(toBeArray(sig.r));
|
||||||
fields.push(toBeArray(sig.s));
|
fields.push(toBeArray(sig.s));
|
||||||
// We have blobs; return the network wrapped format
|
|
||||||
if (blobs) {
|
|
||||||
return concat([
|
|
||||||
"0x03",
|
|
||||||
encodeRlp([
|
|
||||||
fields,
|
|
||||||
blobs.map((b) => b.data),
|
|
||||||
blobs.map((b) => b.commitment),
|
|
||||||
blobs.map((b) => b.proof),
|
|
||||||
])
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return concat(["0x03", encodeRlp(fields)]);
|
return concat(["0x03", encodeRlp(fields)]);
|
||||||
}
|
}
|
||||||
@ -10003,8 +9945,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
#accessList;
|
#accessList;
|
||||||
#maxFeePerBlobGas;
|
#maxFeePerBlobGas;
|
||||||
#blobVersionedHashes;
|
#blobVersionedHashes;
|
||||||
#kzg;
|
|
||||||
#blobs;
|
|
||||||
/**
|
/**
|
||||||
* The transaction type.
|
* The transaction type.
|
||||||
*
|
*
|
||||||
@ -10186,7 +10126,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
this.#maxFeePerBlobGas = (value == null) ? null : getBigInt(value, "maxFeePerBlobGas");
|
this.#maxFeePerBlobGas = (value == null) ? null : getBigInt(value, "maxFeePerBlobGas");
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The BLOb versioned hashes for Cancun transactions.
|
* The BLOB versioned hashes for Cancun transactions.
|
||||||
*/
|
*/
|
||||||
get blobVersionedHashes() {
|
get blobVersionedHashes() {
|
||||||
// @TODO: Mutation is inconsistent; if unset, the returned value
|
// @TODO: Mutation is inconsistent; if unset, the returned value
|
||||||
@ -10207,87 +10147,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
}
|
}
|
||||||
this.#blobVersionedHashes = value;
|
this.#blobVersionedHashes = value;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* The BLObs for the Transaction, if any.
|
|
||||||
*
|
|
||||||
* If ``blobs`` is non-``null``, then the [[seriailized]]
|
|
||||||
* will return the network formatted sidecar, otherwise it
|
|
||||||
* will return the standard [[link-eip-2718]] payload. The
|
|
||||||
* [[unsignedSerialized]] is unaffected regardless.
|
|
||||||
*
|
|
||||||
* When setting ``blobs``, either fully valid [[Blob]] objects
|
|
||||||
* may be specified (i.e. correctly padded, with correct
|
|
||||||
* committments and proofs) or a raw [[BytesLike]] may
|
|
||||||
* be provided.
|
|
||||||
*
|
|
||||||
* If raw [[BytesLike]] are provided, the [[kzg]] property **must**
|
|
||||||
* be already set. The blob will be correctly padded and the
|
|
||||||
* [[KzgLibrary]] will be used to compute the committment and
|
|
||||||
* proof for the blob.
|
|
||||||
*
|
|
||||||
* A BLOb is a sequence of field elements, each of which must
|
|
||||||
* be within the BLS field modulo, so some additional processing
|
|
||||||
* may be required to encode arbitrary data to ensure each 32 byte
|
|
||||||
* field is within the valid range.
|
|
||||||
*
|
|
||||||
* Setting this automatically populates [[blobVersionedHashes]],
|
|
||||||
* overwriting any existing values. Setting this to ``null``
|
|
||||||
* does **not** remove the [[blobVersionedHashes]], leaving them
|
|
||||||
* present.
|
|
||||||
*/
|
|
||||||
get blobs() {
|
|
||||||
if (this.#blobs == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return this.#blobs.map((b) => Object.assign({}, b));
|
|
||||||
}
|
|
||||||
set blobs(_blobs) {
|
|
||||||
if (_blobs == null) {
|
|
||||||
this.#blobs = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const blobs = [];
|
|
||||||
const versionedHashes = [];
|
|
||||||
for (let i = 0; i < _blobs.length; i++) {
|
|
||||||
const blob = _blobs[i];
|
|
||||||
if (isBytesLike(blob)) {
|
|
||||||
assert(this.#kzg, "adding a raw blob requires a KZG library", "UNSUPPORTED_OPERATION", {
|
|
||||||
operation: "set blobs()"
|
|
||||||
});
|
|
||||||
let data = getBytes(blob);
|
|
||||||
assertArgument(data.length <= BLOB_SIZE, "blob is too large", `blobs[${i}]`, blob);
|
|
||||||
// Pad blob if necessary
|
|
||||||
if (data.length !== BLOB_SIZE) {
|
|
||||||
const padded = new Uint8Array(BLOB_SIZE);
|
|
||||||
padded.set(data);
|
|
||||||
data = padded;
|
|
||||||
}
|
|
||||||
const commit = this.#kzg.blobToKzgCommitment(data);
|
|
||||||
const proof = hexlify(this.#kzg.computeBlobKzgProof(data, commit));
|
|
||||||
blobs.push({
|
|
||||||
data: hexlify(data),
|
|
||||||
commitment: hexlify(commit),
|
|
||||||
proof
|
|
||||||
});
|
|
||||||
versionedHashes.push(getVersionedHash(1, commit));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
const commit = hexlify(blob.commitment);
|
|
||||||
blobs.push({
|
|
||||||
data: hexlify(blob.data),
|
|
||||||
commitment: commit,
|
|
||||||
proof: hexlify(blob.proof)
|
|
||||||
});
|
|
||||||
versionedHashes.push(getVersionedHash(1, commit));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.#blobs = blobs;
|
|
||||||
this.#blobVersionedHashes = versionedHashes;
|
|
||||||
}
|
|
||||||
get kzg() { return this.#kzg; }
|
|
||||||
set kzg(kzg) {
|
|
||||||
this.#kzg = kzg;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Creates a new Transaction with default values.
|
* Creates a new Transaction with default values.
|
||||||
*/
|
*/
|
||||||
@ -10306,8 +10165,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
this.#accessList = null;
|
this.#accessList = null;
|
||||||
this.#maxFeePerBlobGas = null;
|
this.#maxFeePerBlobGas = null;
|
||||||
this.#blobVersionedHashes = null;
|
this.#blobVersionedHashes = null;
|
||||||
this.#blobs = null;
|
|
||||||
this.#kzg = null;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The transaction hash, if signed. Otherwise, ``null``.
|
* The transaction hash, if signed. Otherwise, ``null``.
|
||||||
@ -10316,7 +10173,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
if (this.signature == null) {
|
if (this.signature == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return keccak256(this.#getSerialized(true, false));
|
return keccak256(this.serialized);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The pre-image hash of this transaction.
|
* The pre-image hash of this transaction.
|
||||||
@ -10354,21 +10211,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
isSigned() {
|
isSigned() {
|
||||||
return this.signature != null;
|
return this.signature != null;
|
||||||
}
|
}
|
||||||
#getSerialized(signed, sidecar) {
|
|
||||||
assert(!signed || this.signature != null, "cannot serialize unsigned transaction; maybe you meant .unsignedSerialized", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
|
|
||||||
const sig = signed ? this.signature : null;
|
|
||||||
switch (this.inferType()) {
|
|
||||||
case 0:
|
|
||||||
return _serializeLegacy(this, sig);
|
|
||||||
case 1:
|
|
||||||
return _serializeEip2930(this, sig);
|
|
||||||
case 2:
|
|
||||||
return _serializeEip1559(this, sig);
|
|
||||||
case 3:
|
|
||||||
return _serializeEip4844(this, sig, sidecar ? this.blobs : null);
|
|
||||||
}
|
|
||||||
assert(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* The serialized transaction.
|
* The serialized transaction.
|
||||||
*
|
*
|
||||||
@ -10376,7 +10218,18 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
* use [[unsignedSerialized]].
|
* use [[unsignedSerialized]].
|
||||||
*/
|
*/
|
||||||
get serialized() {
|
get serialized() {
|
||||||
return this.#getSerialized(true, true);
|
assert(this.signature != null, "cannot serialize unsigned transaction; maybe you meant .unsignedSerialized", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
|
||||||
|
switch (this.inferType()) {
|
||||||
|
case 0:
|
||||||
|
return _serializeLegacy(this, this.signature);
|
||||||
|
case 1:
|
||||||
|
return _serializeEip2930(this, this.signature);
|
||||||
|
case 2:
|
||||||
|
return _serializeEip1559(this, this.signature);
|
||||||
|
case 3:
|
||||||
|
return _serializeEip4844(this, this.signature);
|
||||||
|
}
|
||||||
|
assert(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The transaction pre-image.
|
* The transaction pre-image.
|
||||||
@ -10385,7 +10238,17 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
* authorize this transaction.
|
* authorize this transaction.
|
||||||
*/
|
*/
|
||||||
get unsignedSerialized() {
|
get unsignedSerialized() {
|
||||||
return this.#getSerialized(false, false);
|
switch (this.inferType()) {
|
||||||
|
case 0:
|
||||||
|
return _serializeLegacy(this);
|
||||||
|
case 1:
|
||||||
|
return _serializeEip2930(this);
|
||||||
|
case 2:
|
||||||
|
return _serializeEip1559(this);
|
||||||
|
case 3:
|
||||||
|
return _serializeEip4844(this);
|
||||||
|
}
|
||||||
|
assert(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".unsignedSerialized" });
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Return the most "likely" type; currently the highest
|
* Return the most "likely" type; currently the highest
|
||||||
@ -10585,24 +10448,15 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
if (tx.accessList != null) {
|
if (tx.accessList != null) {
|
||||||
result.accessList = tx.accessList;
|
result.accessList = tx.accessList;
|
||||||
}
|
}
|
||||||
// This will get overwritten by blobs, if present
|
|
||||||
if (tx.blobVersionedHashes != null) {
|
if (tx.blobVersionedHashes != null) {
|
||||||
result.blobVersionedHashes = tx.blobVersionedHashes;
|
result.blobVersionedHashes = tx.blobVersionedHashes;
|
||||||
}
|
}
|
||||||
// Make sure we assign the kzg before assigning blobs, which
|
|
||||||
// require the library in the event raw blob data is provided.
|
|
||||||
if (tx.kzg != null) {
|
|
||||||
result.kzg = tx.kzg;
|
|
||||||
}
|
|
||||||
if (tx.blobs != null) {
|
|
||||||
result.blobs = tx.blobs;
|
|
||||||
}
|
|
||||||
if (tx.hash != null) {
|
if (tx.hash != null) {
|
||||||
assertArgument(result.isSigned(), "unsigned transaction cannot define '.hash'", "tx", tx);
|
assertArgument(result.isSigned(), "unsigned transaction cannot define hash", "tx", tx);
|
||||||
assertArgument(result.hash === tx.hash, "hash mismatch", "tx", tx);
|
assertArgument(result.hash === tx.hash, "hash mismatch", "tx", tx);
|
||||||
}
|
}
|
||||||
if (tx.from != null) {
|
if (tx.from != null) {
|
||||||
assertArgument(result.isSigned(), "unsigned transaction cannot define '.from'", "tx", tx);
|
assertArgument(result.isSigned(), "unsigned transaction cannot define from", "tx", tx);
|
||||||
assertArgument(result.from.toLowerCase() === (tx.from || "").toLowerCase(), "from mismatch", "tx", tx);
|
assertArgument(result.from.toLowerCase() === (tx.from || "").toLowerCase(), "from mismatch", "tx", tx);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -13992,7 +13846,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
if (req.data) {
|
if (req.data) {
|
||||||
result.data = hexlify(req.data);
|
result.data = hexlify(req.data);
|
||||||
}
|
}
|
||||||
const bigIntKeys = "chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);
|
const bigIntKeys = "chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);
|
||||||
for (const key of bigIntKeys) {
|
for (const key of bigIntKeys) {
|
||||||
if (!(key in req) || req[key] == null) {
|
if (!(key in req) || req[key] == null) {
|
||||||
continue;
|
continue;
|
||||||
@ -14018,20 +13872,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
if ("customData" in req) {
|
if ("customData" in req) {
|
||||||
result.customData = req.customData;
|
result.customData = req.customData;
|
||||||
}
|
}
|
||||||
if ("blobVersionedHashes" in req && req.blobVersionedHashes) {
|
|
||||||
result.blobVersionedHashes = req.blobVersionedHashes.slice();
|
|
||||||
}
|
|
||||||
if ("kzg" in req) {
|
|
||||||
result.kzg = req.kzg;
|
|
||||||
}
|
|
||||||
if ("blobs" in req && req.blobs) {
|
|
||||||
result.blobs = req.blobs.map((b) => {
|
|
||||||
if (isBytesLike(b)) {
|
|
||||||
return hexlify(b);
|
|
||||||
}
|
|
||||||
return Object.assign({}, b);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -14119,11 +13959,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
* including this block.
|
* including this block.
|
||||||
*/
|
*/
|
||||||
miner;
|
miner;
|
||||||
/**
|
|
||||||
* The latest RANDAO mix of the post beacon state of
|
|
||||||
* the previous block.
|
|
||||||
*/
|
|
||||||
prevRandao;
|
|
||||||
/**
|
/**
|
||||||
* Any extra data the validator wished to include.
|
* Any extra data the validator wished to include.
|
||||||
*/
|
*/
|
||||||
@ -14164,7 +13999,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
blobGasUsed: block.blobGasUsed,
|
blobGasUsed: block.blobGasUsed,
|
||||||
excessBlobGas: block.excessBlobGas,
|
excessBlobGas: block.excessBlobGas,
|
||||||
miner: block.miner,
|
miner: block.miner,
|
||||||
prevRandao: getValue(block.prevRandao),
|
|
||||||
extraData: block.extraData,
|
extraData: block.extraData,
|
||||||
baseFeePerGas: getValue(block.baseFeePerGas),
|
baseFeePerGas: getValue(block.baseFeePerGas),
|
||||||
stateRoot: block.stateRoot,
|
stateRoot: block.stateRoot,
|
||||||
@ -14207,7 +14041,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
* Returns a JSON-friendly value.
|
* Returns a JSON-friendly value.
|
||||||
*/
|
*/
|
||||||
toJSON() {
|
toJSON() {
|
||||||
const { baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash, miner, prevRandao, nonce, number, parentHash, parentBeaconBlockRoot, stateRoot, receiptsRoot, timestamp, transactions } = this;
|
const { baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash, miner, nonce, number, parentHash, parentBeaconBlockRoot, stateRoot, receiptsRoot, timestamp, transactions } = this;
|
||||||
return {
|
return {
|
||||||
_type: "Block",
|
_type: "Block",
|
||||||
baseFeePerGas: toJson(baseFeePerGas),
|
baseFeePerGas: toJson(baseFeePerGas),
|
||||||
@ -14217,7 +14051,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
gasUsed: toJson(gasUsed),
|
gasUsed: toJson(gasUsed),
|
||||||
blobGasUsed: toJson(this.blobGasUsed),
|
blobGasUsed: toJson(this.blobGasUsed),
|
||||||
excessBlobGas: toJson(this.excessBlobGas),
|
excessBlobGas: toJson(this.excessBlobGas),
|
||||||
hash, miner, prevRandao, nonce, number, parentHash, timestamp,
|
hash, miner, nonce, number, parentHash, timestamp,
|
||||||
parentBeaconBlockRoot, stateRoot, receiptsRoot,
|
parentBeaconBlockRoot, stateRoot, receiptsRoot,
|
||||||
transactions,
|
transactions,
|
||||||
};
|
};
|
||||||
@ -17012,11 +16846,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
blobGasUsed: allowNull(getBigInt, null),
|
blobGasUsed: allowNull(getBigInt, null),
|
||||||
excessBlobGas: allowNull(getBigInt, null),
|
excessBlobGas: allowNull(getBigInt, null),
|
||||||
miner: allowNull(getAddress),
|
miner: allowNull(getAddress),
|
||||||
prevRandao: allowNull(formatHash, null),
|
|
||||||
extraData: formatData,
|
extraData: formatData,
|
||||||
baseFeePerGas: allowNull(getBigInt)
|
baseFeePerGas: allowNull(getBigInt)
|
||||||
}, {
|
|
||||||
prevRandao: ["mixHash"]
|
|
||||||
});
|
});
|
||||||
function formatBlock(value) {
|
function formatBlock(value) {
|
||||||
const result = _formatBlock(value);
|
const result = _formatBlock(value);
|
||||||
@ -17717,14 +17548,12 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
registerEth("bnbt", 97, {});
|
registerEth("bnbt", 97, {});
|
||||||
registerEth("linea", 59144, { ensNetwork: 1 });
|
registerEth("linea", 59144, { ensNetwork: 1 });
|
||||||
registerEth("linea-goerli", 59140, {});
|
registerEth("linea-goerli", 59140, {});
|
||||||
registerEth("linea-sepolia", 59141, {});
|
|
||||||
registerEth("matic", 137, {
|
registerEth("matic", 137, {
|
||||||
ensNetwork: 1,
|
ensNetwork: 1,
|
||||||
plugins: [
|
plugins: [
|
||||||
getGasStationPlugin("https:/\/gasstation.polygon.technology/v2")
|
getGasStationPlugin("https:/\/gasstation.polygon.technology/v2")
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
registerEth("matic-amoy", 80002, {});
|
|
||||||
registerEth("matic-mumbai", 80001, {
|
registerEth("matic-mumbai", 80001, {
|
||||||
altNames: ["maticMumbai", "maticmum"],
|
altNames: ["maticMumbai", "maticmum"],
|
||||||
plugins: [
|
plugins: [
|
||||||
@ -19543,8 +19372,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (pop.type === 2 || pop.type === 3) {
|
else if (pop.type === 2) {
|
||||||
// Explicitly using EIP-1559 or EIP-4844
|
// Explicitly using EIP-1559
|
||||||
// Populate missing fee data
|
// Populate missing fee data
|
||||||
if (pop.maxFeePerGas == null) {
|
if (pop.maxFeePerGas == null) {
|
||||||
pop.maxFeePerGas = feeData.maxFeePerGas;
|
pop.maxFeePerGas = feeData.maxFeePerGas;
|
||||||
@ -19748,9 +19577,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
if (filterIdPromise) {
|
if (filterIdPromise) {
|
||||||
this.#filterIdPromise = null;
|
this.#filterIdPromise = null;
|
||||||
filterIdPromise.then((filterId) => {
|
filterIdPromise.then((filterId) => {
|
||||||
if (this.#provider.destroyed) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.#provider.send("eth_uninstallFilter", [filterId]);
|
this.#provider.send("eth_uninstallFilter", [filterId]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -20779,7 +20605,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
* @_subsection: api/providers/thirdparty:Ankr [providers-ankr]
|
* @_subsection: api/providers/thirdparty:Ankr [providers-ankr]
|
||||||
*/
|
*/
|
||||||
const defaultApiKey$1 = "9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";
|
const defaultApiKey$1 = "9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";
|
||||||
function getHost$5(name) {
|
function getHost$4(name) {
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case "mainnet":
|
case "mainnet":
|
||||||
return "rpc.ankr.com/eth";
|
return "rpc.ankr.com/eth";
|
||||||
@ -20861,7 +20687,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
if (apiKey == null) {
|
if (apiKey == null) {
|
||||||
apiKey = defaultApiKey$1;
|
apiKey = defaultApiKey$1;
|
||||||
}
|
}
|
||||||
const request = new FetchRequest(`https:/\/${getHost$5(network.name)}/${apiKey}`);
|
const request = new FetchRequest(`https:/\/${getHost$4(network.name)}/${apiKey}`);
|
||||||
request.allowGzip = true;
|
request.allowGzip = true;
|
||||||
if (apiKey === defaultApiKey$1) {
|
if (apiKey === defaultApiKey$1) {
|
||||||
request.retryFunc = async (request, response, attempt) => {
|
request.retryFunc = async (request, response, attempt) => {
|
||||||
@ -20903,13 +20729,12 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
* - Optimism Goerli Testnet (``optimism-goerli``)
|
* - Optimism Goerli Testnet (``optimism-goerli``)
|
||||||
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
||||||
* - Polygon (``matic``)
|
* - Polygon (``matic``)
|
||||||
* - Polygon Amoy Testnet (``matic-amoy``)
|
|
||||||
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
||||||
*
|
*
|
||||||
* @_subsection: api/providers/thirdparty:Alchemy [providers-alchemy]
|
* @_subsection: api/providers/thirdparty:Alchemy [providers-alchemy]
|
||||||
*/
|
*/
|
||||||
const defaultApiKey = "_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";
|
const defaultApiKey = "_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";
|
||||||
function getHost$4(name) {
|
function getHost$3(name) {
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case "mainnet":
|
case "mainnet":
|
||||||
return "eth-mainnet.alchemyapi.io";
|
return "eth-mainnet.alchemyapi.io";
|
||||||
@ -20931,8 +20756,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
return "base-sepolia.g.alchemy.com";
|
return "base-sepolia.g.alchemy.com";
|
||||||
case "matic":
|
case "matic":
|
||||||
return "polygon-mainnet.g.alchemy.com";
|
return "polygon-mainnet.g.alchemy.com";
|
||||||
case "matic-amoy":
|
|
||||||
return "polygon-amoy.g.alchemy.com";
|
|
||||||
case "matic-mumbai":
|
case "matic-mumbai":
|
||||||
return "polygon-mumbai.g.alchemy.com";
|
return "polygon-mumbai.g.alchemy.com";
|
||||||
case "optimism":
|
case "optimism":
|
||||||
@ -21015,7 +20838,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
if (apiKey == null) {
|
if (apiKey == null) {
|
||||||
apiKey = defaultApiKey;
|
apiKey = defaultApiKey;
|
||||||
}
|
}
|
||||||
const request = new FetchRequest(`https:/\/${getHost$4(network.name)}/v2/${apiKey}`);
|
const request = new FetchRequest(`https:/\/${getHost$3(network.name)}/v2/${apiKey}`);
|
||||||
request.allowGzip = true;
|
request.allowGzip = true;
|
||||||
if (apiKey === defaultApiKey) {
|
if (apiKey === defaultApiKey) {
|
||||||
request.retryFunc = async (request, response, attempt) => {
|
request.retryFunc = async (request, response, attempt) => {
|
||||||
@ -21027,100 +20850,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* [[link-chainstack]] provides a third-party service for connecting to
|
|
||||||
* various blockchains over JSON-RPC.
|
|
||||||
*
|
|
||||||
* **Supported Networks**
|
|
||||||
*
|
|
||||||
* - Ethereum Mainnet (``mainnet``)
|
|
||||||
* - Arbitrum (``arbitrum``)
|
|
||||||
* - BNB Smart Chain Mainnet (``bnb``)
|
|
||||||
* - Polygon (``matic``)
|
|
||||||
*
|
|
||||||
* @_subsection: api/providers/thirdparty:Chainstack [providers-chainstack]
|
|
||||||
*/
|
|
||||||
function getApiKey(name) {
|
|
||||||
switch (name) {
|
|
||||||
case "mainnet": return "39f1d67cedf8b7831010a665328c9197";
|
|
||||||
case "arbitrum": return "0550c209db33c3abf4cc927e1e18cea1";
|
|
||||||
case "bnb": return "98b5a77e531614387366f6fc5da097f8";
|
|
||||||
case "matic": return "cd9d4d70377471aa7c142ec4a4205249";
|
|
||||||
}
|
|
||||||
assertArgument(false, "unsupported network", "network", name);
|
|
||||||
}
|
|
||||||
function getHost$3(name) {
|
|
||||||
switch (name) {
|
|
||||||
case "mainnet":
|
|
||||||
return "ethereum-mainnet.core.chainstack.com";
|
|
||||||
case "arbitrum":
|
|
||||||
return "arbitrum-mainnet.core.chainstack.com";
|
|
||||||
case "bnb":
|
|
||||||
return "bsc-mainnet.core.chainstack.com";
|
|
||||||
case "matic":
|
|
||||||
return "polygon-mainnet.core.chainstack.com";
|
|
||||||
}
|
|
||||||
assertArgument(false, "unsupported network", "network", name);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* The **ChainstackProvider** connects to the [[link-chainstack]]
|
|
||||||
* JSON-RPC end-points.
|
|
||||||
*
|
|
||||||
* By default, a highly-throttled API key is used, which is
|
|
||||||
* appropriate for quick prototypes and simple scripts. To
|
|
||||||
* gain access to an increased rate-limit, it is highly
|
|
||||||
* recommended to [sign up here](link-chainstack).
|
|
||||||
*/
|
|
||||||
class ChainstackProvider extends JsonRpcProvider {
|
|
||||||
/**
|
|
||||||
* The API key for the Chainstack connection.
|
|
||||||
*/
|
|
||||||
apiKey;
|
|
||||||
/**
|
|
||||||
* Creates a new **ChainstackProvider**.
|
|
||||||
*/
|
|
||||||
constructor(_network, apiKey) {
|
|
||||||
if (_network == null) {
|
|
||||||
_network = "mainnet";
|
|
||||||
}
|
|
||||||
const network = Network.from(_network);
|
|
||||||
if (apiKey == null) {
|
|
||||||
apiKey = getApiKey(network.name);
|
|
||||||
}
|
|
||||||
const request = ChainstackProvider.getRequest(network, apiKey);
|
|
||||||
super(request, network, { staticNetwork: network });
|
|
||||||
defineProperties(this, { apiKey });
|
|
||||||
}
|
|
||||||
_getProvider(chainId) {
|
|
||||||
try {
|
|
||||||
return new ChainstackProvider(chainId, this.apiKey);
|
|
||||||
}
|
|
||||||
catch (error) { }
|
|
||||||
return super._getProvider(chainId);
|
|
||||||
}
|
|
||||||
isCommunityResource() {
|
|
||||||
return (this.apiKey === getApiKey(this._network.name));
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Returns a prepared request for connecting to %%network%%
|
|
||||||
* with %%apiKey%% and %%projectSecret%%.
|
|
||||||
*/
|
|
||||||
static getRequest(network, apiKey) {
|
|
||||||
if (apiKey == null) {
|
|
||||||
apiKey = getApiKey(network.name);
|
|
||||||
}
|
|
||||||
const request = new FetchRequest(`https:/\/${getHost$3(network.name)}/${apiKey}`);
|
|
||||||
request.allowGzip = true;
|
|
||||||
if (apiKey === getApiKey(network.name)) {
|
|
||||||
request.retryFunc = async (request, response, attempt) => {
|
|
||||||
showThrottleMessage("ChainstackProvider");
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return request;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* About Cloudflare
|
* About Cloudflare
|
||||||
*
|
*
|
||||||
@ -21150,7 +20879,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
* - Ethereum Mainnet (``mainnet``)
|
* - Ethereum Mainnet (``mainnet``)
|
||||||
* - Goerli Testnet (``goerli``)
|
* - Goerli Testnet (``goerli``)
|
||||||
* - Sepolia Testnet (``sepolia``)
|
* - Sepolia Testnet (``sepolia``)
|
||||||
* - Holesky Testnet (``holesky``)
|
* - Sepolia Testnet (``holesky``)
|
||||||
* - Arbitrum (``arbitrum``)
|
* - Arbitrum (``arbitrum``)
|
||||||
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
|
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
|
||||||
* - BNB Smart Chain Mainnet (``bnb``)
|
* - BNB Smart Chain Mainnet (``bnb``)
|
||||||
@ -21696,9 +21425,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
}
|
}
|
||||||
stop() {
|
stop() {
|
||||||
(this.#filterId).then((filterId) => {
|
(this.#filterId).then((filterId) => {
|
||||||
if (this.#provider.destroyed) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.#provider.send("eth_unsubscribe", [filterId]);
|
this.#provider.send("eth_unsubscribe", [filterId]);
|
||||||
});
|
});
|
||||||
this.#filterId = null;
|
this.#filterId = null;
|
||||||
@ -22042,13 +21768,11 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
* - BNB Smart Chain Mainnet (``bnb``)
|
* - BNB Smart Chain Mainnet (``bnb``)
|
||||||
* - BNB Smart Chain Testnet (``bnbt``)
|
* - BNB Smart Chain Testnet (``bnbt``)
|
||||||
* - Linea (``linea``)
|
* - Linea (``linea``)
|
||||||
* - Linea Goerli Testnet (``linea-goerli``)
|
* - Linea Goerlia Testnet (``linea-goerli``)
|
||||||
* - Linea Sepolia Testnet (``linea-sepolia``)
|
|
||||||
* - Optimism (``optimism``)
|
* - Optimism (``optimism``)
|
||||||
* - Optimism Goerli Testnet (``optimism-goerli``)
|
* - Optimism Goerli Testnet (``optimism-goerli``)
|
||||||
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
||||||
* - Polygon (``matic``)
|
* - Polygon (``matic``)
|
||||||
* - Polygon Amoy Testnet (``matic-amoy``)
|
|
||||||
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
||||||
*
|
*
|
||||||
* @_subsection: api/providers/thirdparty:INFURA [providers-infura]
|
* @_subsection: api/providers/thirdparty:INFURA [providers-infura]
|
||||||
@ -22082,12 +21806,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
return "linea-mainnet.infura.io";
|
return "linea-mainnet.infura.io";
|
||||||
case "linea-goerli":
|
case "linea-goerli":
|
||||||
return "linea-goerli.infura.io";
|
return "linea-goerli.infura.io";
|
||||||
case "linea-sepolia":
|
|
||||||
return "linea-sepolia.infura.io";
|
|
||||||
case "matic":
|
case "matic":
|
||||||
return "polygon-mainnet.infura.io";
|
return "polygon-mainnet.infura.io";
|
||||||
case "matic-amoy":
|
|
||||||
return "polygon-amoy.infura.io";
|
|
||||||
case "matic-mumbai":
|
case "matic-mumbai":
|
||||||
return "polygon-mumbai.infura.io";
|
return "polygon-mumbai.infura.io";
|
||||||
case "optimism":
|
case "optimism":
|
||||||
@ -22128,7 +21848,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
const req = provider._getConnection();
|
const req = provider._getConnection();
|
||||||
assert(!req.credentials, "INFURA WebSocket project secrets unsupported", "UNSUPPORTED_OPERATION", { operation: "InfuraProvider.getWebSocketProvider()" });
|
assert(!req.credentials, "INFURA WebSocket project secrets unsupported", "UNSUPPORTED_OPERATION", { operation: "InfuraProvider.getWebSocketProvider()" });
|
||||||
const url = req.url.replace(/^http/i, "ws").replace("/v3/", "/ws/v3/");
|
const url = req.url.replace(/^http/i, "ws").replace("/v3/", "/ws/v3/");
|
||||||
super(url, provider._network);
|
super(url, network);
|
||||||
defineProperties(this, {
|
defineProperties(this, {
|
||||||
projectId: provider.projectId,
|
projectId: provider.projectId,
|
||||||
projectSecret: provider.projectSecret
|
projectSecret: provider.projectSecret
|
||||||
@ -23009,7 +22729,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
* - ``"alchemy"``
|
* - ``"alchemy"``
|
||||||
* - ``"ankr"``
|
* - ``"ankr"``
|
||||||
* - ``"cloudflare"``
|
* - ``"cloudflare"``
|
||||||
* - ``"chainstack"``
|
|
||||||
* - ``"etherscan"``
|
* - ``"etherscan"``
|
||||||
* - ``"infura"``
|
* - ``"infura"``
|
||||||
* - ``"publicPolygon"``
|
* - ``"publicPolygon"``
|
||||||
@ -23063,9 +22782,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
if (staticNetwork.name === "matic") {
|
if (staticNetwork.name === "matic") {
|
||||||
providers.push(new JsonRpcProvider("https:/\/polygon-rpc.com/", staticNetwork, { staticNetwork }));
|
providers.push(new JsonRpcProvider("https:/\/polygon-rpc.com/", staticNetwork, { staticNetwork }));
|
||||||
}
|
}
|
||||||
else if (staticNetwork.name === "matic-amoy") {
|
|
||||||
providers.push(new JsonRpcProvider("https:/\/rpc-amoy.polygon.technology/", staticNetwork, { staticNetwork }));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (allowService("alchemy")) {
|
if (allowService("alchemy")) {
|
||||||
try {
|
try {
|
||||||
@ -23079,12 +22795,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
}
|
}
|
||||||
catch (error) { }
|
catch (error) { }
|
||||||
}
|
}
|
||||||
if (allowService("chainstack")) {
|
|
||||||
try {
|
|
||||||
providers.push(new ChainstackProvider(network, options.chainstack));
|
|
||||||
}
|
|
||||||
catch (error) { }
|
|
||||||
}
|
|
||||||
if (allowService("cloudflare")) {
|
if (allowService("cloudflare")) {
|
||||||
try {
|
try {
|
||||||
providers.push(new CloudflareProvider(network));
|
providers.push(new CloudflareProvider(network));
|
||||||
@ -25448,7 +25158,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
BaseWallet: BaseWallet,
|
BaseWallet: BaseWallet,
|
||||||
Block: Block,
|
Block: Block,
|
||||||
BrowserProvider: BrowserProvider,
|
BrowserProvider: BrowserProvider,
|
||||||
ChainstackProvider: ChainstackProvider,
|
|
||||||
CloudflareProvider: CloudflareProvider,
|
CloudflareProvider: CloudflareProvider,
|
||||||
ConstructorFragment: ConstructorFragment,
|
ConstructorFragment: ConstructorFragment,
|
||||||
Contract: Contract,
|
Contract: Contract,
|
||||||
@ -25639,7 +25348,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
|
|||||||
exports.BaseWallet = BaseWallet;
|
exports.BaseWallet = BaseWallet;
|
||||||
exports.Block = Block;
|
exports.Block = Block;
|
||||||
exports.BrowserProvider = BrowserProvider;
|
exports.BrowserProvider = BrowserProvider;
|
||||||
exports.ChainstackProvider = ChainstackProvider;
|
|
||||||
exports.CloudflareProvider = CloudflareProvider;
|
exports.CloudflareProvider = CloudflareProvider;
|
||||||
exports.ConstructorFragment = ConstructorFragment;
|
exports.ConstructorFragment = ConstructorFragment;
|
||||||
exports.Contract = Contract;
|
exports.Contract = Contract;
|
||||||
|
2
dist/ethers.umd.js.map
vendored
2
dist/ethers.umd.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/ethers.umd.min.js
vendored
2
dist/ethers.umd.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/wordlists-extra.js
vendored
2
dist/wordlists-extra.js
vendored
@ -100,7 +100,7 @@ const rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));
|
|||||||
/**
|
/**
|
||||||
* The current version of Ethers.
|
* The current version of Ethers.
|
||||||
*/
|
*/
|
||||||
const version = "6.12.0";
|
const version = "6.11.1";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Property helper functions.
|
* Property helper functions.
|
||||||
|
2
dist/wordlists-extra.js.map
vendored
2
dist/wordlists-extra.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/wordlists-extra.min.js
vendored
2
dist/wordlists-extra.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,5 @@
|
|||||||
link-alchemy [Alchemy](https://alchemy.com/?a=ethers)
|
link-alchemy [Alchemy](https://alchemy.com/?a=ethers)
|
||||||
link-ankr [Ankr](https://www.ankr.com)
|
link-ankr [Ankr](https://www.ankr.com)
|
||||||
link-chainstack [Chainstack](https://chainstack.com)
|
|
||||||
link-cloudflare [Cloudflare](https://developers.cloudflare.com/distributed-web/ethereum-gateway/)
|
link-cloudflare [Cloudflare](https://developers.cloudflare.com/distributed-web/ethereum-gateway/)
|
||||||
link-ens [ENS](https://ens.domains/)
|
link-ens [ENS](https://ens.domains/)
|
||||||
link-ethereum [Ethereum](https://ethereumorg)
|
link-ethereum [Ethereum](https://ethereumorg)
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"create-provider.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/create-provider.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAkGpD,wBAAgB,cAAc,IAAI,IAAI,CAKrC;AAED,eAAO,MAAM,aAAa,mBAAuD,CAAC;AAQlF,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAInE;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,gBAAgB,CAgBtF;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAGxE;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAIzD"}
|
{"version":3,"file":"create-provider.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/create-provider.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA2FpD,wBAAgB,cAAc,IAAI,IAAI,CAKrC;AAED,eAAO,MAAM,aAAa,mBAAuD,CAAC;AAQlF,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAInE;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,gBAAgB,CAgBtF;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAGxE;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAIzD"}
|
@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
exports.connect = exports.checkProvider = exports.getProvider = exports.getProviderNetworks = exports.providerNames = exports.setupProviders = void 0;
|
exports.connect = exports.checkProvider = exports.getProvider = exports.getProviderNetworks = exports.providerNames = exports.setupProviders = void 0;
|
||||||
const index_js_1 = require("../index.js");
|
const index_js_1 = require("../index.js");
|
||||||
;
|
;
|
||||||
const ethNetworks = ["default", "mainnet", "sepolia"];
|
const ethNetworks = ["default", "mainnet", "goerli"];
|
||||||
//const maticNetworks = [ "matic", "maticmum" ];
|
//const maticNetworks = [ "matic", "maticmum" ];
|
||||||
const ProviderCreators = [
|
const ProviderCreators = [
|
||||||
{
|
{
|
||||||
@ -31,13 +31,6 @@ const ProviderCreators = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
*/
|
*/
|
||||||
{
|
|
||||||
name: "ChainstackProvider",
|
|
||||||
networks: ["default", "mainnet", "arbitrum", "bnb", "matic"],
|
|
||||||
create: function (network) {
|
|
||||||
return new index_js_1.ChainstackProvider(network);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "EtherscanProvider",
|
name: "EtherscanProvider",
|
||||||
networks: ethNetworks,
|
networks: ethNetworks,
|
||||||
@ -144,7 +137,7 @@ function getProvider(provider, network) {
|
|||||||
exports.getProvider = getProvider;
|
exports.getProvider = getProvider;
|
||||||
function checkProvider(provider, network) {
|
function checkProvider(provider, network) {
|
||||||
const creator = getCreator(provider);
|
const creator = getCreator(provider);
|
||||||
return (creator != null && creator.networks.indexOf(network) >= 0);
|
return (creator != null);
|
||||||
}
|
}
|
||||||
exports.checkProvider = checkProvider;
|
exports.checkProvider = checkProvider;
|
||||||
function connect(network) {
|
function connect(network) {
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"create-provider.js","sourceRoot":"","sources":["../../src.ts/_tests/create-provider.ts"],"names":[],"mappings":";;;AAAA,0CAYqB;AAQpB,CAAC;AAEF,MAAM,WAAW,GAAG,CAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAE,CAAC;AACxD,gDAAgD;AAEhD,MAAM,gBAAgB,GAA2B;IAC7C;QACI,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,UAAS,OAAe;YAC5B,OAAO,IAAI,0BAAe,CAAC,OAAO,EAAE,kCAAkC,CAAC,CAAC;QAC5E,CAAC;KACJ;IACD;;;;;;;;MAQE;IACF;;;;;;;;MAQE;IACF;QACI,IAAI,EAAE,oBAAoB;QAC1B,QAAQ,EAAE,CAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAE;QAC9D,MAAM,EAAE,UAAS,OAAe;YAC5B,OAAO,IAAI,6BAAkB,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC;KACJ;IACD;QACI,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,UAAS,OAAe;YAC5B,OAAO,IAAI,4BAAiB,CAAC,OAAO,EAAE,oCAAoC,CAAC,CAAC;QAChF,CAAC;KACJ;IACD;QACI,IAAI,EAAE,gBAAgB;QACtB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,UAAS,OAAe;YAC5B,OAAO,IAAI,yBAAc,CAAC,OAAO,EAAE,kCAAkC,CAAC,CAAC;QAC3E,CAAC;KACJ;IACD;QACI,IAAI,EAAE,yBAAyB;QAC/B,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,UAAS,OAAe;YAC5B,OAAO,yBAAc,CAAC,oBAAoB,CAAC,OAAO,EAAE,kCAAkC,CAAC,CAAC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AO,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IACrC,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC;AAC7B,CAAC;AAHD,sCAGC;AAED,SAAgB,OAAO,CAAC,OAAe;IACnC,MAAM,QAAQ,GAAG,WAAW,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACxD,IAAI,QAAQ,IAAI,IAAI,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAyB,OAAQ,EAAE,CAAC,CAAC;KAAE;IAC/E,OAAO,QAAQ,CAAC;AACpB,CAAC;AAJD,0BAIC"}
|
@ -6,8 +6,7 @@ const create_provider_js_1 = require("./create-provider.js");
|
|||||||
const index_js_1 = require("../index.js");
|
const index_js_1 = require("../index.js");
|
||||||
(0, create_provider_js_1.setupProviders)();
|
(0, create_provider_js_1.setupProviders)();
|
||||||
describe("Test Contract", function () {
|
describe("Test Contract", function () {
|
||||||
const addr = "0x24264C81146c23bbF83Db1d3F87d2111C2935Ffa";
|
const addr = "0x99417252Aad7B065940eBdF50d665Fb8879c5958";
|
||||||
const networkName = "sepolia";
|
|
||||||
const abi = [
|
const abi = [
|
||||||
"error CustomError1(uint256 code, string message)",
|
"error CustomError1(uint256 code, string message)",
|
||||||
"event EventUint256(uint256 indexed value)",
|
"event EventUint256(uint256 indexed value)",
|
||||||
@ -22,20 +21,20 @@ describe("Test Contract", function () {
|
|||||||
];
|
];
|
||||||
it("tests contract calls", async function () {
|
it("tests contract calls", async function () {
|
||||||
this.timeout(10000);
|
this.timeout(10000);
|
||||||
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", networkName);
|
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", "goerli");
|
||||||
const contract = new index_js_1.Contract(addr, abi, provider);
|
const contract = new index_js_1.Contract(addr, abi, provider);
|
||||||
assert_1.default.equal(await contract.testCallAdd(4, 5), BigInt(9), "testCallAdd(4, 5)");
|
assert_1.default.equal(await contract.testCallAdd(4, 5), BigInt(9), "testCallAdd(4, 5)");
|
||||||
assert_1.default.equal(await contract.testCallAdd(6, 0), BigInt(6), "testCallAdd(6, 0)");
|
assert_1.default.equal(await contract.testCallAdd(6, 0), BigInt(6), "testCallAdd(6, 0)");
|
||||||
});
|
});
|
||||||
it("tests events", async function () {
|
it("tests events", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", networkName);
|
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", "goerli");
|
||||||
assert_1.default.ok(provider);
|
assert_1.default.ok(provider);
|
||||||
const contract = new index_js_1.Contract(addr, abi, provider);
|
const contract = new index_js_1.Contract(addr, abi, provider);
|
||||||
const signer = new index_js_1.Wallet((process.env.FAUCET_PRIVATEKEY), provider);
|
const signer = new index_js_1.Wallet((process.env.FAUCET_PRIVATEKEY), provider);
|
||||||
const contractSigner = contract.connect(signer);
|
const contractSigner = contract.connect(signer);
|
||||||
const vUint256 = 42;
|
const vUint256 = 42;
|
||||||
const vAddrName = "tests.eth";
|
const vAddrName = "ethers.eth";
|
||||||
const vAddr = "0x228568EA92aC5Bc281c1E30b1893735c60a139F1";
|
const vAddr = "0x228568EA92aC5Bc281c1E30b1893735c60a139F1";
|
||||||
const vString = "Hello";
|
const vString = "Hello";
|
||||||
const vBytes = "0x12345678";
|
const vBytes = "0x12345678";
|
||||||
@ -216,9 +215,8 @@ describe("Test Typed Contract Interaction", function () {
|
|||||||
abi.push(`function testTyped(bool) public pure returns (string memory)`);
|
abi.push(`function testTyped(bool) public pure returns (string memory)`);
|
||||||
abi.push(`function testTyped(bytes memory) public pure returns (string memory)`);
|
abi.push(`function testTyped(bytes memory) public pure returns (string memory)`);
|
||||||
abi.push(`function testTyped(string memory) public pure returns (string memory)`);
|
abi.push(`function testTyped(string memory) public pure returns (string memory)`);
|
||||||
const addr = "0xf20ba47c47a32fc2d9ad846ff06f2fa6e89eec74";
|
const addr = "0x838f41545DA5e18AA0e1ab391085d22E172B7B02";
|
||||||
const networkName = "sepolia";
|
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", "goerli");
|
||||||
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", networkName);
|
|
||||||
const contract = new index_js_1.Contract(addr, abi, provider);
|
const contract = new index_js_1.Contract(addr, abi, provider);
|
||||||
for (const { types, valueFunc } of tests) {
|
for (const { types, valueFunc } of tests) {
|
||||||
for (const type of types) {
|
for (const type of types) {
|
||||||
@ -307,8 +305,7 @@ describe("Test Contract Fallback", function () {
|
|||||||
sendDataAndValue: { error: "overrides" },
|
sendDataAndValue: { error: "overrides" },
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const networkName = "sepolia";
|
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", "goerli");
|
||||||
const provider = (0, create_provider_js_1.getProvider)("InfuraProvider", networkName);
|
|
||||||
const testGroups = [
|
const testGroups = [
|
||||||
{
|
{
|
||||||
group: "sendNone",
|
group: "sendNone",
|
||||||
|
File diff suppressed because one or more lines are too long
@ -6,13 +6,13 @@ const create_provider_js_1 = require("./create-provider.js");
|
|||||||
(0, create_provider_js_1.setupProviders)();
|
(0, create_provider_js_1.setupProviders)();
|
||||||
describe("Resolve ENS avatar", function () {
|
describe("Resolve ENS avatar", function () {
|
||||||
[
|
[
|
||||||
{ title: "data", name: "data-avatar.tests.eth", value: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAMAAACeL25MAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyVpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDYuMC1jMDAyIDc5LjE2NDQ4OCwgMjAyMC8wNy8x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ZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkbM0uMAAAAGUExURQAA/wAAAHtivz4AAAAOSURBVHjaYmDABAABBgAAFAABaEkyYwAAAABJRU5ErkJggg==" },
|
||||||
{ title: "ipfs", name: "ipfs-avatar.tests.eth", value: "https:/\/gateway.ipfs.io/ipfs/QmQsQgpda6JAYkFoeVcj5iPbwV3xRcvaiXv3bhp1VuYUqw" },
|
{ title: "ipfs", name: "ipfs-avatar.tests.ethers.eth", value: "https:/\/gateway.ipfs.io/ipfs/QmQsQgpda6JAYkFoeVcj5iPbwV3xRcvaiXv3bhp1VuYUqw" },
|
||||||
{ title: "url", name: "url-avatar.tests.eth", value: "https:/\/ethers.org/static/logo.png" },
|
{ title: "url", name: "url-avatar.tests.ethers.eth", value: "https:/\/ethers.org/static/logo.png" },
|
||||||
].forEach((test) => {
|
].forEach((test) => {
|
||||||
it(`Resolves avatar for ${test.title}`, async function () {
|
it(`Resolves avatar for ${test.title}`, async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = (0, create_provider_js_1.connect)("sepolia");
|
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||||
const avatar = await provider.getAvatar(test.name);
|
const avatar = await provider.getAvatar(test.name);
|
||||||
assert_1.default.equal(test.value, avatar, "avatar url");
|
assert_1.default.equal(test.value, avatar, "avatar url");
|
||||||
});
|
});
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"test-providers-avatar.js","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-avatar.ts"],"names":[],"mappings":";;;AAAA,4DAA4B;AAE5B,6DAA+D;AAE/D,IAAA,mCAAc,GAAE,CAAC;AAEjB,QAAQ,CAAC,oBAAoB,EAAE;IAC3B;QACI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,owCAAowC,EAAE;QAC7zC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,E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,CAAC,CAAC;YACpB,MAAM,QAAQ,GAAG,IAAA,4BAAO,EAAC,QAAQ,CAAC,CAAC;YACnC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnD,gBAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACP;;;;;;;;;;;;;MAaE;AACF,CAAC,CAAC,CAAC"}
|
@ -15,12 +15,11 @@ describe("Test CCIP execution", function () {
|
|||||||
]);
|
]);
|
||||||
assert_1.default.equal(result, (0, index_js_1.keccak256)(check), "response is equal");
|
assert_1.default.equal(result, (0, index_js_1.keccak256)(check), "response is equal");
|
||||||
};
|
};
|
||||||
const address = "0xaeaa06a37e6421ac63120d6daddee0ffa04b43e8";
|
const address = "0x6C5ed35574a9b4d163f75bBf0595F7540D8FCc2d";
|
||||||
const networkName = "sepolia";
|
|
||||||
const calldata = "0x1234";
|
const calldata = "0x1234";
|
||||||
it("testGet passes under normal operation", async function () {
|
it("testGet passes under normal operation", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||||
// testGet(bytes callData = "0x1234")
|
// testGet(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
to: address, enableCcipRead: true,
|
to: address, enableCcipRead: true,
|
||||||
@ -31,7 +30,7 @@ describe("Test CCIP execution", function () {
|
|||||||
});
|
});
|
||||||
it("testGet should fail with CCIP not explicitly enabled by overrides", async function () {
|
it("testGet should fail with CCIP not explicitly enabled by overrides", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||||
// testGet(bytes callData = "0x1234")
|
// testGet(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
to: address,
|
to: address,
|
||||||
@ -41,17 +40,13 @@ describe("Test CCIP execution", function () {
|
|||||||
const result = await provider.call(tx);
|
const result = await provider.call(tx);
|
||||||
console.log(result);
|
console.log(result);
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
const offchainErrorData = (0, index_js_1.concat)([
|
const offchainErrorData = "0x556f18300000000000000000000000006c5ed35574a9b4d163f75bbf0595f7540d8fcc2d00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000";
|
||||||
"0x556f1830000000000000000000000000",
|
|
||||||
address,
|
|
||||||
"0x00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000"
|
|
||||||
]);
|
|
||||||
return ((0, index_js_1.isCallException)(error) && error.data === offchainErrorData);
|
return ((0, index_js_1.isCallException)(error) && error.data === offchainErrorData);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it("testGet should fail with CCIP explicitly disabled on provider", async function () {
|
it("testGet should fail with CCIP explicitly disabled on provider", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||||
provider.disableCcipRead = true;
|
provider.disableCcipRead = true;
|
||||||
// testGetFail(bytes callData = "0x1234")
|
// testGetFail(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
@ -62,17 +57,13 @@ describe("Test CCIP execution", function () {
|
|||||||
const result = await provider.call(tx);
|
const result = await provider.call(tx);
|
||||||
console.log(result);
|
console.log(result);
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
const offchainErrorData = (0, index_js_1.concat)([
|
const offchainErrorData = "0x556f18300000000000000000000000006c5ed35574a9b4d163f75bbf0595f7540d8fcc2d00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000";
|
||||||
"0x556f1830000000000000000000000000",
|
|
||||||
address,
|
|
||||||
"0x00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000"
|
|
||||||
]);
|
|
||||||
return ((0, index_js_1.isCallException)(error) && error.data === offchainErrorData);
|
return ((0, index_js_1.isCallException)(error) && error.data === offchainErrorData);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it("testGetFail should fail if all URLs 5xx", async function () {
|
it("testGetFail should fail if all URLs 5xx", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||||
// testGetFail(bytes callData = "0x1234")
|
// testGetFail(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
to: address, enableCcipRead: true,
|
to: address, enableCcipRead: true,
|
||||||
@ -89,7 +80,7 @@ describe("Test CCIP execution", function () {
|
|||||||
});
|
});
|
||||||
it("testGetSenderFail should fail if sender does not match", async function () {
|
it("testGetSenderFail should fail if sender does not match", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||||
// testGetSenderFail(bytes callData = "0x1234")
|
// testGetSenderFail(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
to: address, enableCcipRead: true,
|
to: address, enableCcipRead: true,
|
||||||
@ -109,7 +100,7 @@ describe("Test CCIP execution", function () {
|
|||||||
});
|
});
|
||||||
it("testGetMissing should fail if early URL 4xx", async function () {
|
it("testGetMissing should fail if early URL 4xx", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||||
// testGetMissing(bytes callData = "0x1234")
|
// testGetMissing(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
to: address, enableCcipRead: true,
|
to: address, enableCcipRead: true,
|
||||||
@ -126,7 +117,7 @@ describe("Test CCIP execution", function () {
|
|||||||
});
|
});
|
||||||
it("testGetFallback passes if any URL returns correctly", async function () {
|
it("testGetFallback passes if any URL returns correctly", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||||
// testGetFallback(bytes callData = "0x1234")
|
// testGetFallback(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
to: address, enableCcipRead: true,
|
to: address, enableCcipRead: true,
|
||||||
@ -137,7 +128,7 @@ describe("Test CCIP execution", function () {
|
|||||||
});
|
});
|
||||||
it("testPost passes under normal operation", async function () {
|
it("testPost passes under normal operation", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = (0, create_provider_js_1.connect)(networkName);
|
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||||
// testPost(bytes callData = "0x1234")
|
// testPost(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
to: address, enableCcipRead: true,
|
to: address, enableCcipRead: true,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -218,13 +218,13 @@ describe("Test Provider Transaction operations", function () {
|
|||||||
});
|
});
|
||||||
describe("Test Networks", function () {
|
describe("Test Networks", function () {
|
||||||
const networks = [
|
const networks = [
|
||||||
"mainnet", "sepolia", "holesky",
|
"mainnet", "goerli", "sepolia", "holesky",
|
||||||
"arbitrum", "arbitrum-sepolia",
|
"arbitrum", "arbitrum-goerli", "arbitrum-sepolia",
|
||||||
"base", "base-sepolia",
|
"base", "base-goerli", "base-sepolia",
|
||||||
"bnb", "bnbt",
|
"bnb", "bnbt",
|
||||||
"linea", "linea-sepolia",
|
"linea", "linea-goerli",
|
||||||
"matic", "matic-mumbai", "matic-amoy",
|
"matic", "matic-mumbai",
|
||||||
"optimism", "optimism-sepolia",
|
"optimism", "optimism-goerli", "optimism-sepolia",
|
||||||
"xdai",
|
"xdai",
|
||||||
];
|
];
|
||||||
const providerNames = [
|
const providerNames = [
|
||||||
|
File diff suppressed because one or more lines are too long
@ -19,8 +19,8 @@ describe("Tests Provider Call Exception", function () {
|
|||||||
//{ code: 0x41, reason: "OUT_OF_MEMORY" },
|
//{ code: 0x41, reason: "OUT_OF_MEMORY" },
|
||||||
//{ code: 0x51, reason: "UNINITIALIZED_FUNCTION_CALL" },
|
//{ code: 0x51, reason: "UNINITIALIZED_FUNCTION_CALL" },
|
||||||
];
|
];
|
||||||
const testAddr = "0x86d19fF4b2EB0D451511B5B930b01DC71fD9a2Ee";
|
const testAddr = "0xF20Ba47c47a32fc2d9ad846fF06f2fa6e89eeC74";
|
||||||
const networkName = "sepolia";
|
const networkName = "goerli";
|
||||||
for (const { code, reason } of panics) {
|
for (const { code, reason } of panics) {
|
||||||
for (const method of ["call", "estimateGas"]) {
|
for (const method of ["call", "estimateGas"]) {
|
||||||
for (const providerName of create_provider_js_1.providerNames) {
|
for (const providerName of create_provider_js_1.providerNames) {
|
||||||
@ -132,7 +132,7 @@ describe("Tests Provider Call Exception", function () {
|
|||||||
});
|
});
|
||||||
describe("Test Provider Blockchain Errors", function () {
|
describe("Test Provider Blockchain Errors", function () {
|
||||||
const wallet = new index_js_1.Wallet((process.env.FAUCET_PRIVATEKEY));
|
const wallet = new index_js_1.Wallet((process.env.FAUCET_PRIVATEKEY));
|
||||||
const networkName = "sepolia";
|
const networkName = "goerli";
|
||||||
for (const providerName of create_provider_js_1.providerNames) {
|
for (const providerName of create_provider_js_1.providerNames) {
|
||||||
const provider = (0, create_provider_js_1.getProvider)(providerName, networkName);
|
const provider = (0, create_provider_js_1.getProvider)(providerName, networkName);
|
||||||
if (provider == null) {
|
if (provider == null) {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -11,7 +11,7 @@ function stall(duration) {
|
|||||||
describe("Sends Transactions", function () {
|
describe("Sends Transactions", function () {
|
||||||
const wallet = new index_js_1.Wallet((process.env.FAUCET_PRIVATEKEY));
|
const wallet = new index_js_1.Wallet((process.env.FAUCET_PRIVATEKEY));
|
||||||
console.log("Faucet Address:", wallet.address);
|
console.log("Faucet Address:", wallet.address);
|
||||||
const networkName = "sepolia";
|
const networkName = "goerli";
|
||||||
for (const providerName of create_provider_js_1.providerNames) {
|
for (const providerName of create_provider_js_1.providerNames) {
|
||||||
const provider = (0, create_provider_js_1.getProvider)(providerName, networkName);
|
const provider = (0, create_provider_js_1.getProvider)(providerName, networkName);
|
||||||
if (provider == null) {
|
if (provider == null) {
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"test-providers-send.js","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-send.ts"],"names":[],"mappings":";;;AAAA,4DAA4B;AAE5B,0CAA8C;AAE9C,6DAAkF;AAIlF,SAAS,KAAK,CAAC,QAAgB;IAC3B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,GAAG,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,IAAA,mCAAc,GAAE,CAAC;AAEjB,QAAQ,CAAC,oBAAoB,EAAE;IAE3B,MAAM,MAAM,GAAG,IAAI,iBAAM,CAAS,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAE/C,MAAM,WAAW,GAAG,SAAS,CAAC;IAC9B,KAAK,MAAM,YAAY,IAAI,kCAAa,EAAE;QACtC,MAAM,QAAQ,GAAG,IAAA,gCAAW,EAAC,YAAY,EAAE,WAAW,CAAC,CAAC;QACxD,IAAI,QAAQ,IAAI,IAAI,EAAE;YAAE,SAAS;SAAE;QAEnC,EAAE,CAAC,kBAAmB,YAAa,EAAE,EAAE,KAAK;YACxC,IA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;iBACT;gBAAC,OAAO,KAAK,EAAE;oBACZ,IAAI,IAAA,kBAAO,EAAC,KAAK,EAAE,yBAAyB,CAAC,IAAI,IAAA,kBAAO,EAAC,KAAK,EAAE,eAAe,CAAC,EAAE;wBAC9E,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC;wBAClB,SAAS;qBACZ;oBACD,MAAM,KAAK,CAAC;iBACf;aACJ;YACD,gBAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,kBAAkB,CAAC,CAAC;YAEpC,kBAAkB;YAClB,MAAM,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,YAAY;YACrE,uBAAuB;YAEvB,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YACpD,gBAAM,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,EAAE,2BAA2B,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;KACN;AAGL,CAAC,CAAC,CAAC"}
|
@ -5,16 +5,16 @@ const assert_1 = tslib_1.__importDefault(require("assert"));
|
|||||||
const create_provider_js_1 = require("./create-provider.js");
|
const create_provider_js_1 = require("./create-provider.js");
|
||||||
(0, create_provider_js_1.setupProviders)();
|
(0, create_provider_js_1.setupProviders)();
|
||||||
describe("Test EIP-2544 ENS wildcards", function () {
|
describe("Test EIP-2544 ENS wildcards", function () {
|
||||||
const provider = (0, create_provider_js_1.connect)("sepolia");
|
const provider = (0, create_provider_js_1.connect)("goerli");
|
||||||
it("Resolves recursively", async function () {
|
it("Resolves recursively", async function () {
|
||||||
this.timeout(10000);
|
this.timeout(10000);
|
||||||
const resolver = await provider.getResolver("ricmoose.hatch.eth");
|
const resolver = await provider.getResolver("ricmoose.hatch.eth");
|
||||||
assert_1.default.ok(resolver, "failed to get resolver");
|
assert_1.default.ok(resolver, "failed to get resolver");
|
||||||
assert_1.default.equal(resolver.address, "0x657D81B1E647A56457ff035Af22898411673f7FD", "address");
|
assert_1.default.equal(resolver.address, "0x15abA1fa74Bfdecd63A71218DC632d4328Db8168", "address");
|
||||||
assert_1.default.equal(await resolver.supportsWildcard(), true, "supportsWildcard()");
|
assert_1.default.equal(await resolver.supportsWildcard(), true, "supportsWildcard()");
|
||||||
// Test pass-through avatar
|
// Test pass-through avatar
|
||||||
assert_1.default.equal(await resolver.getAvatar(), "https:/\/static.ricmoo.com/uploads/profile-06cb9c3031c9.jpg", "getAvatar()");
|
assert_1.default.equal(await resolver.getAvatar(), "https:/\/static.ricmoo.com/uploads/profile-06cb9c3031c9.jpg", "getAvatar()");
|
||||||
assert_1.default.equal(await resolver.getAddress(), "0xF0d6e3fC0f5A23aAAA4933700438b6313Dd331bD", "getAddress()");
|
assert_1.default.equal(await resolver.getAddress(), "0x4B711A377B1b3534749FBe5e59Bcf7F94d92EA98", "getAddress()");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe("Test ENS-DNS gasless resolver", function () {
|
describe("Test ENS-DNS gasless resolver", function () {
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"test-providers-wildcard.js","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-wildcard.ts"],"names":[],"mappings":";;;AAAA,4DAA4B;AAE5B,6DAA+D;AAE/D,IAAA,mCAAc,GAAE,CAAC;AAEjB,QAAQ,CAAC,6BAA6B,EAAE;IACpC,MAAM,QAAQ,GAAG,IAAA,4BAAO,EAAC,SAAS,CAAC,CAAC;IAEpC,EAAE,CAAC,sBAAsB,EAAE,KAAK;QAC5B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAEpB,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;QAClE,gBAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,wBAAwB,CAAC,CAAC;QAE9C,gBAAM,CAAC,KAAK,CAAC,QAAQ,CAAC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M,CAAC,EAAE,CAAC,QAAQ,EAAE,wBAAwB,CAAC,CAAC;QAE9C,gBAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,4CAA4C,EAAE,SAAS,CAAC,CAAC;QACxF,gBAAM,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,oBAAoB,CAAC,CAAC;QAE5E,2BAA2B;QAC3B,gBAAM,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,SAAS,EAAE,EAAE,6DAA6D,EAAE,aAAa,CAAC,CAAC;QAEvH,gBAAM,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,UAAU,EAAE,EAAE,4CAA4C,EAAE,cAAc,CAAC,CAAC;IAC5G,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,+BAA+B,EAAE;IACtC,EAAE,CAAC,sBAAsB,EAAE,KAAK;QAC5B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAEpB,MAAM,QAAQ,GAAG,IAAA,4BAAO,EAAC,SAAS,CAAC,CAAC;QACpC,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;QACvD,gBAAM,CAAC,KAAK,CAAC,IAAI,EAAE,4CAA4C,EAAE,MAAM,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
@ -5,5 +5,5 @@ exports.version = void 0;
|
|||||||
/**
|
/**
|
||||||
* The current version of Ethers.
|
* The current version of Ethers.
|
||||||
*/
|
*/
|
||||||
exports.version = "6.12.0";
|
exports.version = "6.11.1";
|
||||||
//# sourceMappingURL=_version.js.map
|
//# sourceMappingURL=_version.js.map
|
11
lib.commonjs/abi/coders/abstract-coder.d.ts
vendored
11
lib.commonjs/abi/coders/abstract-coder.d.ts
vendored
@ -18,22 +18,19 @@ export declare class Result extends Array<any> {
|
|||||||
*/
|
*/
|
||||||
constructor(...args: Array<any>);
|
constructor(...args: Array<any>);
|
||||||
/**
|
/**
|
||||||
* Returns the Result as a normal Array. If %%deep%%, any children
|
* Returns the Result as a normal Array.
|
||||||
* which are Result objects are also converted to a normal Array.
|
|
||||||
*
|
*
|
||||||
* This will throw if there are any outstanding deferred
|
* This will throw if there are any outstanding deferred
|
||||||
* errors.
|
* errors.
|
||||||
*/
|
*/
|
||||||
toArray(deep?: boolean): Array<any>;
|
toArray(): Array<any>;
|
||||||
/**
|
/**
|
||||||
* Returns the Result as an Object with each name-value pair. If
|
* Returns the Result as an Object with each name-value pair.
|
||||||
* %%deep%%, any children which are Result objects are also
|
|
||||||
* converted to an Object.
|
|
||||||
*
|
*
|
||||||
* This will throw if any value is unnamed, or if there are
|
* This will throw if any value is unnamed, or if there are
|
||||||
* any outstanding deferred errors.
|
* any outstanding deferred errors.
|
||||||
*/
|
*/
|
||||||
toObject(deep?: boolean): Record<string, any>;
|
toObject(): Record<string, any>;
|
||||||
/**
|
/**
|
||||||
* @_ignore
|
* @_ignore
|
||||||
*/
|
*/
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"abstract-coder.d.ts","sourceRoot":"","sources":["../../../src.ts/abi/coders/abstract-coder.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAW,CAAC;AAenC;;;;;;GAMG;AACH,qBAAa,MAAO,SAAQ,KAAK,CAAC,GAAG,CAAC;;IAGlC,CAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAI,GAAG,CAAA;IAE3B;;OAEG;gBACS,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAyF/B;;;;;;OAMG;IACH,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC;IAYnC;;;;;;;OAOG;IACH,QAAQ,CAAC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AAC,EAAE,MAAM;IAWxE,IAAI,IAAI,IAAI,MAAM,CAAgC;IAClD,IAAI,UAAU,IAAI,MAAM,CAA8B;IACtD,IAAI,QAAQ,IAAI,MAAM,CAAyB;IAC/C,IAAI,KAAK,IAAI,UAAU,CAAuC;IAkC9D,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAOjC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU;IAStD,SAAS,IAAI,MAAM;IAInB,SAAS,IAAI,MAAM;CAGtB"}
|
@ -106,45 +106,35 @@ class Result extends Array {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns the Result as a normal Array. If %%deep%%, any children
|
* Returns the Result as a normal Array.
|
||||||
* which are Result objects are also converted to a normal Array.
|
|
||||||
*
|
*
|
||||||
* This will throw if there are any outstanding deferred
|
* This will throw if there are any outstanding deferred
|
||||||
* errors.
|
* errors.
|
||||||
*/
|
*/
|
||||||
toArray(deep) {
|
toArray() {
|
||||||
const result = [];
|
const result = [];
|
||||||
this.forEach((item, index) => {
|
this.forEach((item, index) => {
|
||||||
if (item instanceof Error) {
|
if (item instanceof Error) {
|
||||||
throwError(`index ${index}`, item);
|
throwError(`index ${index}`, item);
|
||||||
}
|
}
|
||||||
if (deep && item instanceof Result) {
|
|
||||||
item = item.toArray(deep);
|
|
||||||
}
|
|
||||||
result.push(item);
|
result.push(item);
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns the Result as an Object with each name-value pair. If
|
* Returns the Result as an Object with each name-value pair.
|
||||||
* %%deep%%, any children which are Result objects are also
|
|
||||||
* converted to an Object.
|
|
||||||
*
|
*
|
||||||
* This will throw if any value is unnamed, or if there are
|
* This will throw if any value is unnamed, or if there are
|
||||||
* any outstanding deferred errors.
|
* any outstanding deferred errors.
|
||||||
*/
|
*/
|
||||||
toObject(deep) {
|
toObject() {
|
||||||
return this.#names.reduce((accum, name, index) => {
|
return this.#names.reduce((accum, name, index) => {
|
||||||
(0, index_js_1.assert)(name != null, "value at index ${ index } unnamed", "UNSUPPORTED_OPERATION", {
|
(0, index_js_1.assert)(name != null, "value at index ${ index } unnamed", "UNSUPPORTED_OPERATION", {
|
||||||
operation: "toObject()"
|
operation: "toObject()"
|
||||||
});
|
});
|
||||||
// Add values for names that don't conflict
|
// Add values for names that don't conflict
|
||||||
if (!(name in accum)) {
|
if (!(name in accum)) {
|
||||||
let child = this.getValue(name);
|
accum[name] = this.getValue(name);
|
||||||
if (deep && child instanceof Result) {
|
|
||||||
child = child.toObject(deep);
|
|
||||||
}
|
|
||||||
accum[name] = child;
|
|
||||||
}
|
}
|
||||||
return accum;
|
return accum;
|
||||||
}, {});
|
}, {});
|
||||||
|
File diff suppressed because one or more lines are too long
4
lib.commonjs/ethers.d.ts
vendored
4
lib.commonjs/ethers.d.ts
vendored
@ -5,7 +5,7 @@ export { ZeroAddress, WeiPerEther, MaxUint256, MinInt256, MaxInt256, N, ZeroHash
|
|||||||
export { BaseContract, Contract, ContractFactory, ContractEventPayload, ContractTransactionReceipt, ContractTransactionResponse, ContractUnknownEventPayload, EventLog, UndecodedEventLog } from "./contract/index.js";
|
export { BaseContract, Contract, ContractFactory, ContractEventPayload, ContractTransactionReceipt, ContractTransactionResponse, ContractUnknownEventPayload, EventLog, UndecodedEventLog } from "./contract/index.js";
|
||||||
export { computeHmac, randomBytes, keccak256, ripemd160, sha256, sha512, pbkdf2, scrypt, scryptSync, lock, Signature, SigningKey } from "./crypto/index.js";
|
export { computeHmac, randomBytes, keccak256, ripemd160, sha256, sha512, pbkdf2, scrypt, scryptSync, lock, Signature, SigningKey } from "./crypto/index.js";
|
||||||
export { id, ensNormalize, isValidName, namehash, dnsEncode, hashMessage, verifyMessage, solidityPacked, solidityPackedKeccak256, solidityPackedSha256, TypedDataEncoder, verifyTypedData } from "./hash/index.js";
|
export { id, ensNormalize, isValidName, namehash, dnsEncode, hashMessage, verifyMessage, solidityPacked, solidityPackedKeccak256, solidityPackedSha256, TypedDataEncoder, verifyTypedData } from "./hash/index.js";
|
||||||
export { getDefaultProvider, Block, FeeData, Log, TransactionReceipt, TransactionResponse, AbstractSigner, NonceManager, VoidSigner, AbstractProvider, FallbackProvider, JsonRpcApiProvider, JsonRpcProvider, JsonRpcSigner, BrowserProvider, AlchemyProvider, AnkrProvider, ChainstackProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, PocketProvider, QuickNodeProvider, IpcSocketProvider, SocketProvider, WebSocketProvider, EnsResolver, Network, EnsPlugin, EtherscanPlugin, FeeDataNetworkPlugin, FetchUrlFeeDataNetworkPlugin, GasCostPlugin, NetworkPlugin, MulticoinProviderPlugin, SocketBlockSubscriber, SocketEventSubscriber, SocketPendingSubscriber, SocketSubscriber, UnmanagedSubscriber, copyRequest, showThrottleMessage } from "./providers/index.js";
|
export { getDefaultProvider, Block, FeeData, Log, TransactionReceipt, TransactionResponse, AbstractSigner, NonceManager, VoidSigner, AbstractProvider, FallbackProvider, JsonRpcApiProvider, JsonRpcProvider, JsonRpcSigner, BrowserProvider, AlchemyProvider, AnkrProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, PocketProvider, QuickNodeProvider, IpcSocketProvider, SocketProvider, WebSocketProvider, EnsResolver, Network, EnsPlugin, EtherscanPlugin, FeeDataNetworkPlugin, FetchUrlFeeDataNetworkPlugin, GasCostPlugin, NetworkPlugin, MulticoinProviderPlugin, SocketBlockSubscriber, SocketEventSubscriber, SocketPendingSubscriber, SocketSubscriber, UnmanagedSubscriber, copyRequest, showThrottleMessage } from "./providers/index.js";
|
||||||
export { accessListify, computeAddress, recoverAddress, Transaction } from "./transaction/index.js";
|
export { accessListify, computeAddress, recoverAddress, Transaction } from "./transaction/index.js";
|
||||||
export { decodeBase58, encodeBase58, decodeBase64, encodeBase64, concat, dataLength, dataSlice, getBytes, getBytesCopy, hexlify, isHexString, isBytesLike, stripZerosLeft, zeroPadBytes, zeroPadValue, defineProperties, resolveProperties, assert, assertArgument, assertArgumentCount, assertNormalize, assertPrivate, makeError, isCallException, isError, EventPayload, FetchRequest, FetchResponse, FetchCancelSignal, FixedNumber, getBigInt, getNumber, getUint, toBeArray, toBigInt, toBeHex, toNumber, toQuantity, fromTwos, toTwos, mask, formatEther, parseEther, formatUnits, parseUnits, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, decodeRlp, encodeRlp, uuidV4, } from "./utils/index.js";
|
export { decodeBase58, encodeBase58, decodeBase64, encodeBase64, concat, dataLength, dataSlice, getBytes, getBytesCopy, hexlify, isHexString, isBytesLike, stripZerosLeft, zeroPadBytes, zeroPadValue, defineProperties, resolveProperties, assert, assertArgument, assertArgumentCount, assertNormalize, assertPrivate, makeError, isCallException, isError, EventPayload, FetchRequest, FetchResponse, FetchCancelSignal, FixedNumber, getBigInt, getNumber, getUint, toBeArray, toBigInt, toBeHex, toNumber, toQuantity, fromTwos, toTwos, mask, formatEther, parseEther, formatUnits, parseUnits, toUtf8Bytes, toUtf8CodePoints, toUtf8String, Utf8ErrorFuncs, decodeRlp, encodeRlp, uuidV4, } from "./utils/index.js";
|
||||||
export { Mnemonic, BaseWallet, HDNodeWallet, HDNodeVoidWallet, Wallet, defaultPath, getAccountPath, getIndexedAccountPath, isCrowdsaleJson, isKeystoreJson, decryptCrowdsaleJson, decryptKeystoreJsonSync, decryptKeystoreJson, encryptKeystoreJson, encryptKeystoreJsonSync, } from "./wallet/index.js";
|
export { Mnemonic, BaseWallet, HDNodeWallet, HDNodeVoidWallet, Wallet, defaultPath, getAccountPath, getIndexedAccountPath, isCrowdsaleJson, isKeystoreJson, decryptCrowdsaleJson, decryptKeystoreJsonSync, decryptKeystoreJson, encryptKeystoreJson, encryptKeystoreJsonSync, } from "./wallet/index.js";
|
||||||
@ -16,7 +16,7 @@ export type { ConstantContractMethod, ContractEvent, ContractEventArgs, Contract
|
|||||||
export type { ProgressCallback, SignatureLike } from "./crypto/index.js";
|
export type { ProgressCallback, SignatureLike } from "./crypto/index.js";
|
||||||
export type { TypedDataDomain, TypedDataField } from "./hash/index.js";
|
export type { TypedDataDomain, TypedDataField } from "./hash/index.js";
|
||||||
export type { Provider, Signer, AbstractProviderOptions, FallbackProviderOptions, AbstractProviderPlugin, BlockParams, BlockTag, ContractRunner, DebugEventBrowserProvider, Eip1193Provider, EventFilter, Filter, FilterByBlockHash, GasCostParameters, JsonRpcApiProviderOptions, JsonRpcError, JsonRpcPayload, JsonRpcResult, JsonRpcTransactionRequest, LogParams, MinedBlock, MinedTransactionResponse, Networkish, OrphanFilter, PerformActionFilter, PerformActionRequest, PerformActionTransaction, PreparedTransactionRequest, ProviderEvent, Subscriber, Subscription, TopicFilter, TransactionReceiptParams, TransactionRequest, TransactionResponseParams, WebSocketCreator, WebSocketLike } from "./providers/index.js";
|
export type { Provider, Signer, AbstractProviderOptions, FallbackProviderOptions, AbstractProviderPlugin, BlockParams, BlockTag, ContractRunner, DebugEventBrowserProvider, Eip1193Provider, EventFilter, Filter, FilterByBlockHash, GasCostParameters, JsonRpcApiProviderOptions, JsonRpcError, JsonRpcPayload, JsonRpcResult, JsonRpcTransactionRequest, LogParams, MinedBlock, MinedTransactionResponse, Networkish, OrphanFilter, PerformActionFilter, PerformActionRequest, PerformActionTransaction, PreparedTransactionRequest, ProviderEvent, Subscriber, Subscription, TopicFilter, TransactionReceiptParams, TransactionRequest, TransactionResponseParams, WebSocketCreator, WebSocketLike } from "./providers/index.js";
|
||||||
export type { AccessList, AccessListish, AccessListEntry, Blob, BlobLike, KzgLibrary, TransactionLike } from "./transaction/index.js";
|
export type { AccessList, AccessListish, AccessListEntry, TransactionLike } from "./transaction/index.js";
|
||||||
export type { BytesLike, BigNumberish, Numeric, ErrorCode, FixedFormat, Utf8ErrorFunc, UnicodeNormalizationForm, Utf8ErrorReason, RlpStructuredData, RlpStructuredDataish, GetUrlResponse, FetchPreflightFunc, FetchProcessFunc, FetchRetryFunc, FetchGatewayFunc, FetchGetUrlFunc, EthersError, UnknownError, NotImplementedError, UnsupportedOperationError, NetworkError, ServerError, TimeoutError, BadDataError, CancelledError, BufferOverrunError, NumericFaultError, InvalidArgumentError, MissingArgumentError, UnexpectedArgumentError, CallExceptionError, InsufficientFundsError, NonceExpiredError, OffchainFaultError, ReplacementUnderpricedError, TransactionReplacedError, UnconfiguredNameError, ActionRejectedError, CodedEthersError, CallExceptionAction, CallExceptionTransaction, EventEmitterable, Listener } from "./utils/index.js";
|
export type { BytesLike, BigNumberish, Numeric, ErrorCode, FixedFormat, Utf8ErrorFunc, UnicodeNormalizationForm, Utf8ErrorReason, RlpStructuredData, RlpStructuredDataish, GetUrlResponse, FetchPreflightFunc, FetchProcessFunc, FetchRetryFunc, FetchGatewayFunc, FetchGetUrlFunc, EthersError, UnknownError, NotImplementedError, UnsupportedOperationError, NetworkError, ServerError, TimeoutError, BadDataError, CancelledError, BufferOverrunError, NumericFaultError, InvalidArgumentError, MissingArgumentError, UnexpectedArgumentError, CallExceptionError, InsufficientFundsError, NonceExpiredError, OffchainFaultError, ReplacementUnderpricedError, TransactionReplacedError, UnconfiguredNameError, ActionRejectedError, CodedEthersError, CallExceptionAction, CallExceptionTransaction, EventEmitterable, Listener } from "./utils/index.js";
|
||||||
export type { CrowdsaleAccount, KeystoreAccount, EncryptOptions } from "./wallet/index.js";
|
export type { CrowdsaleAccount, KeystoreAccount, EncryptOptions } from "./wallet/index.js";
|
||||||
//# sourceMappingURL=ethers.d.ts.map
|
//# sourceMappingURL=ethers.d.ts.map
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"ethers.d.ts","sourceRoot":"","sources":["../src.ts/ethers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EACH,mBAAmB,EAAE,mBAAmB,EAExC,QAAQ,EACR,mBAAmB,EAAE,aAAa,EAAE,aAAa,EA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AkB,EAAE,yBAAyB,EACvE,gBAAgB,EAAE,aAAa,EAClC,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACR,UAAU,EAAE,aAAa,EAAE,eAAe,EAC1C,eAAe,EAClB,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACR,SAAS,EACT,YAAY,EAAE,OAAO,EACrB,SAAS,EACT,WAAW,EACX,aAAa,EAAE,wBAAwB,EAAE,eAAe,EACxD,iBAAiB,EAAE,oBAAoB,EAEvC,cAAc,EACd,kBAAkB,EAAE,gBAAgB,EAAE,cAAc,EACpD,gBAAgB,EAAE,eAAe,EAEjC,WAAW,EAAE,YAAY,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,YAAY,EACvF,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAC3E,iBAAiB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,uBAAuB,EACtF,kBAAkB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,kBAAkB,EACjF,2BAA2B,EAAE,wBAAwB,EAAE,qBAAqB,EAC5E,mBAAmB,EACnB,gBAAgB,EAEhB,mBAAmB,EAAE,wBAAwB,EAC7C,gBAAgB,EAAE,QAAQ,EAC7B,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACR,gBAAgB,EAAE,eAAe,EAAE,cAAc,EACpD,MAAM,mBAAmB,CAAC"}
|
@ -3,9 +3,9 @@
|
|||||||
//
|
//
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.ripemd160 = exports.keccak256 = exports.randomBytes = exports.computeHmac = exports.UndecodedEventLog = exports.EventLog = exports.ContractUnknownEventPayload = exports.ContractTransactionResponse = exports.ContractTransactionReceipt = exports.ContractEventPayload = exports.ContractFactory = exports.Contract = exports.BaseContract = exports.MessagePrefix = exports.EtherSymbol = exports.ZeroHash = exports.N = exports.MaxInt256 = exports.MinInt256 = exports.MaxUint256 = exports.WeiPerEther = exports.ZeroAddress = exports.resolveAddress = exports.isAddress = exports.isAddressable = exports.getCreate2Address = exports.getCreateAddress = exports.getIcapAddress = exports.getAddress = exports.Typed = exports.TransactionDescription = exports.Result = exports.LogDescription = exports.Interface = exports.Indexed = exports.ErrorDescription = exports.checkResultErrors = exports.StructFragment = exports.ParamType = exports.NamedFragment = exports.FunctionFragment = exports.FallbackFragment = exports.Fragment = exports.EventFragment = exports.ErrorFragment = exports.ConstructorFragment = exports.AbiCoder = exports.encodeBytes32String = exports.decodeBytes32String = exports.version = void 0;
|
exports.ripemd160 = exports.keccak256 = exports.randomBytes = exports.computeHmac = exports.UndecodedEventLog = exports.EventLog = exports.ContractUnknownEventPayload = exports.ContractTransactionResponse = exports.ContractTransactionReceipt = exports.ContractEventPayload = exports.ContractFactory = exports.Contract = exports.BaseContract = exports.MessagePrefix = exports.EtherSymbol = exports.ZeroHash = exports.N = exports.MaxInt256 = exports.MinInt256 = exports.MaxUint256 = exports.WeiPerEther = exports.ZeroAddress = exports.resolveAddress = exports.isAddress = exports.isAddressable = exports.getCreate2Address = exports.getCreateAddress = exports.getIcapAddress = exports.getAddress = exports.Typed = exports.TransactionDescription = exports.Result = exports.LogDescription = exports.Interface = exports.Indexed = exports.ErrorDescription = exports.checkResultErrors = exports.StructFragment = exports.ParamType = exports.NamedFragment = exports.FunctionFragment = exports.FallbackFragment = exports.Fragment = exports.EventFragment = exports.ErrorFragment = exports.ConstructorFragment = exports.AbiCoder = exports.encodeBytes32String = exports.decodeBytes32String = exports.version = void 0;
|
||||||
exports.EnsPlugin = exports.Network = exports.EnsResolver = exports.WebSocketProvider = exports.SocketProvider = exports.IpcSocketProvider = exports.QuickNodeProvider = exports.PocketProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.CloudflareProvider = exports.ChainstackProvider = exports.AnkrProvider = exports.AlchemyProvider = exports.BrowserProvider = exports.JsonRpcSigner = exports.JsonRpcProvider = exports.JsonRpcApiProvider = exports.FallbackProvider = exports.AbstractProvider = exports.VoidSigner = exports.NonceManager = exports.AbstractSigner = exports.TransactionResponse = exports.TransactionReceipt = exports.Log = exports.FeeData = exports.Block = exports.getDefaultProvider = exports.verifyTypedData = exports.TypedDataEncoder = exports.solidityPackedSha256 = exports.solidityPackedKeccak256 = exports.solidityPacked = exports.verifyMessage = exports.hashMessage = exports.dnsEncode = exports.namehash = exports.isValidName = exports.ensNormalize = exports.id = exports.SigningKey = exports.Signature = exports.lock = exports.scryptSync = exports.scrypt = exports.pbkdf2 = exports.sha512 = exports.sha256 = void 0;
|
exports.EtherscanPlugin = exports.EnsPlugin = exports.Network = exports.EnsResolver = exports.WebSocketProvider = exports.SocketProvider = exports.IpcSocketProvider = exports.QuickNodeProvider = exports.PocketProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.CloudflareProvider = exports.AnkrProvider = exports.AlchemyProvider = exports.BrowserProvider = exports.JsonRpcSigner = exports.JsonRpcProvider = exports.JsonRpcApiProvider = exports.FallbackProvider = exports.AbstractProvider = exports.VoidSigner = exports.NonceManager = exports.AbstractSigner = exports.TransactionResponse = exports.TransactionReceipt = exports.Log = exports.FeeData = exports.Block = exports.getDefaultProvider = exports.verifyTypedData = exports.TypedDataEncoder = exports.solidityPackedSha256 = exports.solidityPackedKeccak256 = exports.solidityPacked = exports.verifyMessage = exports.hashMessage = exports.dnsEncode = exports.namehash = exports.isValidName = exports.ensNormalize = exports.id = exports.SigningKey = exports.Signature = exports.lock = exports.scryptSync = exports.scrypt = exports.pbkdf2 = exports.sha512 = exports.sha256 = void 0;
|
||||||
exports.getUint = exports.getNumber = exports.getBigInt = exports.FixedNumber = exports.FetchCancelSignal = exports.FetchResponse = exports.FetchRequest = exports.EventPayload = exports.isError = exports.isCallException = exports.makeError = exports.assertPrivate = exports.assertNormalize = exports.assertArgumentCount = exports.assertArgument = exports.assert = exports.resolveProperties = exports.defineProperties = exports.zeroPadValue = exports.zeroPadBytes = exports.stripZerosLeft = exports.isBytesLike = exports.isHexString = exports.hexlify = exports.getBytesCopy = exports.getBytes = exports.dataSlice = exports.dataLength = exports.concat = exports.encodeBase64 = exports.decodeBase64 = exports.encodeBase58 = exports.decodeBase58 = exports.Transaction = exports.recoverAddress = exports.computeAddress = exports.accessListify = exports.showThrottleMessage = exports.copyRequest = exports.UnmanagedSubscriber = exports.SocketSubscriber = exports.SocketPendingSubscriber = exports.SocketEventSubscriber = exports.SocketBlockSubscriber = exports.MulticoinProviderPlugin = exports.NetworkPlugin = exports.GasCostPlugin = exports.FetchUrlFeeDataNetworkPlugin = exports.FeeDataNetworkPlugin = exports.EtherscanPlugin = void 0;
|
exports.toBeArray = exports.getUint = exports.getNumber = exports.getBigInt = exports.FixedNumber = exports.FetchCancelSignal = exports.FetchResponse = exports.FetchRequest = exports.EventPayload = exports.isError = exports.isCallException = exports.makeError = exports.assertPrivate = exports.assertNormalize = exports.assertArgumentCount = exports.assertArgument = exports.assert = exports.resolveProperties = exports.defineProperties = exports.zeroPadValue = exports.zeroPadBytes = exports.stripZerosLeft = exports.isBytesLike = exports.isHexString = exports.hexlify = exports.getBytesCopy = exports.getBytes = exports.dataSlice = exports.dataLength = exports.concat = exports.encodeBase64 = exports.decodeBase64 = exports.encodeBase58 = exports.decodeBase58 = exports.Transaction = exports.recoverAddress = exports.computeAddress = exports.accessListify = exports.showThrottleMessage = exports.copyRequest = exports.UnmanagedSubscriber = exports.SocketSubscriber = exports.SocketPendingSubscriber = exports.SocketEventSubscriber = exports.SocketBlockSubscriber = exports.MulticoinProviderPlugin = exports.NetworkPlugin = exports.GasCostPlugin = exports.FetchUrlFeeDataNetworkPlugin = exports.FeeDataNetworkPlugin = void 0;
|
||||||
exports.wordlists = exports.WordlistOwlA = exports.WordlistOwl = exports.LangEn = exports.Wordlist = exports.encryptKeystoreJsonSync = exports.encryptKeystoreJson = exports.decryptKeystoreJson = exports.decryptKeystoreJsonSync = exports.decryptCrowdsaleJson = exports.isKeystoreJson = exports.isCrowdsaleJson = exports.getIndexedAccountPath = exports.getAccountPath = exports.defaultPath = exports.Wallet = exports.HDNodeVoidWallet = exports.HDNodeWallet = exports.BaseWallet = exports.Mnemonic = exports.uuidV4 = exports.encodeRlp = exports.decodeRlp = exports.Utf8ErrorFuncs = exports.toUtf8String = exports.toUtf8CodePoints = exports.toUtf8Bytes = exports.parseUnits = exports.formatUnits = exports.parseEther = exports.formatEther = exports.mask = exports.toTwos = exports.fromTwos = exports.toQuantity = exports.toNumber = exports.toBeHex = exports.toBigInt = exports.toBeArray = void 0;
|
exports.wordlists = exports.WordlistOwlA = exports.WordlistOwl = exports.LangEn = exports.Wordlist = exports.encryptKeystoreJsonSync = exports.encryptKeystoreJson = exports.decryptKeystoreJson = exports.decryptKeystoreJsonSync = exports.decryptCrowdsaleJson = exports.isKeystoreJson = exports.isCrowdsaleJson = exports.getIndexedAccountPath = exports.getAccountPath = exports.defaultPath = exports.Wallet = exports.HDNodeVoidWallet = exports.HDNodeWallet = exports.BaseWallet = exports.Mnemonic = exports.uuidV4 = exports.encodeRlp = exports.decodeRlp = exports.Utf8ErrorFuncs = exports.toUtf8String = exports.toUtf8CodePoints = exports.toUtf8Bytes = exports.parseUnits = exports.formatUnits = exports.parseEther = exports.formatEther = exports.mask = exports.toTwos = exports.fromTwos = exports.toQuantity = exports.toNumber = exports.toBeHex = exports.toBigInt = void 0;
|
||||||
var _version_js_1 = require("./_version.js");
|
var _version_js_1 = require("./_version.js");
|
||||||
Object.defineProperty(exports, "version", { enumerable: true, get: function () { return _version_js_1.version; } });
|
Object.defineProperty(exports, "version", { enumerable: true, get: function () { return _version_js_1.version; } });
|
||||||
var index_js_1 = require("./abi/index.js");
|
var index_js_1 = require("./abi/index.js");
|
||||||
@ -101,7 +101,6 @@ Object.defineProperty(exports, "JsonRpcSigner", { enumerable: true, get: functio
|
|||||||
Object.defineProperty(exports, "BrowserProvider", { enumerable: true, get: function () { return index_js_7.BrowserProvider; } });
|
Object.defineProperty(exports, "BrowserProvider", { enumerable: true, get: function () { return index_js_7.BrowserProvider; } });
|
||||||
Object.defineProperty(exports, "AlchemyProvider", { enumerable: true, get: function () { return index_js_7.AlchemyProvider; } });
|
Object.defineProperty(exports, "AlchemyProvider", { enumerable: true, get: function () { return index_js_7.AlchemyProvider; } });
|
||||||
Object.defineProperty(exports, "AnkrProvider", { enumerable: true, get: function () { return index_js_7.AnkrProvider; } });
|
Object.defineProperty(exports, "AnkrProvider", { enumerable: true, get: function () { return index_js_7.AnkrProvider; } });
|
||||||
Object.defineProperty(exports, "ChainstackProvider", { enumerable: true, get: function () { return index_js_7.ChainstackProvider; } });
|
|
||||||
Object.defineProperty(exports, "CloudflareProvider", { enumerable: true, get: function () { return index_js_7.CloudflareProvider; } });
|
Object.defineProperty(exports, "CloudflareProvider", { enumerable: true, get: function () { return index_js_7.CloudflareProvider; } });
|
||||||
Object.defineProperty(exports, "EtherscanProvider", { enumerable: true, get: function () { return index_js_7.EtherscanProvider; } });
|
Object.defineProperty(exports, "EtherscanProvider", { enumerable: true, get: function () { return index_js_7.EtherscanProvider; } });
|
||||||
Object.defineProperty(exports, "InfuraProvider", { enumerable: true, get: function () { return index_js_7.InfuraProvider; } });
|
Object.defineProperty(exports, "InfuraProvider", { enumerable: true, get: function () { return index_js_7.InfuraProvider; } });
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"ethers.js","sourceRoot":"","sources":["../src.ts/ethers.ts"],"names":[],"mappings":";AAEA,6BAA6B;AAC7B,EAAE;;;;;;AAEF,6CAAwC;AAA/B,sGAAA,OAAO,OAAA;AAEhB,2CAQwB;AAPpB,+GAAA,mBAAmB,OAAA;AAAE,+GAAA,mBAAmB,OAAA;AAExC,oGAAA,QAAQ,OAAA;AACR,+GAAA,mBAAmB,OAAA;AAAE,yGAAA,aAAa,OAAA;AAAE,yGAAA,aAAa,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAAE,4GAAA,gBAAgB,OAAA;AAAE,4GAAA,gBAAgB,OAAA;A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BAAuB,OAAA;AAGhD,kDAE8B;AAD1B,qGAAA,QAAQ,OAAA;AAAE,mGAAA,MAAM,OAAA;AAAE,wGAAA,WAAW,OAAA;AAAE,yGAAA,YAAY,OAAA;AAAE,sGAAA,SAAS,OAAA"}
|
@ -152,8 +152,8 @@ class AbstractSigner {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (pop.type === 2 || pop.type === 3) {
|
else if (pop.type === 2) {
|
||||||
// Explicitly using EIP-1559 or EIP-4844
|
// Explicitly using EIP-1559
|
||||||
// Populate missing fee data
|
// Populate missing fee data
|
||||||
if (pop.maxFeePerGas == null) {
|
if (pop.maxFeePerGas == null) {
|
||||||
pop.maxFeePerGas = feeData.maxFeePerGas;
|
pop.maxFeePerGas = feeData.maxFeePerGas;
|
||||||
|
File diff suppressed because one or more lines are too long
1
lib.commonjs/providers/default-provider.d.ts
vendored
1
lib.commonjs/providers/default-provider.d.ts
vendored
@ -24,7 +24,6 @@ import { WebSocketLike } from "./provider-websocket.js";
|
|||||||
* - ``"alchemy"``
|
* - ``"alchemy"``
|
||||||
* - ``"ankr"``
|
* - ``"ankr"``
|
||||||
* - ``"cloudflare"``
|
* - ``"cloudflare"``
|
||||||
* - ``"chainstack"``
|
|
||||||
* - ``"etherscan"``
|
* - ``"etherscan"``
|
||||||
* - ``"infura"``
|
* - ``"infura"``
|
||||||
* - ``"publicPolygon"``
|
* - ``"publicPolygon"``
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"default-provider.d.ts","sourceRoot":"","sources":["../../src.ts/providers/default-provider.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AASxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,aAAa,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,gBAAgB,CA0HjH"}
|
{"version":3,"file":"default-provider.d.ts","sourceRoot":"","sources":["../../src.ts/providers/default-provider.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AASxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,aAAa,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,gBAAgB,CAkHjH"}
|
@ -4,7 +4,6 @@ exports.getDefaultProvider = void 0;
|
|||||||
const index_js_1 = require("../utils/index.js");
|
const index_js_1 = require("../utils/index.js");
|
||||||
const provider_ankr_js_1 = require("./provider-ankr.js");
|
const provider_ankr_js_1 = require("./provider-ankr.js");
|
||||||
const provider_alchemy_js_1 = require("./provider-alchemy.js");
|
const provider_alchemy_js_1 = require("./provider-alchemy.js");
|
||||||
const provider_chainstack_js_1 = require("./provider-chainstack.js");
|
|
||||||
const provider_cloudflare_js_1 = require("./provider-cloudflare.js");
|
const provider_cloudflare_js_1 = require("./provider-cloudflare.js");
|
||||||
const provider_etherscan_js_1 = require("./provider-etherscan.js");
|
const provider_etherscan_js_1 = require("./provider-etherscan.js");
|
||||||
const provider_infura_js_1 = require("./provider-infura.js");
|
const provider_infura_js_1 = require("./provider-infura.js");
|
||||||
@ -42,7 +41,6 @@ const Testnets = "goerli kovan sepolia classicKotti optimism-goerli arbitrum-goe
|
|||||||
* - ``"alchemy"``
|
* - ``"alchemy"``
|
||||||
* - ``"ankr"``
|
* - ``"ankr"``
|
||||||
* - ``"cloudflare"``
|
* - ``"cloudflare"``
|
||||||
* - ``"chainstack"``
|
|
||||||
* - ``"etherscan"``
|
* - ``"etherscan"``
|
||||||
* - ``"infura"``
|
* - ``"infura"``
|
||||||
* - ``"publicPolygon"``
|
* - ``"publicPolygon"``
|
||||||
@ -96,9 +94,6 @@ function getDefaultProvider(network, options) {
|
|||||||
if (staticNetwork.name === "matic") {
|
if (staticNetwork.name === "matic") {
|
||||||
providers.push(new provider_jsonrpc_js_1.JsonRpcProvider("https:/\/polygon-rpc.com/", staticNetwork, { staticNetwork }));
|
providers.push(new provider_jsonrpc_js_1.JsonRpcProvider("https:/\/polygon-rpc.com/", staticNetwork, { staticNetwork }));
|
||||||
}
|
}
|
||||||
else if (staticNetwork.name === "matic-amoy") {
|
|
||||||
providers.push(new provider_jsonrpc_js_1.JsonRpcProvider("https:/\/rpc-amoy.polygon.technology/", staticNetwork, { staticNetwork }));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (allowService("alchemy")) {
|
if (allowService("alchemy")) {
|
||||||
try {
|
try {
|
||||||
@ -112,12 +107,6 @@ function getDefaultProvider(network, options) {
|
|||||||
}
|
}
|
||||||
catch (error) { }
|
catch (error) { }
|
||||||
}
|
}
|
||||||
if (allowService("chainstack")) {
|
|
||||||
try {
|
|
||||||
providers.push(new provider_chainstack_js_1.ChainstackProvider(network, options.chainstack));
|
|
||||||
}
|
|
||||||
catch (error) { }
|
|
||||||
}
|
|
||||||
if (allowService("cloudflare")) {
|
if (allowService("cloudflare")) {
|
||||||
try {
|
try {
|
||||||
providers.push(new provider_cloudflare_js_1.CloudflareProvider(network));
|
providers.push(new provider_cloudflare_js_1.CloudflareProvider(network));
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"default-provider.js","sourceRoot":"","sources":["../../src.ts/providers/default-provider.ts"],"names":[],"mappings":";;;AACA,gDAA2C;AAE3C,yDAAkD;AAClD,+DAAwD;AACxD,qEAA8D;AAC9D,qE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|
@ -122,11 +122,8 @@ const _formatBlock = object({
|
|||||||
blobGasUsed: allowNull(index_js_4.getBigInt, null),
|
blobGasUsed: allowNull(index_js_4.getBigInt, null),
|
||||||
excessBlobGas: allowNull(index_js_4.getBigInt, null),
|
excessBlobGas: allowNull(index_js_4.getBigInt, null),
|
||||||
miner: allowNull(index_js_1.getAddress),
|
miner: allowNull(index_js_1.getAddress),
|
||||||
prevRandao: allowNull(formatHash, null),
|
|
||||||
extraData: formatData,
|
extraData: formatData,
|
||||||
baseFeePerGas: allowNull(index_js_4.getBigInt)
|
baseFeePerGas: allowNull(index_js_4.getBigInt)
|
||||||
}, {
|
|
||||||
prevRandao: ["mixHash"]
|
|
||||||
});
|
});
|
||||||
function formatBlock(value) {
|
function formatBlock(value) {
|
||||||
const result = _formatBlock(value);
|
const result = _formatBlock(value);
|
||||||
|
File diff suppressed because one or more lines are too long
5
lib.commonjs/providers/formatting.d.ts
vendored
5
lib.commonjs/providers/formatting.d.ts
vendored
@ -65,11 +65,6 @@ export interface BlockParams {
|
|||||||
* The miner (or author) of a block.
|
* The miner (or author) of a block.
|
||||||
*/
|
*/
|
||||||
miner: string;
|
miner: string;
|
||||||
/**
|
|
||||||
* The latest RANDAO mix of the post beacon state of
|
|
||||||
* the previous block.
|
|
||||||
*/
|
|
||||||
prevRandao?: null | string;
|
|
||||||
/**
|
/**
|
||||||
* Additional data the miner choose to include.
|
* Additional data the miner choose to include.
|
||||||
*/
|
*/
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../src.ts/providers/formatting.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAM1D;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CA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AE,MAAM,CAAC;IAEb;;;OAGG;IACH,EAAE,EAAE,IAAI,GAAG,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,oBAAoB,EAAE,IAAI,GAAG,MAAM,CAAC;IAEpC;;;OAGG;IACH,YAAY,EAAE,IAAI,GAAG,MAAM,CAAC;IAE5B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAEjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,UAAU,EAAE,IAAI,GAAG,UAAU,CAAC;IAE9B;;OAEG;IACH,mBAAmB,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;CAC9C"}
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"formatting.js","sourceRoot":"","sources":["../../src.ts/providers/formatting.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAiHF,CAAC;AAoSD,CAAC"}
|
{"version":3,"file":"formatting.js","sourceRoot":"","sources":["../../src.ts/providers/formatting.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AA2GF,CAAC;AAoSD,CAAC"}
|
1
lib.commonjs/providers/index.d.ts
vendored
1
lib.commonjs/providers/index.d.ts
vendored
@ -24,7 +24,6 @@ export { BrowserProvider } from "./provider-browser.js";
|
|||||||
export { AlchemyProvider } from "./provider-alchemy.js";
|
export { AlchemyProvider } from "./provider-alchemy.js";
|
||||||
export { AnkrProvider } from "./provider-ankr.js";
|
export { AnkrProvider } from "./provider-ankr.js";
|
||||||
export { CloudflareProvider } from "./provider-cloudflare.js";
|
export { CloudflareProvider } from "./provider-cloudflare.js";
|
||||||
export { ChainstackProvider } from "./provider-chainstack.js";
|
|
||||||
export { EtherscanProvider, EtherscanPlugin } from "./provider-etherscan.js";
|
export { EtherscanProvider, EtherscanPlugin } from "./provider-etherscan.js";
|
||||||
export { InfuraProvider, InfuraWebSocketProvider } from "./provider-infura.js";
|
export { InfuraProvider, InfuraWebSocketProvider } from "./provider-infura.js";
|
||||||
export { PocketProvider } from "./provider-pocket.js";
|
export { PocketProvider } from "./provider-pocket.js";
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/providers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EACH,gBAAgB,EAAE,mBAAmB,EACxC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACH,cAAc,EACd,UAAU,GACb,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,mBAAmB,EACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EACH,WAAW,EACX,uBAAuB,EAC1B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EACH,aAAa,EACb,aAAa,EACb,SAAS,EACT,oBAAoB,EACpB,4BAA4B,GAC/B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,KAAK,EACL,OAAO,EACP,GAAG,EACH,kBAAkB,EAClB,mBAAmB,EAEnB,WAAW,GAEd,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;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B,EAAE,0BAA0B,EAC9C,WAAW,EAAE,MAAM,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EACnE,WAAW,EACX,QAAQ,EACR,UAAU,EAAE,wBAAwB,EACvC,MAAM,eAAe,CAAC;AAEvB,YAAY,EACR,yBAAyB,EAAE,eAAe,EAC7C,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,YAAY,EACR,cAAc,EAAE,aAAa,EAAE,YAAY,EAC3C,yBAAyB,EACzB,yBAAyB,GAC5B,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACR,gBAAgB,EAAE,aAAa,EAClC,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
@ -11,7 +11,7 @@
|
|||||||
* @_section: api/providers:Providers [about-providers]
|
* @_section: api/providers:Providers [about-providers]
|
||||||
*/
|
*/
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.SocketEventSubscriber = exports.SocketPendingSubscriber = exports.SocketBlockSubscriber = exports.SocketSubscriber = exports.WebSocketProvider = exports.SocketProvider = exports.IpcSocketProvider = exports.QuickNodeProvider = exports.PocketProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanPlugin = exports.EtherscanProvider = exports.ChainstackProvider = exports.CloudflareProvider = exports.AnkrProvider = exports.AlchemyProvider = exports.BrowserProvider = exports.JsonRpcSigner = exports.JsonRpcProvider = exports.JsonRpcApiProvider = exports.FallbackProvider = exports.copyRequest = exports.TransactionResponse = exports.TransactionReceipt = exports.Log = exports.FeeData = exports.Block = exports.FetchUrlFeeDataNetworkPlugin = exports.FeeDataNetworkPlugin = exports.EnsPlugin = exports.GasCostPlugin = exports.NetworkPlugin = exports.NonceManager = exports.Network = exports.MulticoinProviderPlugin = exports.EnsResolver = exports.getDefaultProvider = exports.showThrottleMessage = exports.VoidSigner = exports.AbstractSigner = exports.UnmanagedSubscriber = exports.AbstractProvider = void 0;
|
exports.SocketEventSubscriber = exports.SocketPendingSubscriber = exports.SocketBlockSubscriber = exports.SocketSubscriber = exports.WebSocketProvider = exports.SocketProvider = exports.IpcSocketProvider = exports.QuickNodeProvider = exports.PocketProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanPlugin = exports.EtherscanProvider = exports.CloudflareProvider = exports.AnkrProvider = exports.AlchemyProvider = exports.BrowserProvider = exports.JsonRpcSigner = exports.JsonRpcProvider = exports.JsonRpcApiProvider = exports.FallbackProvider = exports.copyRequest = exports.TransactionResponse = exports.TransactionReceipt = exports.Log = exports.FeeData = exports.Block = exports.FetchUrlFeeDataNetworkPlugin = exports.FeeDataNetworkPlugin = exports.EnsPlugin = exports.GasCostPlugin = exports.NetworkPlugin = exports.NonceManager = exports.Network = exports.MulticoinProviderPlugin = exports.EnsResolver = exports.getDefaultProvider = exports.showThrottleMessage = exports.VoidSigner = exports.AbstractSigner = exports.UnmanagedSubscriber = exports.AbstractProvider = void 0;
|
||||||
var abstract_provider_js_1 = require("./abstract-provider.js");
|
var abstract_provider_js_1 = require("./abstract-provider.js");
|
||||||
Object.defineProperty(exports, "AbstractProvider", { enumerable: true, get: function () { return abstract_provider_js_1.AbstractProvider; } });
|
Object.defineProperty(exports, "AbstractProvider", { enumerable: true, get: function () { return abstract_provider_js_1.AbstractProvider; } });
|
||||||
Object.defineProperty(exports, "UnmanagedSubscriber", { enumerable: true, get: function () { return abstract_provider_js_1.UnmanagedSubscriber; } });
|
Object.defineProperty(exports, "UnmanagedSubscriber", { enumerable: true, get: function () { return abstract_provider_js_1.UnmanagedSubscriber; } });
|
||||||
@ -56,8 +56,6 @@ var provider_ankr_js_1 = require("./provider-ankr.js");
|
|||||||
Object.defineProperty(exports, "AnkrProvider", { enumerable: true, get: function () { return provider_ankr_js_1.AnkrProvider; } });
|
Object.defineProperty(exports, "AnkrProvider", { enumerable: true, get: function () { return provider_ankr_js_1.AnkrProvider; } });
|
||||||
var provider_cloudflare_js_1 = require("./provider-cloudflare.js");
|
var provider_cloudflare_js_1 = require("./provider-cloudflare.js");
|
||||||
Object.defineProperty(exports, "CloudflareProvider", { enumerable: true, get: function () { return provider_cloudflare_js_1.CloudflareProvider; } });
|
Object.defineProperty(exports, "CloudflareProvider", { enumerable: true, get: function () { return provider_cloudflare_js_1.CloudflareProvider; } });
|
||||||
var provider_chainstack_js_1 = require("./provider-chainstack.js");
|
|
||||||
Object.defineProperty(exports, "ChainstackProvider", { enumerable: true, get: function () { return provider_chainstack_js_1.ChainstackProvider; } });
|
|
||||||
var provider_etherscan_js_1 = require("./provider-etherscan.js");
|
var provider_etherscan_js_1 = require("./provider-etherscan.js");
|
||||||
Object.defineProperty(exports, "EtherscanProvider", { enumerable: true, get: function () { return provider_etherscan_js_1.EtherscanProvider; } });
|
Object.defineProperty(exports, "EtherscanProvider", { enumerable: true, get: function () { return provider_etherscan_js_1.EtherscanProvider; } });
|
||||||
Object.defineProperty(exports, "EtherscanPlugin", { enumerable: true, get: function () { return provider_etherscan_js_1.EtherscanPlugin; } });
|
Object.defineProperty(exports, "EtherscanPlugin", { enumerable: true, get: function () { return provider_etherscan_js_1.EtherscanPlugin; } });
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src.ts/providers/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAGH,+DAEgC;AAD5B,wHAAA,gBAAgB,OAAA;AAAE,2HAAA,mBAAmB,OAAA;AAGzC,2DAG8B;AAF1B,oHAAA,cAAc,OAAA;AACd,gHAAA,UAAU,OAAA;AAGd,+CAEwB;AADpB,mHAAA,mBAAmB,OAAA;AAGvB,6DAA2D;AAAlD,yHAAA,kBAAkB,OAAA;AAE3B,qDAG2B;AAFvB,8GAAA,WAAW,OAAA;AACX,0HAAA,uBAAuB,OAAA;AAG3B,2CAAuC;AAA9B,qGAAA,OA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AACvB,iEAA4D;AAAnD,0HAAA,iBAAiB,OAAA;AAE1B,mEAA4D,CAAC,YAAY;AAChE,kGADA,yCAAiB,OACA;AAC1B,2DAAsD;AAA7C,oHAAA,cAAc,OAAA;AACvB,iEAA4D;AAAnD,0HAAA,iBAAiB,OAAA;AAE1B,2DAG8B;AAF1B,sHAAA,gBAAgB,OAAA;AAAE,2HAAA,qBAAqB,OAAA;AAAE,6HAAA,uBAAuB,OAAA;AAChE,2HAAA,qBAAqB,OAAA"}
|
@ -342,14 +342,12 @@ function injectCommonNetworks() {
|
|||||||
registerEth("bnbt", 97, {});
|
registerEth("bnbt", 97, {});
|
||||||
registerEth("linea", 59144, { ensNetwork: 1 });
|
registerEth("linea", 59144, { ensNetwork: 1 });
|
||||||
registerEth("linea-goerli", 59140, {});
|
registerEth("linea-goerli", 59140, {});
|
||||||
registerEth("linea-sepolia", 59141, {});
|
|
||||||
registerEth("matic", 137, {
|
registerEth("matic", 137, {
|
||||||
ensNetwork: 1,
|
ensNetwork: 1,
|
||||||
plugins: [
|
plugins: [
|
||||||
getGasStationPlugin("https:/\/gasstation.polygon.technology/v2")
|
getGasStationPlugin("https:/\/gasstation.polygon.technology/v2")
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
registerEth("matic-amoy", 80002, {});
|
|
||||||
registerEth("matic-mumbai", 80001, {
|
registerEth("matic-mumbai", 80001, {
|
||||||
altNames: ["maticMumbai", "maticmum"],
|
altNames: ["maticMumbai", "maticmum"],
|
||||||
plugins: [
|
plugins: [
|
||||||
|
File diff suppressed because one or more lines are too long
1
lib.commonjs/providers/provider-alchemy.d.ts
vendored
1
lib.commonjs/providers/provider-alchemy.d.ts
vendored
@ -17,7 +17,6 @@
|
|||||||
* - Optimism Goerli Testnet (``optimism-goerli``)
|
* - Optimism Goerli Testnet (``optimism-goerli``)
|
||||||
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
||||||
* - Polygon (``matic``)
|
* - Polygon (``matic``)
|
||||||
* - Polygon Amoy Testnet (``matic-amoy``)
|
|
||||||
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
||||||
*
|
*
|
||||||
* @_subsection: api/providers/thirdparty:Alchemy [providers-alchemy]
|
* @_subsection: api/providers/thirdparty:Alchemy [providers-alchemy]
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"provider-alchemy.d.ts","sourceRoot":"","sources":["../../src.ts/providers/provider-alchemy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAEH,YAAY,EACf,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA2C/C;;;;;;;;;;GAUG;AACH,qBAAa,eAAgB,SAAQ,eAAgB,YAAW,oBAAoB;IAChF,QAAQ,CAAC,MAAM,EAAG,MAAM,CAAC;gBAEb,QAAQ,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM;IAWzD,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB;IAOzC,QAAQ,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAAC,GAAG,CAAC;IAmCvD,mBAAmB,IAAI,OAAO;IAI9B,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,YAAY;CAerE"}
|
{"version":3,"file":"provider-alchemy.d.ts","sourceRoot":"","sources":["../../src.ts/providers/provider-alchemy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAEH,YAAY,EACf,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAyC/C;;;;;;;;;;GAUG;AACH,qBAAa,eAAgB,SAAQ,eAAgB,YAAW,oBAAoB;IAChF,QAAQ,CAAC,MAAM,EAAG,MAAM,CAAC;gBAEb,QAAQ,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM;IAWzD,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB;IAOzC,QAAQ,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAAC,GAAG,CAAC;IAmCvD,mBAAmB,IAAI,OAAO;IAI9B,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,YAAY;CAerE"}
|
@ -18,7 +18,6 @@
|
|||||||
* - Optimism Goerli Testnet (``optimism-goerli``)
|
* - Optimism Goerli Testnet (``optimism-goerli``)
|
||||||
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
||||||
* - Polygon (``matic``)
|
* - Polygon (``matic``)
|
||||||
* - Polygon Amoy Testnet (``matic-amoy``)
|
|
||||||
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
||||||
*
|
*
|
||||||
* @_subsection: api/providers/thirdparty:Alchemy [providers-alchemy]
|
* @_subsection: api/providers/thirdparty:Alchemy [providers-alchemy]
|
||||||
@ -52,8 +51,6 @@ function getHost(name) {
|
|||||||
return "base-sepolia.g.alchemy.com";
|
return "base-sepolia.g.alchemy.com";
|
||||||
case "matic":
|
case "matic":
|
||||||
return "polygon-mainnet.g.alchemy.com";
|
return "polygon-mainnet.g.alchemy.com";
|
||||||
case "matic-amoy":
|
|
||||||
return "polygon-amoy.g.alchemy.com";
|
|
||||||
case "matic-mumbai":
|
case "matic-mumbai":
|
||||||
return "polygon-mumbai.g.alchemy.com";
|
return "polygon-mumbai.g.alchemy.com";
|
||||||
case "optimism":
|
case "optimism":
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"provider-alchemy.js","sourceRoot":"","sources":["../../src.ts/providers/provider-alchemy.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AAEH,gDAG2B;AAE3B,iDAAqD;AACrD,6CAAuC;AACvC,+DAAwD;AAOxD,MAAM,aAAa,GAAG,kCAAkC,CAAA;AAExD,SAAS,OAAO,CAAC,IAAY;IACzB,QAAO,IAAI,EAAE;QACT,KAAK,SAAS;YACV,OAAO,2BAA2B,CAAC;QACvC,KAAK,QAAQ;YACT,OAAO,0BAA0B,CAAC;QACtC,KAAK,SAAS;YACV,OAAO,2BAA2B,CAAC;QAEvC,KAAK,UAAU;YACX,OAAO,2BAA2B,CAAC;QACvC,KAAK,iBAAiB;YAClB,OAAO,0BAA0B,CAAC;QACtC,KAAK,kBAAkB;YACnB,OAAO,2BAA2B,CAAC;QACvC,KAAK,MAAM;YACP,OAAO,4BAA4B,CAAC;QACxC,KAAK,aAAa;YACd,OAAO,2BAA2B,CAAC;QACvC,KAAK,cAAc;YACf,OAAO,4BAA4B,CAAC;QACxC,KAAK,OAAO;YACR,OAAO,+BAA+B,CAAC;QAC3C,KAAK,YAAY;YACb,OAAO,4BAA4B,CAAC;QACxC,KAAK,cAAc;YACf,OAAO,8BAA8B,CAAC;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AAE,CAAC,CAAC;QACvF,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;QAEzB,IAAI,MAAM,KAAK,aAAa,EAAE;YAC1B,OAAO,CAAC,SAAS,GAAG,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;gBACrD,IAAA,kCAAmB,EAAC,SAAS,CAAC,CAAC;gBAC/B,OAAO,IAAI,CAAC;YAChB,CAAC,CAAA;SACJ;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AA3ED,0CA2EC"}
|
46
lib.commonjs/providers/provider-chainstack.d.ts
vendored
46
lib.commonjs/providers/provider-chainstack.d.ts
vendored
@ -1,46 +0,0 @@
|
|||||||
/**
|
|
||||||
* [[link-chainstack]] provides a third-party service for connecting to
|
|
||||||
* various blockchains over JSON-RPC.
|
|
||||||
*
|
|
||||||
* **Supported Networks**
|
|
||||||
*
|
|
||||||
* - Ethereum Mainnet (``mainnet``)
|
|
||||||
* - Arbitrum (``arbitrum``)
|
|
||||||
* - BNB Smart Chain Mainnet (``bnb``)
|
|
||||||
* - Polygon (``matic``)
|
|
||||||
*
|
|
||||||
* @_subsection: api/providers/thirdparty:Chainstack [providers-chainstack]
|
|
||||||
*/
|
|
||||||
import { FetchRequest } from "../utils/index.js";
|
|
||||||
import { Network } from "./network.js";
|
|
||||||
import { JsonRpcProvider } from "./provider-jsonrpc.js";
|
|
||||||
import type { AbstractProvider } from "./abstract-provider.js";
|
|
||||||
import type { CommunityResourcable } from "./community.js";
|
|
||||||
import type { Networkish } from "./network.js";
|
|
||||||
/**
|
|
||||||
* The **ChainstackProvider** connects to the [[link-chainstack]]
|
|
||||||
* JSON-RPC end-points.
|
|
||||||
*
|
|
||||||
* By default, a highly-throttled API key is used, which is
|
|
||||||
* appropriate for quick prototypes and simple scripts. To
|
|
||||||
* gain access to an increased rate-limit, it is highly
|
|
||||||
* recommended to [sign up here](link-chainstack).
|
|
||||||
*/
|
|
||||||
export declare class ChainstackProvider extends JsonRpcProvider implements CommunityResourcable {
|
|
||||||
/**
|
|
||||||
* The API key for the Chainstack connection.
|
|
||||||
*/
|
|
||||||
readonly apiKey: string;
|
|
||||||
/**
|
|
||||||
* Creates a new **ChainstackProvider**.
|
|
||||||
*/
|
|
||||||
constructor(_network?: Networkish, apiKey?: null | string);
|
|
||||||
_getProvider(chainId: number): AbstractProvider;
|
|
||||||
isCommunityResource(): boolean;
|
|
||||||
/**
|
|
||||||
* Returns a prepared request for connecting to %%network%%
|
|
||||||
* with %%apiKey%% and %%projectSecret%%.
|
|
||||||
*/
|
|
||||||
static getRequest(network: Network, apiKey?: null | string): FetchRequest;
|
|
||||||
}
|
|
||||||
//# sourceMappingURL=provider-chainstack.d.ts.map
|
|
@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"provider-chainstack.d.ts","sourceRoot":"","sources":["../../src.ts/providers/provider-chainstack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EACe,YAAY,EACjC,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA6B/C;;;;;;;;GAQG;AACH,qBAAa,kBAAmB,SAAQ,eAAgB,YAAW,oBAAoB;IACnF;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAG,MAAM,CAAC;IAEzB;;OAEG;gBACS,QAAQ,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM;IAYzD,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB;IAO/C,mBAAmB,IAAI,OAAO;IAI9B;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,YAAY;CAe5E"}
|
|
@ -1,102 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.ChainstackProvider = void 0;
|
|
||||||
/**
|
|
||||||
* [[link-chainstack]] provides a third-party service for connecting to
|
|
||||||
* various blockchains over JSON-RPC.
|
|
||||||
*
|
|
||||||
* **Supported Networks**
|
|
||||||
*
|
|
||||||
* - Ethereum Mainnet (``mainnet``)
|
|
||||||
* - Arbitrum (``arbitrum``)
|
|
||||||
* - BNB Smart Chain Mainnet (``bnb``)
|
|
||||||
* - Polygon (``matic``)
|
|
||||||
*
|
|
||||||
* @_subsection: api/providers/thirdparty:Chainstack [providers-chainstack]
|
|
||||||
*/
|
|
||||||
const index_js_1 = require("../utils/index.js");
|
|
||||||
const community_js_1 = require("./community.js");
|
|
||||||
const network_js_1 = require("./network.js");
|
|
||||||
const provider_jsonrpc_js_1 = require("./provider-jsonrpc.js");
|
|
||||||
function getApiKey(name) {
|
|
||||||
switch (name) {
|
|
||||||
case "mainnet": return "39f1d67cedf8b7831010a665328c9197";
|
|
||||||
case "arbitrum": return "0550c209db33c3abf4cc927e1e18cea1";
|
|
||||||
case "bnb": return "98b5a77e531614387366f6fc5da097f8";
|
|
||||||
case "matic": return "cd9d4d70377471aa7c142ec4a4205249";
|
|
||||||
}
|
|
||||||
(0, index_js_1.assertArgument)(false, "unsupported network", "network", name);
|
|
||||||
}
|
|
||||||
function getHost(name) {
|
|
||||||
switch (name) {
|
|
||||||
case "mainnet":
|
|
||||||
return "ethereum-mainnet.core.chainstack.com";
|
|
||||||
case "arbitrum":
|
|
||||||
return "arbitrum-mainnet.core.chainstack.com";
|
|
||||||
case "bnb":
|
|
||||||
return "bsc-mainnet.core.chainstack.com";
|
|
||||||
case "matic":
|
|
||||||
return "polygon-mainnet.core.chainstack.com";
|
|
||||||
}
|
|
||||||
(0, index_js_1.assertArgument)(false, "unsupported network", "network", name);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* The **ChainstackProvider** connects to the [[link-chainstack]]
|
|
||||||
* JSON-RPC end-points.
|
|
||||||
*
|
|
||||||
* By default, a highly-throttled API key is used, which is
|
|
||||||
* appropriate for quick prototypes and simple scripts. To
|
|
||||||
* gain access to an increased rate-limit, it is highly
|
|
||||||
* recommended to [sign up here](link-chainstack).
|
|
||||||
*/
|
|
||||||
class ChainstackProvider extends provider_jsonrpc_js_1.JsonRpcProvider {
|
|
||||||
/**
|
|
||||||
* The API key for the Chainstack connection.
|
|
||||||
*/
|
|
||||||
apiKey;
|
|
||||||
/**
|
|
||||||
* Creates a new **ChainstackProvider**.
|
|
||||||
*/
|
|
||||||
constructor(_network, apiKey) {
|
|
||||||
if (_network == null) {
|
|
||||||
_network = "mainnet";
|
|
||||||
}
|
|
||||||
const network = network_js_1.Network.from(_network);
|
|
||||||
if (apiKey == null) {
|
|
||||||
apiKey = getApiKey(network.name);
|
|
||||||
}
|
|
||||||
const request = ChainstackProvider.getRequest(network, apiKey);
|
|
||||||
super(request, network, { staticNetwork: network });
|
|
||||||
(0, index_js_1.defineProperties)(this, { apiKey });
|
|
||||||
}
|
|
||||||
_getProvider(chainId) {
|
|
||||||
try {
|
|
||||||
return new ChainstackProvider(chainId, this.apiKey);
|
|
||||||
}
|
|
||||||
catch (error) { }
|
|
||||||
return super._getProvider(chainId);
|
|
||||||
}
|
|
||||||
isCommunityResource() {
|
|
||||||
return (this.apiKey === getApiKey(this._network.name));
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Returns a prepared request for connecting to %%network%%
|
|
||||||
* with %%apiKey%% and %%projectSecret%%.
|
|
||||||
*/
|
|
||||||
static getRequest(network, apiKey) {
|
|
||||||
if (apiKey == null) {
|
|
||||||
apiKey = getApiKey(network.name);
|
|
||||||
}
|
|
||||||
const request = new index_js_1.FetchRequest(`https:/\/${getHost(network.name)}/${apiKey}`);
|
|
||||||
request.allowGzip = true;
|
|
||||||
if (apiKey === getApiKey(network.name)) {
|
|
||||||
request.retryFunc = async (request, response, attempt) => {
|
|
||||||
(0, community_js_1.showThrottleMessage)("ChainstackProvider");
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return request;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.ChainstackProvider = ChainstackProvider;
|
|
||||||
//# sourceMappingURL=provider-chainstack.js.map
|
|
@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"provider-chainstack.js","sourceRoot":"","sources":["../../src.ts/providers/provider-chainstack.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;GAYG;AACH,gDAE2B;AAE3B,iDAAqD;AACrD,6CAAuC;AACvC,+DAAwD;AAOxD,SAAS,SAAS,CAAC,IAAY;IAC3B,QAAQ,IAAI,EAAE;QACV,KAAK,SAAS,CAAC,CAAC,OAAO,kCAAkC,CAAC;QAC1D,KAAK,UAAU,CAAC,CAAC,OAAO,kCAAkC,CAAA;QAC1D,KAAK,KAAK,CAAC,CAAC,OAAO,kCAAkC,CAAC;QACtD,KAAK,OAAO,CAAC,CAAC,OAAO,kCAAkC,CAAC;KAC3D;IAED,IAAA,yBAAc,EAAC,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,OAAO,CAAC,IAAY;IACzB,QAAO,IAAI,EAAE;QACT,KAAK,SAAS;YACV,OAAO,sCAAsC,CAAC;QAClD,KAAK,UAAU;YACX,OAAO,sCAAsC,CAAC;QAClD,KAAK,KAAK;YACN,OAAO,iCAAiC,CAAC;QAC7C,KAAK,OAAO;YACR,OAAO,qCAAqC,CAAC;KACpD;IAED,IAAA,yBAAc,EAAC,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;AAClE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAa,kBAAmB,SAAQ,qCAAe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,CAAC;QAEzB,IAAI,MAAM,KAAK,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACpC,OAAO,CAAC,SAAS,GAAG,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;gBACrD,IAAA,kCAAmB,EAAC,oBAAoB,CAAC,CAAC;gBAC1C,OAAO,IAAI,CAAC;YAChB,CAAC,CAAC;SACL;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AAnDD,gDAmDC"}
|
|
@ -8,7 +8,7 @@
|
|||||||
* - Ethereum Mainnet (``mainnet``)
|
* - Ethereum Mainnet (``mainnet``)
|
||||||
* - Goerli Testnet (``goerli``)
|
* - Goerli Testnet (``goerli``)
|
||||||
* - Sepolia Testnet (``sepolia``)
|
* - Sepolia Testnet (``sepolia``)
|
||||||
* - Holesky Testnet (``holesky``)
|
* - Sepolia Testnet (``holesky``)
|
||||||
* - Arbitrum (``arbitrum``)
|
* - Arbitrum (``arbitrum``)
|
||||||
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
|
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
|
||||||
* - BNB Smart Chain Mainnet (``bnb``)
|
* - BNB Smart Chain Mainnet (``bnb``)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* - Ethereum Mainnet (``mainnet``)
|
* - Ethereum Mainnet (``mainnet``)
|
||||||
* - Goerli Testnet (``goerli``)
|
* - Goerli Testnet (``goerli``)
|
||||||
* - Sepolia Testnet (``sepolia``)
|
* - Sepolia Testnet (``sepolia``)
|
||||||
* - Holesky Testnet (``holesky``)
|
* - Sepolia Testnet (``holesky``)
|
||||||
* - Arbitrum (``arbitrum``)
|
* - Arbitrum (``arbitrum``)
|
||||||
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
|
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
|
||||||
* - BNB Smart Chain Mainnet (``bnb``)
|
* - BNB Smart Chain Mainnet (``bnb``)
|
||||||
|
4
lib.commonjs/providers/provider-infura.d.ts
vendored
4
lib.commonjs/providers/provider-infura.d.ts
vendored
@ -16,13 +16,11 @@
|
|||||||
* - BNB Smart Chain Mainnet (``bnb``)
|
* - BNB Smart Chain Mainnet (``bnb``)
|
||||||
* - BNB Smart Chain Testnet (``bnbt``)
|
* - BNB Smart Chain Testnet (``bnbt``)
|
||||||
* - Linea (``linea``)
|
* - Linea (``linea``)
|
||||||
* - Linea Goerli Testnet (``linea-goerli``)
|
* - Linea Goerlia Testnet (``linea-goerli``)
|
||||||
* - Linea Sepolia Testnet (``linea-sepolia``)
|
|
||||||
* - Optimism (``optimism``)
|
* - Optimism (``optimism``)
|
||||||
* - Optimism Goerli Testnet (``optimism-goerli``)
|
* - Optimism Goerli Testnet (``optimism-goerli``)
|
||||||
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
||||||
* - Polygon (``matic``)
|
* - Polygon (``matic``)
|
||||||
* - Polygon Amoy Testnet (``matic-amoy``)
|
|
||||||
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
||||||
*
|
*
|
||||||
* @_subsection: api/providers/thirdparty:INFURA [providers-infura]
|
* @_subsection: api/providers/thirdparty:INFURA [providers-infura]
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"provider-infura.d.ts","sourceRoot":"","sources":["../../src.ts/providers/provider-infura.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EACe,YAAY,EACjC,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;A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ACH,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,aAAa,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,YAAY;CAiB9G"}
|
@ -19,13 +19,11 @@ exports.InfuraProvider = exports.InfuraWebSocketProvider = void 0;
|
|||||||
* - BNB Smart Chain Mainnet (``bnb``)
|
* - BNB Smart Chain Mainnet (``bnb``)
|
||||||
* - BNB Smart Chain Testnet (``bnbt``)
|
* - BNB Smart Chain Testnet (``bnbt``)
|
||||||
* - Linea (``linea``)
|
* - Linea (``linea``)
|
||||||
* - Linea Goerli Testnet (``linea-goerli``)
|
* - Linea Goerlia Testnet (``linea-goerli``)
|
||||||
* - Linea Sepolia Testnet (``linea-sepolia``)
|
|
||||||
* - Optimism (``optimism``)
|
* - Optimism (``optimism``)
|
||||||
* - Optimism Goerli Testnet (``optimism-goerli``)
|
* - Optimism Goerli Testnet (``optimism-goerli``)
|
||||||
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
* - Optimism Sepolia Testnet (``optimism-sepolia``)
|
||||||
* - Polygon (``matic``)
|
* - Polygon (``matic``)
|
||||||
* - Polygon Amoy Testnet (``matic-amoy``)
|
|
||||||
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
* - Polygon Mumbai Testnet (``matic-mumbai``)
|
||||||
*
|
*
|
||||||
* @_subsection: api/providers/thirdparty:INFURA [providers-infura]
|
* @_subsection: api/providers/thirdparty:INFURA [providers-infura]
|
||||||
@ -64,12 +62,8 @@ function getHost(name) {
|
|||||||
return "linea-mainnet.infura.io";
|
return "linea-mainnet.infura.io";
|
||||||
case "linea-goerli":
|
case "linea-goerli":
|
||||||
return "linea-goerli.infura.io";
|
return "linea-goerli.infura.io";
|
||||||
case "linea-sepolia":
|
|
||||||
return "linea-sepolia.infura.io";
|
|
||||||
case "matic":
|
case "matic":
|
||||||
return "polygon-mainnet.infura.io";
|
return "polygon-mainnet.infura.io";
|
||||||
case "matic-amoy":
|
|
||||||
return "polygon-amoy.infura.io";
|
|
||||||
case "matic-mumbai":
|
case "matic-mumbai":
|
||||||
return "polygon-mumbai.infura.io";
|
return "polygon-mumbai.infura.io";
|
||||||
case "optimism":
|
case "optimism":
|
||||||
@ -110,7 +104,7 @@ class InfuraWebSocketProvider extends provider_websocket_js_1.WebSocketProvider
|
|||||||
const req = provider._getConnection();
|
const req = provider._getConnection();
|
||||||
(0, index_js_1.assert)(!req.credentials, "INFURA WebSocket project secrets unsupported", "UNSUPPORTED_OPERATION", { operation: "InfuraProvider.getWebSocketProvider()" });
|
(0, index_js_1.assert)(!req.credentials, "INFURA WebSocket project secrets unsupported", "UNSUPPORTED_OPERATION", { operation: "InfuraProvider.getWebSocketProvider()" });
|
||||||
const url = req.url.replace(/^http/i, "ws").replace("/v3/", "/ws/v3/");
|
const url = req.url.replace(/^http/i, "ws").replace("/v3/", "/ws/v3/");
|
||||||
super(url, provider._network);
|
super(url, network);
|
||||||
(0, index_js_1.defineProperties)(this, {
|
(0, index_js_1.defineProperties)(this, {
|
||||||
projectId: provider.projectId,
|
projectId: provider.projectId,
|
||||||
projectSecret: provider.projectSecret
|
projectSecret: provider.projectSecret
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"provider-infura.js","sourceRoot":"","sources":["../../src.ts/providers/provider-infura.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,gDAE2B;AAE3B,iDAAqD;AACrD,6CAAuC;AACvC,+DAAwD;AACxD,mEAA4D;AAO5D,MAAM,gBAAgB,GAAG,kCAAkC,CAAC;AAE5D,SAAS,OAAO,CAAC,IAAY;IACzB,QAAO,IAAI,EAAE;QACT,KAAK,SAAS;YACV,OAAO,mBAAmB,CAAC;QAC/B,KAAK,QAAQ;YACT,OAAO,kBAAkB,CAAC;QAC9B,KAAK,SAAS;YACV,OAAO,mBAAmB,CAAC;QAE/B,KAAK,UAAU;YACX,OA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OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrE;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,gBAAgB;;IAGvD;;OAEG;IACH,IAAI,SAAS,IAAI,WAAW,CAAwC;IAEpE;;OAEG;gBACS,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW;IAKnD,KAAK,CAAC,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrE;AAED;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,kBAAkB;;IAUlD;;;;OAIG;gBACS,OAAO,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,yBAAyB;IAgCtE,cAAc,CAAC,GAAG,EAAE,YAAY,GAAG,UAAU;IAoB7C;;;OAGG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,gBAAgB,GAAG,IAAI;IAWlE,KAAK,CAAC,OAAO,EAAE,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,aAAa,GAAG,YAAY,CAAC,CAAC;IAmC1G;;;OAGG;IACG,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAuCrD;;;OAGG;IACG,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG/C"}
|
@ -48,9 +48,6 @@ class SocketSubscriber {
|
|||||||
}
|
}
|
||||||
stop() {
|
stop() {
|
||||||
(this.#filterId).then((filterId) => {
|
(this.#filterId).then((filterId) => {
|
||||||
if (this.#provider.destroyed) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.#provider.send("eth_unsubscribe", [filterId]);
|
this.#provider.send("eth_unsubscribe", [filterId]);
|
||||||
});
|
});
|
||||||
this.#filterId = null;
|
this.#filterId = null;
|
||||||
|
File diff suppressed because one or more lines are too long
27
lib.commonjs/providers/provider.d.ts
vendored
27
lib.commonjs/providers/provider.d.ts
vendored
@ -1,7 +1,7 @@
|
|||||||
import type { AddressLike, NameResolver } from "../address/index.js";
|
import type { AddressLike, NameResolver } from "../address/index.js";
|
||||||
import type { BigNumberish, EventEmitterable } from "../utils/index.js";
|
import type { BigNumberish, EventEmitterable } from "../utils/index.js";
|
||||||
import type { Signature } from "../crypto/index.js";
|
import type { Signature } from "../crypto/index.js";
|
||||||
import type { AccessList, AccessListish, BlobLike, KzgLibrary, TransactionLike } from "../transaction/index.js";
|
import type { AccessList, AccessListish, TransactionLike } from "../transaction/index.js";
|
||||||
import type { ContractRunner } from "./contracts.js";
|
import type { ContractRunner } from "./contracts.js";
|
||||||
import type { Network } from "./network.js";
|
import type { Network } from "./network.js";
|
||||||
/**
|
/**
|
||||||
@ -144,26 +144,6 @@ export interface TransactionRequest {
|
|||||||
* the fetch to unexpected parties.
|
* the fetch to unexpected parties.
|
||||||
*/
|
*/
|
||||||
enableCcipRead?: boolean;
|
enableCcipRead?: boolean;
|
||||||
/**
|
|
||||||
* The blob versioned hashes (see [[link-eip-4844]]).
|
|
||||||
*/
|
|
||||||
blobVersionedHashes?: null | Array<string>;
|
|
||||||
/**
|
|
||||||
* The maximum fee per blob gas (see [[link-eip-4844]]).
|
|
||||||
*/
|
|
||||||
maxFeePerBlobGas?: null | BigNumberish;
|
|
||||||
/**
|
|
||||||
* Any blobs to include in the transaction (see [[link-eip-4844]]).
|
|
||||||
*/
|
|
||||||
blobs?: null | Array<BlobLike>;
|
|
||||||
/**
|
|
||||||
* An external library for computing the KZG commitments and
|
|
||||||
* proofs necessary for EIP-4844 transactions (see [[link-eip-4844]]).
|
|
||||||
*
|
|
||||||
* This is generally ``null``, unless you are creating BLOb
|
|
||||||
* transactions.
|
|
||||||
*/
|
|
||||||
kzg?: null | KzgLibrary;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* A **PreparedTransactionRequest** is identical to a [[TransactionRequest]]
|
* A **PreparedTransactionRequest** is identical to a [[TransactionRequest]]
|
||||||
@ -367,11 +347,6 @@ export declare class Block implements BlockParams, Iterable<string> {
|
|||||||
* including this block.
|
* including this block.
|
||||||
*/
|
*/
|
||||||
readonly miner: string;
|
readonly miner: string;
|
||||||
/**
|
|
||||||
* The latest RANDAO mix of the post beacon state of
|
|
||||||
* the previous block.
|
|
||||||
*/
|
|
||||||
readonly prevRandao: null | string;
|
|
||||||
/**
|
/**
|
||||||
* Any extra data the validator wished to include.
|
* Any extra data the validator wished to include.
|
||||||
*/
|
*/
|
||||||
|
File diff suppressed because one or more lines are too long
@ -93,7 +93,7 @@ function copyRequest(req) {
|
|||||||
if (req.data) {
|
if (req.data) {
|
||||||
result.data = (0, index_js_1.hexlify)(req.data);
|
result.data = (0, index_js_1.hexlify)(req.data);
|
||||||
}
|
}
|
||||||
const bigIntKeys = "chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);
|
const bigIntKeys = "chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);
|
||||||
for (const key of bigIntKeys) {
|
for (const key of bigIntKeys) {
|
||||||
if (!(key in req) || req[key] == null) {
|
if (!(key in req) || req[key] == null) {
|
||||||
continue;
|
continue;
|
||||||
@ -119,20 +119,6 @@ function copyRequest(req) {
|
|||||||
if ("customData" in req) {
|
if ("customData" in req) {
|
||||||
result.customData = req.customData;
|
result.customData = req.customData;
|
||||||
}
|
}
|
||||||
if ("blobVersionedHashes" in req && req.blobVersionedHashes) {
|
|
||||||
result.blobVersionedHashes = req.blobVersionedHashes.slice();
|
|
||||||
}
|
|
||||||
if ("kzg" in req) {
|
|
||||||
result.kzg = req.kzg;
|
|
||||||
}
|
|
||||||
if ("blobs" in req && req.blobs) {
|
|
||||||
result.blobs = req.blobs.map((b) => {
|
|
||||||
if ((0, index_js_1.isBytesLike)(b)) {
|
|
||||||
return (0, index_js_1.hexlify)(b);
|
|
||||||
}
|
|
||||||
return Object.assign({}, b);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
exports.copyRequest = copyRequest;
|
exports.copyRequest = copyRequest;
|
||||||
@ -221,11 +207,6 @@ class Block {
|
|||||||
* including this block.
|
* including this block.
|
||||||
*/
|
*/
|
||||||
miner;
|
miner;
|
||||||
/**
|
|
||||||
* The latest RANDAO mix of the post beacon state of
|
|
||||||
* the previous block.
|
|
||||||
*/
|
|
||||||
prevRandao;
|
|
||||||
/**
|
/**
|
||||||
* Any extra data the validator wished to include.
|
* Any extra data the validator wished to include.
|
||||||
*/
|
*/
|
||||||
@ -266,7 +247,6 @@ class Block {
|
|||||||
blobGasUsed: block.blobGasUsed,
|
blobGasUsed: block.blobGasUsed,
|
||||||
excessBlobGas: block.excessBlobGas,
|
excessBlobGas: block.excessBlobGas,
|
||||||
miner: block.miner,
|
miner: block.miner,
|
||||||
prevRandao: getValue(block.prevRandao),
|
|
||||||
extraData: block.extraData,
|
extraData: block.extraData,
|
||||||
baseFeePerGas: getValue(block.baseFeePerGas),
|
baseFeePerGas: getValue(block.baseFeePerGas),
|
||||||
stateRoot: block.stateRoot,
|
stateRoot: block.stateRoot,
|
||||||
@ -309,7 +289,7 @@ class Block {
|
|||||||
* Returns a JSON-friendly value.
|
* Returns a JSON-friendly value.
|
||||||
*/
|
*/
|
||||||
toJSON() {
|
toJSON() {
|
||||||
const { baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash, miner, prevRandao, nonce, number, parentHash, parentBeaconBlockRoot, stateRoot, receiptsRoot, timestamp, transactions } = this;
|
const { baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash, miner, nonce, number, parentHash, parentBeaconBlockRoot, stateRoot, receiptsRoot, timestamp, transactions } = this;
|
||||||
return {
|
return {
|
||||||
_type: "Block",
|
_type: "Block",
|
||||||
baseFeePerGas: toJson(baseFeePerGas),
|
baseFeePerGas: toJson(baseFeePerGas),
|
||||||
@ -319,7 +299,7 @@ class Block {
|
|||||||
gasUsed: toJson(gasUsed),
|
gasUsed: toJson(gasUsed),
|
||||||
blobGasUsed: toJson(this.blobGasUsed),
|
blobGasUsed: toJson(this.blobGasUsed),
|
||||||
excessBlobGas: toJson(this.excessBlobGas),
|
excessBlobGas: toJson(this.excessBlobGas),
|
||||||
hash, miner, prevRandao, nonce, number, parentHash, timestamp,
|
hash, miner, nonce, number, parentHash, timestamp,
|
||||||
parentBeaconBlockRoot, stateRoot, receiptsRoot,
|
parentBeaconBlockRoot, stateRoot, receiptsRoot,
|
||||||
transactions,
|
transactions,
|
||||||
};
|
};
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
{"version":3,"file":"subscriber-filterid.d.ts","sourceRoot":"","sources":["../../src.ts/providers/subscriber-filterid.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAE3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAMhE;;;;;;;;;GASG;AACH,qBAAa,kBAAmB,YAAW,UAAU;;IAYjD;;;;OAIG;gBACS,QAAQ,EAAE,kBAAkB;IAaxC;;OAEG;IACH,UAAU,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;IAIzD;;OAEG;IACH,YAAY,CAAC,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3E;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,GAAG,UAAU;IAwDhD,KAAK,IAAI,IAAI;IAOb,IAAI,IAAI,IAAI;IASZ,KAAK,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,IAAI;IAKtC,MAAM,IAAI,IAAI;CACjB;AAED;;;;GA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GAAG,UAAU;IAuDhD,KAAK,IAAI,IAAI;IAOb,IAAI,IAAI,IAAI;IASZ,KAAK,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,IAAI;IAKtC,MAAM,IAAI,IAAI;CACjB;AAED;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,kBAAkB;;IAG3D;;;OAGG;gBACS,QAAQ,EAAE,kBAAkB,EAAE,MAAM,EAAE,WAAW;IAK7D,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,GAAG,UAAU;IAI1C,UAAU,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;IAKzD,YAAY,CAAC,QAAQ,EAAE,kBAAkB,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAKvF;AAED;;;;GAIG;AACH,qBAAa,yBAA0B,SAAQ,kBAAkB;IACvD,UAAU,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;IAIzD,YAAY,CAAC,QAAQ,EAAE,kBAAkB,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAKvF"}
|
@ -100,9 +100,6 @@ class FilterIdSubscriber {
|
|||||||
if (filterIdPromise) {
|
if (filterIdPromise) {
|
||||||
this.#filterIdPromise = null;
|
this.#filterIdPromise = null;
|
||||||
filterIdPromise.then((filterId) => {
|
filterIdPromise.then((filterId) => {
|
||||||
if (this.#provider.destroyed) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.#provider.send("eth_uninstallFilter", [filterId]);
|
this.#provider.send("eth_uninstallFilter", [filterId]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"subscriber-filterid.js","sourceRoot":"","sources":["../../src.ts/providers/subscriber-filterid.ts"],"names":[],"mappings":";;;AAAA,gDAA4C;AAE5C,mEAAiE;AAOjE,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,CAAC,MAAM,CAAC,CAAC;IAC7D,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,QAA4B;QACzC,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,CAAE,IAAI,CAAC,MAAM,CAAE,CAAC,CAAC;QACvE,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,QAA4B,EAAE,OAAmB;QAChE,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;YAC1B,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;SAC5E;IACL,CAAC;CACJ;AA1BD,0DA0BC;AAED;;;;GAIG;AACH,MAAa,yBAA0B,SAAQ,kBAAkB;IAC7D,KAAK,CAAC,UAAU,CAAC,QAA4B;QACzC,OAAO,MAAM,QAAQ,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAG,CAAC,CAAC;IACvE,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,QAA4B,EAAE,OAAmB;QAChE,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;YAC1B,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;SACpC;IACL,CAAC;CACJ;AAVD,8DAUC"}
|
2
lib.commonjs/transaction/index.d.ts
vendored
2
lib.commonjs/transaction/index.d.ts
vendored
@ -21,5 +21,5 @@ export type AccessListish = AccessList | Array<[string, Array<string>]> | Record
|
|||||||
export { accessListify } from "./accesslist.js";
|
export { accessListify } from "./accesslist.js";
|
||||||
export { computeAddress, recoverAddress } from "./address.js";
|
export { computeAddress, recoverAddress } from "./address.js";
|
||||||
export { Transaction } from "./transaction.js";
|
export { Transaction } from "./transaction.js";
|
||||||
export type { Blob, BlobLike, KzgLibrary, TransactionLike } from "./transaction.js";
|
export type { TransactionLike } from "./transaction.js";
|
||||||
//# sourceMappingURL=index.d.ts.map
|
//# sourceMappingURL=index.d.ts.map
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/transaction/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC;AAE9E;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,GACV,KAAK,CAAC,CAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAE,CAAC,GAChC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAG1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,YAAY,EACR,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAC9C,MAAM,kBAAkB,CAAC"}
|
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src.ts/transaction/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC;AAE9E;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,GACV,KAAK,CAAC,CAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAE,CAAC,GAChC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAG1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"}
|
77
lib.commonjs/transaction/transaction.d.ts
vendored
77
lib.commonjs/transaction/transaction.d.ts
vendored
@ -72,49 +72,6 @@ export interface TransactionLike<A = string> {
|
|||||||
* The versioned hashes (see [[link-eip-4844]]).
|
* The versioned hashes (see [[link-eip-4844]]).
|
||||||
*/
|
*/
|
||||||
blobVersionedHashes?: null | Array<string>;
|
blobVersionedHashes?: null | Array<string>;
|
||||||
/**
|
|
||||||
* The blobs (if any) attached to this transaction (see [[link-eip-4844]]).
|
|
||||||
*/
|
|
||||||
blobs?: null | Array<BlobLike>;
|
|
||||||
/**
|
|
||||||
* An external library for computing the KZG commitments and
|
|
||||||
* proofs necessary for EIP-4844 transactions (see [[link-eip-4844]]).
|
|
||||||
*
|
|
||||||
* This is generally ``null``, unless you are creating BLOb
|
|
||||||
* transactions.
|
|
||||||
*/
|
|
||||||
kzg?: null | KzgLibrary;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* A full-valid BLOb object for [[link-eip-4844]] transactions.
|
|
||||||
*
|
|
||||||
* The commitment and proof should have been computed using a
|
|
||||||
* KZG library.
|
|
||||||
*/
|
|
||||||
export interface Blob {
|
|
||||||
data: string;
|
|
||||||
proof: string;
|
|
||||||
commitment: string;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* A BLOb object that can be passed for [[link-eip-4844]]
|
|
||||||
* transactions.
|
|
||||||
*
|
|
||||||
* It may have had its commitment and proof already provided
|
|
||||||
* or rely on an attached [[KzgLibrary]] to compute them.
|
|
||||||
*/
|
|
||||||
export type BlobLike = BytesLike | {
|
|
||||||
data: BytesLike;
|
|
||||||
proof: BytesLike;
|
|
||||||
commitment: BytesLike;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* A KZG Library with the necessary functions to compute
|
|
||||||
* BLOb commitments and proofs.
|
|
||||||
*/
|
|
||||||
export interface KzgLibrary {
|
|
||||||
blobToKzgCommitment: (blob: Uint8Array) => Uint8Array;
|
|
||||||
computeBlobKzgProof: (blob: Uint8Array, commitment: Uint8Array) => Uint8Array;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* A **Transaction** describes an operation to be executed on
|
* A **Transaction** describes an operation to be executed on
|
||||||
@ -214,42 +171,10 @@ export declare class Transaction implements TransactionLike<string> {
|
|||||||
get maxFeePerBlobGas(): null | bigint;
|
get maxFeePerBlobGas(): null | bigint;
|
||||||
set maxFeePerBlobGas(value: null | BigNumberish);
|
set maxFeePerBlobGas(value: null | BigNumberish);
|
||||||
/**
|
/**
|
||||||
* The BLOb versioned hashes for Cancun transactions.
|
* The BLOB versioned hashes for Cancun transactions.
|
||||||
*/
|
*/
|
||||||
get blobVersionedHashes(): null | Array<string>;
|
get blobVersionedHashes(): null | Array<string>;
|
||||||
set blobVersionedHashes(value: null | Array<string>);
|
set blobVersionedHashes(value: null | Array<string>);
|
||||||
/**
|
|
||||||
* The BLObs for the Transaction, if any.
|
|
||||||
*
|
|
||||||
* If ``blobs`` is non-``null``, then the [[seriailized]]
|
|
||||||
* will return the network formatted sidecar, otherwise it
|
|
||||||
* will return the standard [[link-eip-2718]] payload. The
|
|
||||||
* [[unsignedSerialized]] is unaffected regardless.
|
|
||||||
*
|
|
||||||
* When setting ``blobs``, either fully valid [[Blob]] objects
|
|
||||||
* may be specified (i.e. correctly padded, with correct
|
|
||||||
* committments and proofs) or a raw [[BytesLike]] may
|
|
||||||
* be provided.
|
|
||||||
*
|
|
||||||
* If raw [[BytesLike]] are provided, the [[kzg]] property **must**
|
|
||||||
* be already set. The blob will be correctly padded and the
|
|
||||||
* [[KzgLibrary]] will be used to compute the committment and
|
|
||||||
* proof for the blob.
|
|
||||||
*
|
|
||||||
* A BLOb is a sequence of field elements, each of which must
|
|
||||||
* be within the BLS field modulo, so some additional processing
|
|
||||||
* may be required to encode arbitrary data to ensure each 32 byte
|
|
||||||
* field is within the valid range.
|
|
||||||
*
|
|
||||||
* Setting this automatically populates [[blobVersionedHashes]],
|
|
||||||
* overwriting any existing values. Setting this to ``null``
|
|
||||||
* does **not** remove the [[blobVersionedHashes]], leaving them
|
|
||||||
* present.
|
|
||||||
*/
|
|
||||||
get blobs(): null | Array<Blob>;
|
|
||||||
set blobs(_blobs: null | Array<BlobLike>);
|
|
||||||
get kzg(): null | KzgLibrary;
|
|
||||||
set kzg(kzg: null | KzgLibrary);
|
|
||||||
/**
|
/**
|
||||||
* Creates a new Transaction with default values.
|
* Creates a new Transaction with default values.
|
||||||
*/
|
*/
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../src.ts/transaction/transaction.ts"],"names":[],"mappings":"AAGA,OAAO,EACgB,SAAS,EAC/B,MAAM,oBAAoB,CAAC;AAS5B,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAe5D;;;;GAIG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,MAAM;IACvC;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH,EAAE,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EA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IAIpB;;OAEG;IACH,MAAM,IAAI,GAAG;IAuBb;;;OAGG;IACH,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,GAAG,WAAW;CA8ClE"}
|
@ -13,15 +13,6 @@ const BN_27 = BigInt(27);
|
|||||||
const BN_28 = BigInt(28);
|
const BN_28 = BigInt(28);
|
||||||
const BN_35 = BigInt(35);
|
const BN_35 = BigInt(35);
|
||||||
const BN_MAX_UINT = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
const BN_MAX_UINT = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
||||||
const BLOB_SIZE = 4096 * 32;
|
|
||||||
function getVersionedHash(version, hash) {
|
|
||||||
let versioned = version.toString(16);
|
|
||||||
while (versioned.length < 2) {
|
|
||||||
versioned = "0" + versioned;
|
|
||||||
}
|
|
||||||
versioned += (0, index_js_2.sha256)(hash).substring(4);
|
|
||||||
return "0x" + versioned;
|
|
||||||
}
|
|
||||||
function handleAddress(value) {
|
function handleAddress(value) {
|
||||||
if (value === "0x") {
|
if (value === "0x") {
|
||||||
return null;
|
return null;
|
||||||
@ -104,7 +95,7 @@ function _parseLegacy(data) {
|
|||||||
s: (0, index_js_3.zeroPadValue)(fields[8], 32),
|
s: (0, index_js_3.zeroPadValue)(fields[8], 32),
|
||||||
v
|
v
|
||||||
});
|
});
|
||||||
//tx.hash = keccak256(data);
|
tx.hash = (0, index_js_2.keccak256)(data);
|
||||||
}
|
}
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
@ -195,7 +186,7 @@ function _parseEip1559(data) {
|
|||||||
if (fields.length === 9) {
|
if (fields.length === 9) {
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
//tx.hash = keccak256(data);
|
tx.hash = (0, index_js_2.keccak256)(data);
|
||||||
_parseEipSignature(tx, fields.slice(9));
|
_parseEipSignature(tx, fields.slice(9));
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
@ -236,7 +227,7 @@ function _parseEip2930(data) {
|
|||||||
if (fields.length === 8) {
|
if (fields.length === 8) {
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
//tx.hash = keccak256(data);
|
tx.hash = (0, index_js_2.keccak256)(data);
|
||||||
_parseEipSignature(tx, fields.slice(8));
|
_parseEipSignature(tx, fields.slice(8));
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
@ -259,29 +250,8 @@ function _serializeEip2930(tx, sig) {
|
|||||||
return (0, index_js_3.concat)(["0x01", (0, index_js_3.encodeRlp)(fields)]);
|
return (0, index_js_3.concat)(["0x01", (0, index_js_3.encodeRlp)(fields)]);
|
||||||
}
|
}
|
||||||
function _parseEip4844(data) {
|
function _parseEip4844(data) {
|
||||||
let fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));
|
const fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));
|
||||||
let typeName = "3";
|
(0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 11 || fields.length === 14), "invalid field count for transaction type: 3", "data", (0, index_js_3.hexlify)(data));
|
||||||
let blobs = null;
|
|
||||||
// Parse the network format
|
|
||||||
if (fields.length === 4 && Array.isArray(fields[0])) {
|
|
||||||
typeName = "3 (network format)";
|
|
||||||
const fBlobs = fields[1], fCommits = fields[2], fProofs = fields[3];
|
|
||||||
(0, index_js_3.assertArgument)(Array.isArray(fBlobs), "invalid network format: blobs not an array", "fields[1]", fBlobs);
|
|
||||||
(0, index_js_3.assertArgument)(Array.isArray(fCommits), "invalid network format: commitments not an array", "fields[2]", fCommits);
|
|
||||||
(0, index_js_3.assertArgument)(Array.isArray(fProofs), "invalid network format: proofs not an array", "fields[3]", fProofs);
|
|
||||||
(0, index_js_3.assertArgument)(fBlobs.length === fCommits.length, "invalid network format: blobs/commitments length mismatch", "fields", fields);
|
|
||||||
(0, index_js_3.assertArgument)(fBlobs.length === fProofs.length, "invalid network format: blobs/proofs length mismatch", "fields", fields);
|
|
||||||
blobs = [];
|
|
||||||
for (let i = 0; i < fields[1].length; i++) {
|
|
||||||
blobs.push({
|
|
||||||
data: fBlobs[i],
|
|
||||||
commitment: fCommits[i],
|
|
||||||
proof: fProofs[i],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
fields = fields[0];
|
|
||||||
}
|
|
||||||
(0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 11 || fields.length === 14), `invalid field count for transaction type: ${typeName}`, "data", (0, index_js_3.hexlify)(data));
|
|
||||||
const tx = {
|
const tx = {
|
||||||
type: 3,
|
type: 3,
|
||||||
chainId: handleUint(fields[0], "chainId"),
|
chainId: handleUint(fields[0], "chainId"),
|
||||||
@ -297,10 +267,7 @@ function _parseEip4844(data) {
|
|||||||
maxFeePerBlobGas: handleUint(fields[9], "maxFeePerBlobGas"),
|
maxFeePerBlobGas: handleUint(fields[9], "maxFeePerBlobGas"),
|
||||||
blobVersionedHashes: fields[10]
|
blobVersionedHashes: fields[10]
|
||||||
};
|
};
|
||||||
if (blobs) {
|
(0, index_js_3.assertArgument)(tx.to != null, "invalid address for transaction type: 3", "data", data);
|
||||||
tx.blobs = blobs;
|
|
||||||
}
|
|
||||||
(0, index_js_3.assertArgument)(tx.to != null, `invalid address for transaction type: ${typeName}`, "data", data);
|
|
||||||
(0, index_js_3.assertArgument)(Array.isArray(tx.blobVersionedHashes), "invalid blobVersionedHashes: must be an array", "data", data);
|
(0, index_js_3.assertArgument)(Array.isArray(tx.blobVersionedHashes), "invalid blobVersionedHashes: must be an array", "data", data);
|
||||||
for (let i = 0; i < tx.blobVersionedHashes.length; i++) {
|
for (let i = 0; i < tx.blobVersionedHashes.length; i++) {
|
||||||
(0, index_js_3.assertArgument)((0, index_js_3.isHexString)(tx.blobVersionedHashes[i], 32), `invalid blobVersionedHash at index ${i}: must be length 32`, "data", data);
|
(0, index_js_3.assertArgument)((0, index_js_3.isHexString)(tx.blobVersionedHashes[i], 32), `invalid blobVersionedHash at index ${i}: must be length 32`, "data", data);
|
||||||
@ -309,13 +276,11 @@ function _parseEip4844(data) {
|
|||||||
if (fields.length === 11) {
|
if (fields.length === 11) {
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
// @TODO: Do we need to do this? This is only called internally
|
tx.hash = (0, index_js_2.keccak256)(data);
|
||||||
// and used to verify hashes; it might save time to not do this
|
|
||||||
//tx.hash = keccak256(concat([ "0x03", encodeRlp(fields) ]));
|
|
||||||
_parseEipSignature(tx, fields.slice(11));
|
_parseEipSignature(tx, fields.slice(11));
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
function _serializeEip4844(tx, sig, blobs) {
|
function _serializeEip4844(tx, sig) {
|
||||||
const fields = [
|
const fields = [
|
||||||
formatNumber(tx.chainId, "chainId"),
|
formatNumber(tx.chainId, "chainId"),
|
||||||
formatNumber(tx.nonce, "nonce"),
|
formatNumber(tx.nonce, "nonce"),
|
||||||
@ -333,18 +298,6 @@ function _serializeEip4844(tx, sig, blobs) {
|
|||||||
fields.push(formatNumber(sig.yParity, "yParity"));
|
fields.push(formatNumber(sig.yParity, "yParity"));
|
||||||
fields.push((0, index_js_3.toBeArray)(sig.r));
|
fields.push((0, index_js_3.toBeArray)(sig.r));
|
||||||
fields.push((0, index_js_3.toBeArray)(sig.s));
|
fields.push((0, index_js_3.toBeArray)(sig.s));
|
||||||
// We have blobs; return the network wrapped format
|
|
||||||
if (blobs) {
|
|
||||||
return (0, index_js_3.concat)([
|
|
||||||
"0x03",
|
|
||||||
(0, index_js_3.encodeRlp)([
|
|
||||||
fields,
|
|
||||||
blobs.map((b) => b.data),
|
|
||||||
blobs.map((b) => b.commitment),
|
|
||||||
blobs.map((b) => b.proof),
|
|
||||||
])
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return (0, index_js_3.concat)(["0x03", (0, index_js_3.encodeRlp)(fields)]);
|
return (0, index_js_3.concat)(["0x03", (0, index_js_3.encodeRlp)(fields)]);
|
||||||
}
|
}
|
||||||
@ -376,8 +329,6 @@ class Transaction {
|
|||||||
#accessList;
|
#accessList;
|
||||||
#maxFeePerBlobGas;
|
#maxFeePerBlobGas;
|
||||||
#blobVersionedHashes;
|
#blobVersionedHashes;
|
||||||
#kzg;
|
|
||||||
#blobs;
|
|
||||||
/**
|
/**
|
||||||
* The transaction type.
|
* The transaction type.
|
||||||
*
|
*
|
||||||
@ -559,7 +510,7 @@ class Transaction {
|
|||||||
this.#maxFeePerBlobGas = (value == null) ? null : (0, index_js_3.getBigInt)(value, "maxFeePerBlobGas");
|
this.#maxFeePerBlobGas = (value == null) ? null : (0, index_js_3.getBigInt)(value, "maxFeePerBlobGas");
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The BLOb versioned hashes for Cancun transactions.
|
* The BLOB versioned hashes for Cancun transactions.
|
||||||
*/
|
*/
|
||||||
get blobVersionedHashes() {
|
get blobVersionedHashes() {
|
||||||
// @TODO: Mutation is inconsistent; if unset, the returned value
|
// @TODO: Mutation is inconsistent; if unset, the returned value
|
||||||
@ -580,87 +531,6 @@ class Transaction {
|
|||||||
}
|
}
|
||||||
this.#blobVersionedHashes = value;
|
this.#blobVersionedHashes = value;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* The BLObs for the Transaction, if any.
|
|
||||||
*
|
|
||||||
* If ``blobs`` is non-``null``, then the [[seriailized]]
|
|
||||||
* will return the network formatted sidecar, otherwise it
|
|
||||||
* will return the standard [[link-eip-2718]] payload. The
|
|
||||||
* [[unsignedSerialized]] is unaffected regardless.
|
|
||||||
*
|
|
||||||
* When setting ``blobs``, either fully valid [[Blob]] objects
|
|
||||||
* may be specified (i.e. correctly padded, with correct
|
|
||||||
* committments and proofs) or a raw [[BytesLike]] may
|
|
||||||
* be provided.
|
|
||||||
*
|
|
||||||
* If raw [[BytesLike]] are provided, the [[kzg]] property **must**
|
|
||||||
* be already set. The blob will be correctly padded and the
|
|
||||||
* [[KzgLibrary]] will be used to compute the committment and
|
|
||||||
* proof for the blob.
|
|
||||||
*
|
|
||||||
* A BLOb is a sequence of field elements, each of which must
|
|
||||||
* be within the BLS field modulo, so some additional processing
|
|
||||||
* may be required to encode arbitrary data to ensure each 32 byte
|
|
||||||
* field is within the valid range.
|
|
||||||
*
|
|
||||||
* Setting this automatically populates [[blobVersionedHashes]],
|
|
||||||
* overwriting any existing values. Setting this to ``null``
|
|
||||||
* does **not** remove the [[blobVersionedHashes]], leaving them
|
|
||||||
* present.
|
|
||||||
*/
|
|
||||||
get blobs() {
|
|
||||||
if (this.#blobs == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return this.#blobs.map((b) => Object.assign({}, b));
|
|
||||||
}
|
|
||||||
set blobs(_blobs) {
|
|
||||||
if (_blobs == null) {
|
|
||||||
this.#blobs = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const blobs = [];
|
|
||||||
const versionedHashes = [];
|
|
||||||
for (let i = 0; i < _blobs.length; i++) {
|
|
||||||
const blob = _blobs[i];
|
|
||||||
if ((0, index_js_3.isBytesLike)(blob)) {
|
|
||||||
(0, index_js_3.assert)(this.#kzg, "adding a raw blob requires a KZG library", "UNSUPPORTED_OPERATION", {
|
|
||||||
operation: "set blobs()"
|
|
||||||
});
|
|
||||||
let data = (0, index_js_3.getBytes)(blob);
|
|
||||||
(0, index_js_3.assertArgument)(data.length <= BLOB_SIZE, "blob is too large", `blobs[${i}]`, blob);
|
|
||||||
// Pad blob if necessary
|
|
||||||
if (data.length !== BLOB_SIZE) {
|
|
||||||
const padded = new Uint8Array(BLOB_SIZE);
|
|
||||||
padded.set(data);
|
|
||||||
data = padded;
|
|
||||||
}
|
|
||||||
const commit = this.#kzg.blobToKzgCommitment(data);
|
|
||||||
const proof = (0, index_js_3.hexlify)(this.#kzg.computeBlobKzgProof(data, commit));
|
|
||||||
blobs.push({
|
|
||||||
data: (0, index_js_3.hexlify)(data),
|
|
||||||
commitment: (0, index_js_3.hexlify)(commit),
|
|
||||||
proof
|
|
||||||
});
|
|
||||||
versionedHashes.push(getVersionedHash(1, commit));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
const commit = (0, index_js_3.hexlify)(blob.commitment);
|
|
||||||
blobs.push({
|
|
||||||
data: (0, index_js_3.hexlify)(blob.data),
|
|
||||||
commitment: commit,
|
|
||||||
proof: (0, index_js_3.hexlify)(blob.proof)
|
|
||||||
});
|
|
||||||
versionedHashes.push(getVersionedHash(1, commit));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.#blobs = blobs;
|
|
||||||
this.#blobVersionedHashes = versionedHashes;
|
|
||||||
}
|
|
||||||
get kzg() { return this.#kzg; }
|
|
||||||
set kzg(kzg) {
|
|
||||||
this.#kzg = kzg;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Creates a new Transaction with default values.
|
* Creates a new Transaction with default values.
|
||||||
*/
|
*/
|
||||||
@ -679,8 +549,6 @@ class Transaction {
|
|||||||
this.#accessList = null;
|
this.#accessList = null;
|
||||||
this.#maxFeePerBlobGas = null;
|
this.#maxFeePerBlobGas = null;
|
||||||
this.#blobVersionedHashes = null;
|
this.#blobVersionedHashes = null;
|
||||||
this.#blobs = null;
|
|
||||||
this.#kzg = null;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The transaction hash, if signed. Otherwise, ``null``.
|
* The transaction hash, if signed. Otherwise, ``null``.
|
||||||
@ -689,7 +557,7 @@ class Transaction {
|
|||||||
if (this.signature == null) {
|
if (this.signature == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (0, index_js_2.keccak256)(this.#getSerialized(true, false));
|
return (0, index_js_2.keccak256)(this.serialized);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The pre-image hash of this transaction.
|
* The pre-image hash of this transaction.
|
||||||
@ -727,21 +595,6 @@ class Transaction {
|
|||||||
isSigned() {
|
isSigned() {
|
||||||
return this.signature != null;
|
return this.signature != null;
|
||||||
}
|
}
|
||||||
#getSerialized(signed, sidecar) {
|
|
||||||
(0, index_js_3.assert)(!signed || this.signature != null, "cannot serialize unsigned transaction; maybe you meant .unsignedSerialized", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
|
|
||||||
const sig = signed ? this.signature : null;
|
|
||||||
switch (this.inferType()) {
|
|
||||||
case 0:
|
|
||||||
return _serializeLegacy(this, sig);
|
|
||||||
case 1:
|
|
||||||
return _serializeEip2930(this, sig);
|
|
||||||
case 2:
|
|
||||||
return _serializeEip1559(this, sig);
|
|
||||||
case 3:
|
|
||||||
return _serializeEip4844(this, sig, sidecar ? this.blobs : null);
|
|
||||||
}
|
|
||||||
(0, index_js_3.assert)(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* The serialized transaction.
|
* The serialized transaction.
|
||||||
*
|
*
|
||||||
@ -749,7 +602,18 @@ class Transaction {
|
|||||||
* use [[unsignedSerialized]].
|
* use [[unsignedSerialized]].
|
||||||
*/
|
*/
|
||||||
get serialized() {
|
get serialized() {
|
||||||
return this.#getSerialized(true, true);
|
(0, index_js_3.assert)(this.signature != null, "cannot serialize unsigned transaction; maybe you meant .unsignedSerialized", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
|
||||||
|
switch (this.inferType()) {
|
||||||
|
case 0:
|
||||||
|
return _serializeLegacy(this, this.signature);
|
||||||
|
case 1:
|
||||||
|
return _serializeEip2930(this, this.signature);
|
||||||
|
case 2:
|
||||||
|
return _serializeEip1559(this, this.signature);
|
||||||
|
case 3:
|
||||||
|
return _serializeEip4844(this, this.signature);
|
||||||
|
}
|
||||||
|
(0, index_js_3.assert)(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The transaction pre-image.
|
* The transaction pre-image.
|
||||||
@ -758,7 +622,17 @@ class Transaction {
|
|||||||
* authorize this transaction.
|
* authorize this transaction.
|
||||||
*/
|
*/
|
||||||
get unsignedSerialized() {
|
get unsignedSerialized() {
|
||||||
return this.#getSerialized(false, false);
|
switch (this.inferType()) {
|
||||||
|
case 0:
|
||||||
|
return _serializeLegacy(this);
|
||||||
|
case 1:
|
||||||
|
return _serializeEip2930(this);
|
||||||
|
case 2:
|
||||||
|
return _serializeEip1559(this);
|
||||||
|
case 3:
|
||||||
|
return _serializeEip4844(this);
|
||||||
|
}
|
||||||
|
(0, index_js_3.assert)(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".unsignedSerialized" });
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Return the most "likely" type; currently the highest
|
* Return the most "likely" type; currently the highest
|
||||||
@ -958,24 +832,15 @@ class Transaction {
|
|||||||
if (tx.accessList != null) {
|
if (tx.accessList != null) {
|
||||||
result.accessList = tx.accessList;
|
result.accessList = tx.accessList;
|
||||||
}
|
}
|
||||||
// This will get overwritten by blobs, if present
|
|
||||||
if (tx.blobVersionedHashes != null) {
|
if (tx.blobVersionedHashes != null) {
|
||||||
result.blobVersionedHashes = tx.blobVersionedHashes;
|
result.blobVersionedHashes = tx.blobVersionedHashes;
|
||||||
}
|
}
|
||||||
// Make sure we assign the kzg before assigning blobs, which
|
|
||||||
// require the library in the event raw blob data is provided.
|
|
||||||
if (tx.kzg != null) {
|
|
||||||
result.kzg = tx.kzg;
|
|
||||||
}
|
|
||||||
if (tx.blobs != null) {
|
|
||||||
result.blobs = tx.blobs;
|
|
||||||
}
|
|
||||||
if (tx.hash != null) {
|
if (tx.hash != null) {
|
||||||
(0, index_js_3.assertArgument)(result.isSigned(), "unsigned transaction cannot define '.hash'", "tx", tx);
|
(0, index_js_3.assertArgument)(result.isSigned(), "unsigned transaction cannot define hash", "tx", tx);
|
||||||
(0, index_js_3.assertArgument)(result.hash === tx.hash, "hash mismatch", "tx", tx);
|
(0, index_js_3.assertArgument)(result.hash === tx.hash, "hash mismatch", "tx", tx);
|
||||||
}
|
}
|
||||||
if (tx.from != null) {
|
if (tx.from != null) {
|
||||||
(0, index_js_3.assertArgument)(result.isSigned(), "unsigned transaction cannot define '.from'", "tx", tx);
|
(0, index_js_3.assertArgument)(result.isSigned(), "unsigned transaction cannot define from", "tx", tx);
|
||||||
(0, index_js_3.assertArgument)(result.from.toLowerCase() === (tx.from || "").toLowerCase(), "from mismatch", "tx", tx);
|
(0, index_js_3.assertArgument)(result.from.toLowerCase() === (tx.from || "").toLowerCase(), "from mismatch", "tx", tx);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src.ts/utils/fetch.ts"],"names":[],"mappings":"AA2BA;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,IAAI,GAAG,UAAU,CAAA;CAC1B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,GAAG,EAAE,YAAY,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;AAE9E;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;AAElG;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC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G,aAAa;IAc/D;;;;OAIG;IACH,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK;IAc3D;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAI9B;;OAEG;IACH,OAAO,IAAI,IAAI,IAAI,CAAC,aAAa,GAAG;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,CAAC;IAIzD;;OAEG;IACH,IAAI,OAAO,IAAI,IAAI,GAAG,YAAY,CAA0B;IAE5D;;OAEG;IACH,EAAE,IAAI,OAAO;IAIb;;OAEG;IACH,QAAQ,IAAI,IAAI;CAsBnB"}
|
@ -580,7 +580,6 @@ class FetchRequest {
|
|||||||
clone.#preflight = this.#preflight;
|
clone.#preflight = this.#preflight;
|
||||||
clone.#process = this.#process;
|
clone.#process = this.#process;
|
||||||
clone.#retry = this.#retry;
|
clone.#retry = this.#retry;
|
||||||
clone.#throttle = Object.assign({}, this.#throttle);
|
|
||||||
clone.#getUrlFunc = this.#getUrlFunc;
|
clone.#getUrlFunc = this.#getUrlFunc;
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
{"version":3,"file":"create-provider.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/create-provider.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAkGpD,wBAAgB,cAAc,IAAI,IAAI,CAKrC;AAED,eAAO,MAAM,aAAa,mBAAuD,CAAC;AAQlF,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAInE;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,gBAAgB,CAgBtF;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAGxE;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAIzD"}
|
{"version":3,"file":"create-provider.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/create-provider.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA2FpD,wBAAgB,cAAc,IAAI,IAAI,CAKrC;AAED,eAAO,MAAM,aAAa,mBAAuD,CAAC;AAQlF,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAInE;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,gBAAgB,CAgBtF;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAGxE;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAIzD"}
|
@ -1,11 +1,11 @@
|
|||||||
import { AlchemyProvider,
|
import { AlchemyProvider,
|
||||||
// AnkrProvider,
|
// AnkrProvider,
|
||||||
// CloudflareProvider,
|
// CloudflareProvider,
|
||||||
ChainstackProvider, EtherscanProvider, InfuraProvider,
|
EtherscanProvider, InfuraProvider,
|
||||||
// PocketProvider,
|
// PocketProvider,
|
||||||
QuickNodeProvider, FallbackProvider, isError, } from "../index.js";
|
QuickNodeProvider, FallbackProvider, isError, } from "../index.js";
|
||||||
;
|
;
|
||||||
const ethNetworks = ["default", "mainnet", "sepolia"];
|
const ethNetworks = ["default", "mainnet", "goerli"];
|
||||||
//const maticNetworks = [ "matic", "maticmum" ];
|
//const maticNetworks = [ "matic", "maticmum" ];
|
||||||
const ProviderCreators = [
|
const ProviderCreators = [
|
||||||
{
|
{
|
||||||
@ -33,13 +33,6 @@ const ProviderCreators = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
*/
|
*/
|
||||||
{
|
|
||||||
name: "ChainstackProvider",
|
|
||||||
networks: ["default", "mainnet", "arbitrum", "bnb", "matic"],
|
|
||||||
create: function (network) {
|
|
||||||
return new ChainstackProvider(network);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "EtherscanProvider",
|
name: "EtherscanProvider",
|
||||||
networks: ethNetworks,
|
networks: ethNetworks,
|
||||||
@ -143,7 +136,7 @@ export function getProvider(provider, network) {
|
|||||||
}
|
}
|
||||||
export function checkProvider(provider, network) {
|
export function checkProvider(provider, network) {
|
||||||
const creator = getCreator(provider);
|
const creator = getCreator(provider);
|
||||||
return (creator != null && creator.networks.indexOf(network) >= 0);
|
return (creator != null);
|
||||||
}
|
}
|
||||||
export function connect(network) {
|
export function connect(network) {
|
||||||
const provider = getProvider("InfuraProvider", network);
|
const provider = getProvider("InfuraProvider", network);
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"create-provider.js","sourceRoot":"","sources":["../../src.ts/_tests/create-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe;AACnB,mBAAmB;AACnB,yBAAyB;AACrB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc;AAClB,qBAAqB;AACjB,iBAAiB,EAEjB,gBAAgB,EAChB,OAAO,GACV,MAAM,aAAa,CAAC;AAQpB,CAAC;AAEF,MAAM,WAAW,GAAG,CAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAE,CAAC;AACxD,gDAAgD;AAEhD,MAAM,gBAAgB,GAA2B;IAC7C;QACI,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,UAAS,OAAe;YAC5B,OAAO,IAAI,eAAe,CAAC,OAAO,EAAE,kCAAkC,CAAC,CAAC;QAC5E,CAAC;KACJ;IACD;;;;;;;;MAQE;IACF;;;;;;;;MAQE;IACF;QACI,IAAI,EAAE,oBAAoB;QAC1B,QAAQ,E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,QAAQ,CAAC;KAAE;IACzC,OAAO,EAAG,CAAC;AACf,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAAgB,EAAE,OAAe;IACzD,IAAI,KAAK,IAAI,KAAK,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;KAAE;IAEpF,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IACrC,IAAI;QACA,IAAI,OAAO,EAAE;YACT,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACzC,IAAI,QAAQ,EAAE;gBACV,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;aAC/C;YACD,OAAO,QAAQ,CAAC;SACnB;KACJ;IAAC,OAAO,KAAK,EAAE;QACZ,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,kBAAkB,CAAC,EAAE;YAAE,MAAM,KAAK,CAAC;SAAE;KAC5D;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,QAAgB,EAAE,OAAe;IAC3D,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IACrC,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,OAAe;IACnC,MAAM,QAAQ,GAAG,WAAW,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACxD,IAAI,QAAQ,IAAI,IAAI,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAyB,OAAQ,EAAE,CAAC,CAAC;KAAE;IAC/E,OAAO,QAAQ,CAAC;AACpB,CAAC"}
|
@ -3,8 +3,7 @@ import { getProvider, setupProviders } from "./create-provider.js";
|
|||||||
import { Contract, EventLog, isError, Typed, Wallet } from "../index.js";
|
import { Contract, EventLog, isError, Typed, Wallet } from "../index.js";
|
||||||
setupProviders();
|
setupProviders();
|
||||||
describe("Test Contract", function () {
|
describe("Test Contract", function () {
|
||||||
const addr = "0x24264C81146c23bbF83Db1d3F87d2111C2935Ffa";
|
const addr = "0x99417252Aad7B065940eBdF50d665Fb8879c5958";
|
||||||
const networkName = "sepolia";
|
|
||||||
const abi = [
|
const abi = [
|
||||||
"error CustomError1(uint256 code, string message)",
|
"error CustomError1(uint256 code, string message)",
|
||||||
"event EventUint256(uint256 indexed value)",
|
"event EventUint256(uint256 indexed value)",
|
||||||
@ -19,20 +18,20 @@ describe("Test Contract", function () {
|
|||||||
];
|
];
|
||||||
it("tests contract calls", async function () {
|
it("tests contract calls", async function () {
|
||||||
this.timeout(10000);
|
this.timeout(10000);
|
||||||
const provider = getProvider("InfuraProvider", networkName);
|
const provider = getProvider("InfuraProvider", "goerli");
|
||||||
const contract = new Contract(addr, abi, provider);
|
const contract = new Contract(addr, abi, provider);
|
||||||
assert.equal(await contract.testCallAdd(4, 5), BigInt(9), "testCallAdd(4, 5)");
|
assert.equal(await contract.testCallAdd(4, 5), BigInt(9), "testCallAdd(4, 5)");
|
||||||
assert.equal(await contract.testCallAdd(6, 0), BigInt(6), "testCallAdd(6, 0)");
|
assert.equal(await contract.testCallAdd(6, 0), BigInt(6), "testCallAdd(6, 0)");
|
||||||
});
|
});
|
||||||
it("tests events", async function () {
|
it("tests events", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = getProvider("InfuraProvider", networkName);
|
const provider = getProvider("InfuraProvider", "goerli");
|
||||||
assert.ok(provider);
|
assert.ok(provider);
|
||||||
const contract = new Contract(addr, abi, provider);
|
const contract = new Contract(addr, abi, provider);
|
||||||
const signer = new Wallet((process.env.FAUCET_PRIVATEKEY), provider);
|
const signer = new Wallet((process.env.FAUCET_PRIVATEKEY), provider);
|
||||||
const contractSigner = contract.connect(signer);
|
const contractSigner = contract.connect(signer);
|
||||||
const vUint256 = 42;
|
const vUint256 = 42;
|
||||||
const vAddrName = "tests.eth";
|
const vAddrName = "ethers.eth";
|
||||||
const vAddr = "0x228568EA92aC5Bc281c1E30b1893735c60a139F1";
|
const vAddr = "0x228568EA92aC5Bc281c1E30b1893735c60a139F1";
|
||||||
const vString = "Hello";
|
const vString = "Hello";
|
||||||
const vBytes = "0x12345678";
|
const vBytes = "0x12345678";
|
||||||
@ -213,9 +212,8 @@ describe("Test Typed Contract Interaction", function () {
|
|||||||
abi.push(`function testTyped(bool) public pure returns (string memory)`);
|
abi.push(`function testTyped(bool) public pure returns (string memory)`);
|
||||||
abi.push(`function testTyped(bytes memory) public pure returns (string memory)`);
|
abi.push(`function testTyped(bytes memory) public pure returns (string memory)`);
|
||||||
abi.push(`function testTyped(string memory) public pure returns (string memory)`);
|
abi.push(`function testTyped(string memory) public pure returns (string memory)`);
|
||||||
const addr = "0xf20ba47c47a32fc2d9ad846ff06f2fa6e89eec74";
|
const addr = "0x838f41545DA5e18AA0e1ab391085d22E172B7B02";
|
||||||
const networkName = "sepolia";
|
const provider = getProvider("InfuraProvider", "goerli");
|
||||||
const provider = getProvider("InfuraProvider", networkName);
|
|
||||||
const contract = new Contract(addr, abi, provider);
|
const contract = new Contract(addr, abi, provider);
|
||||||
for (const { types, valueFunc } of tests) {
|
for (const { types, valueFunc } of tests) {
|
||||||
for (const type of types) {
|
for (const type of types) {
|
||||||
@ -304,8 +302,7 @@ describe("Test Contract Fallback", function () {
|
|||||||
sendDataAndValue: { error: "overrides" },
|
sendDataAndValue: { error: "overrides" },
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const networkName = "sepolia";
|
const provider = getProvider("InfuraProvider", "goerli");
|
||||||
const provider = getProvider("InfuraProvider", networkName);
|
|
||||||
const testGroups = [
|
const testGroups = [
|
||||||
{
|
{
|
||||||
group: "sendNone",
|
group: "sendNone",
|
||||||
|
File diff suppressed because one or more lines are too long
@ -3,13 +3,13 @@ import { connect, setupProviders } from "./create-provider.js";
|
|||||||
setupProviders();
|
setupProviders();
|
||||||
describe("Resolve ENS avatar", function () {
|
describe("Resolve ENS avatar", function () {
|
||||||
[
|
[
|
||||||
{ title: "data", name: "data-avatar.tests.eth", value: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAMAAACeL25MAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyVpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDYuMC1jMDAyIDc5LjE2NDQ4OCwgMjAyMC8wNy8xMC0yMjowNjo1MyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIyLjAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NUQ4NTEyNUIyOEIwMTFFQzg0NTBDNTU2RDk1NTA5NzgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NUQ4NTEyNUMyOEIwMTFFQzg0NTBDNTU2RDk1NTA5NzgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ie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zaG9wIDIyLjAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NUQ4NTEyNUIyOEIwMTFFQzg0NTBDNTU2RDk1NTA5NzgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NUQ4NTEyNUMyOEIwMTFFQzg0NTBDNTU2RDk1NTA5NzgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo1RDg1MTI1OTI4QjAxMUVDODQ1MEM1NTZEOTU1MDk3OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo1RDg1MTI1QTI4QjAxMUVDODQ1MEM1NTZEOTU1MDk3OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkbM0uMAAAAGUExURQAA/wAAAHtivz4AAAAOSURBVHjaYmDABAABBgAAFAABaEkyYwAAAABJRU5ErkJggg==" },
|
||||||
{ title: "ipfs", name: "ipfs-avatar.tests.eth", value: "https:/\/gateway.ipfs.io/ipfs/QmQsQgpda6JAYkFoeVcj5iPbwV3xRcvaiXv3bhp1VuYUqw" },
|
{ title: "ipfs", name: "ipfs-avatar.tests.ethers.eth", value: "https:/\/gateway.ipfs.io/ipfs/QmQsQgpda6JAYkFoeVcj5iPbwV3xRcvaiXv3bhp1VuYUqw" },
|
||||||
{ title: "url", name: "url-avatar.tests.eth", value: "https:/\/ethers.org/static/logo.png" },
|
{ title: "url", name: "url-avatar.tests.ethers.eth", value: "https:/\/ethers.org/static/logo.png" },
|
||||||
].forEach((test) => {
|
].forEach((test) => {
|
||||||
it(`Resolves avatar for ${test.title}`, async function () {
|
it(`Resolves avatar for ${test.title}`, async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = connect("sepolia");
|
const provider = connect("goerli");
|
||||||
const avatar = await provider.getAvatar(test.name);
|
const avatar = await provider.getAvatar(test.name);
|
||||||
assert.equal(test.value, avatar, "avatar url");
|
assert.equal(test.value, avatar, "avatar url");
|
||||||
});
|
});
|
||||||
|
@ -1 +1 @@
|
|||||||
{"version":3,"file":"test-providers-avatar.js","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-avatar.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE/D,cAAc,EAAE,CAAC;AAEjB,QAAQ,CAAC,oBAAoB,EAAE;IAC3B;QACI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,owCAAowC,EAAE;QAC7zC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,8EAA8E,EAAE;QACvI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,qCAAqC,EAAE;KAC/F,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACf,EAAE,CAAC,uBAAwB,IAAI,CAAC,KAAM,EAAE,EAAE,KAAK;YAC3C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;YACpC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACP;;;;;;;;;;;;;MAaE;AACF,CAAC,CAAC,CAAC"}
|
{"version":3,"file":"test-providers-avatar.js","sourceRoot":"","sources":["../../src.ts/_tests/test-providers-avatar.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE/D,cAAc,EAAE,CAAC;AAEjB,QAAQ,CAAC,oBAAoB,EAAE;IAC3B;QACI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,8BAA8B,EAAE,KAAK,EAAE,owCAAowC,EAAE;QACp0C,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,8BAA8B,EAAE,KAAK,EAAE,8EAA8E,EAAE;QAC9I,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,6BAA6B,EAAE,KAAK,EAAE,qCAAqC,EAAE;KACtG,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACf,EAAE,CAAC,uBAAwB,IAAI,CAAC,KAAM,EAAE,EAAE,KAAK;YAC3C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;YACnC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACP;;;;;;;;;;;;;MAaE;AACF,CAAC,CAAC,CAAC"}
|
@ -12,12 +12,11 @@ describe("Test CCIP execution", function () {
|
|||||||
]);
|
]);
|
||||||
assert.equal(result, keccak256(check), "response is equal");
|
assert.equal(result, keccak256(check), "response is equal");
|
||||||
};
|
};
|
||||||
const address = "0xaeaa06a37e6421ac63120d6daddee0ffa04b43e8";
|
const address = "0x6C5ed35574a9b4d163f75bBf0595F7540D8FCc2d";
|
||||||
const networkName = "sepolia";
|
|
||||||
const calldata = "0x1234";
|
const calldata = "0x1234";
|
||||||
it("testGet passes under normal operation", async function () {
|
it("testGet passes under normal operation", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = connect(networkName);
|
const provider = connect("goerli");
|
||||||
// testGet(bytes callData = "0x1234")
|
// testGet(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
to: address, enableCcipRead: true,
|
to: address, enableCcipRead: true,
|
||||||
@ -28,7 +27,7 @@ describe("Test CCIP execution", function () {
|
|||||||
});
|
});
|
||||||
it("testGet should fail with CCIP not explicitly enabled by overrides", async function () {
|
it("testGet should fail with CCIP not explicitly enabled by overrides", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = connect(networkName);
|
const provider = connect("goerli");
|
||||||
// testGet(bytes callData = "0x1234")
|
// testGet(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
to: address,
|
to: address,
|
||||||
@ -38,17 +37,13 @@ describe("Test CCIP execution", function () {
|
|||||||
const result = await provider.call(tx);
|
const result = await provider.call(tx);
|
||||||
console.log(result);
|
console.log(result);
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
const offchainErrorData = concat([
|
const offchainErrorData = "0x556f18300000000000000000000000006c5ed35574a9b4d163f75bbf0595f7540d8fcc2d00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000";
|
||||||
"0x556f1830000000000000000000000000",
|
|
||||||
address,
|
|
||||||
"0x00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000"
|
|
||||||
]);
|
|
||||||
return (isCallException(error) && error.data === offchainErrorData);
|
return (isCallException(error) && error.data === offchainErrorData);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it("testGet should fail with CCIP explicitly disabled on provider", async function () {
|
it("testGet should fail with CCIP explicitly disabled on provider", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = connect(networkName);
|
const provider = connect("goerli");
|
||||||
provider.disableCcipRead = true;
|
provider.disableCcipRead = true;
|
||||||
// testGetFail(bytes callData = "0x1234")
|
// testGetFail(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
@ -59,17 +54,13 @@ describe("Test CCIP execution", function () {
|
|||||||
const result = await provider.call(tx);
|
const result = await provider.call(tx);
|
||||||
console.log(result);
|
console.log(result);
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
const offchainErrorData = concat([
|
const offchainErrorData = "0x556f18300000000000000000000000006c5ed35574a9b4d163f75bbf0595f7540d8fcc2d00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000";
|
||||||
"0x556f1830000000000000000000000000",
|
|
||||||
address,
|
|
||||||
"0x00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000140b1494be100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f6574686572732e7269636d6f6f2e776f726b6572732e6465762f746573742d636369702d726561642f7b73656e6465727d2f7b646174617d00000000000000000000000000000000000000000000000000000000000000021234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d4d79206578747261206461746100000000000000000000000000000000000000"
|
|
||||||
]);
|
|
||||||
return (isCallException(error) && error.data === offchainErrorData);
|
return (isCallException(error) && error.data === offchainErrorData);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it("testGetFail should fail if all URLs 5xx", async function () {
|
it("testGetFail should fail if all URLs 5xx", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = connect(networkName);
|
const provider = connect("goerli");
|
||||||
// testGetFail(bytes callData = "0x1234")
|
// testGetFail(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
to: address, enableCcipRead: true,
|
to: address, enableCcipRead: true,
|
||||||
@ -86,7 +77,7 @@ describe("Test CCIP execution", function () {
|
|||||||
});
|
});
|
||||||
it("testGetSenderFail should fail if sender does not match", async function () {
|
it("testGetSenderFail should fail if sender does not match", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = connect(networkName);
|
const provider = connect("goerli");
|
||||||
// testGetSenderFail(bytes callData = "0x1234")
|
// testGetSenderFail(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
to: address, enableCcipRead: true,
|
to: address, enableCcipRead: true,
|
||||||
@ -106,7 +97,7 @@ describe("Test CCIP execution", function () {
|
|||||||
});
|
});
|
||||||
it("testGetMissing should fail if early URL 4xx", async function () {
|
it("testGetMissing should fail if early URL 4xx", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = connect(networkName);
|
const provider = connect("goerli");
|
||||||
// testGetMissing(bytes callData = "0x1234")
|
// testGetMissing(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
to: address, enableCcipRead: true,
|
to: address, enableCcipRead: true,
|
||||||
@ -123,7 +114,7 @@ describe("Test CCIP execution", function () {
|
|||||||
});
|
});
|
||||||
it("testGetFallback passes if any URL returns correctly", async function () {
|
it("testGetFallback passes if any URL returns correctly", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = connect(networkName);
|
const provider = connect("goerli");
|
||||||
// testGetFallback(bytes callData = "0x1234")
|
// testGetFallback(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
to: address, enableCcipRead: true,
|
to: address, enableCcipRead: true,
|
||||||
@ -134,7 +125,7 @@ describe("Test CCIP execution", function () {
|
|||||||
});
|
});
|
||||||
it("testPost passes under normal operation", async function () {
|
it("testPost passes under normal operation", async function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
const provider = connect(networkName);
|
const provider = connect("goerli");
|
||||||
// testPost(bytes callData = "0x1234")
|
// testPost(bytes callData = "0x1234")
|
||||||
const tx = {
|
const tx = {
|
||||||
to: address, enableCcipRead: true,
|
to: address, enableCcipRead: true,
|
||||||
|
File diff suppressed because one or more lines are too long
@ -215,13 +215,13 @@ describe("Test Provider Transaction operations", function () {
|
|||||||
});
|
});
|
||||||
describe("Test Networks", function () {
|
describe("Test Networks", function () {
|
||||||
const networks = [
|
const networks = [
|
||||||
"mainnet", "sepolia", "holesky",
|
"mainnet", "goerli", "sepolia", "holesky",
|
||||||
"arbitrum", "arbitrum-sepolia",
|
"arbitrum", "arbitrum-goerli", "arbitrum-sepolia",
|
||||||
"base", "base-sepolia",
|
"base", "base-goerli", "base-sepolia",
|
||||||
"bnb", "bnbt",
|
"bnb", "bnbt",
|
||||||
"linea", "linea-sepolia",
|
"linea", "linea-goerli",
|
||||||
"matic", "matic-mumbai", "matic-amoy",
|
"matic", "matic-mumbai",
|
||||||
"optimism", "optimism-sepolia",
|
"optimism", "optimism-goerli", "optimism-sepolia",
|
||||||
"xdai",
|
"xdai",
|
||||||
];
|
];
|
||||||
const providerNames = [
|
const providerNames = [
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user