Skip to content

Commit bcc4d8c

Browse files
committed
admin: updated dist files
1 parent ac2f5e5 commit bcc4d8c

34 files changed

+348
-121
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@ Change Log
33

44
This change log is maintained by `src.ts/_admin/update-changelog.ts` but may also be manually updated.
55

6+
ethers/v6.6.5 (2023-07-24 00:04)
7+
--------------------------------
8+
9+
- Reflect symbols in the Contract Proxy to target ([#4048](https://github.com/ethers-io/ethers.js/issues/4048); [ac2f5e5](https://github.com/ethers-io/ethers.js/commit/ac2f5e563b8ec0e91a931470eb6ea58b0c01fb3d)).
10+
- Allow arrays of address for indexed filter topics ([#4259](https://github.com/ethers-io/ethers.js/issues/4259); [93af87c](https://github.com/ethers-io/ethers.js/commit/93af87c447eeb77090e29bd940612603b3f74026)).
11+
- Fixed filter encoding for bytesX ([#4244](https://github.com/ethers-io/ethers.js/issues/4244); [fa3a883](https://github.com/ethers-io/ethers.js/commit/fa3a883ff7c88611ce766f58bdd4b8ac90814470)).
12+
- Fix JSON formatting for tuple arrays ([#4237](https://github.com/ethers-io/ethers.js/issues/4237); [a8bc49b](https://github.com/ethers-io/ethers.js/commit/a8bc49bdcf07a51b35f38cf209db27e116cc1a59)).
13+
- Better error messages when parsing fragment strings ([#4246](https://github.com/ethers-io/ethers.js/issues/4246); [e36b6c3](https://github.com/ethers-io/ethers.js/commit/e36b6c35b7bc777c9adbe0055b32b31a13185240)).
14+
- Include the missing fragment key and args when no matching Contract method or event is present ([#3809](https://github.com/ethers-io/ethers.js/issues/3809); [450a176](https://github.com/ethers-io/ethers.js/commit/450a176ee25f88a2ddb9ff23b153ef70bf1dc546)).
15+
- Prevent a single malformed event from preventing other Contract logs; reported on Discord ([b1375f4](https://github.com/ethers-io/ethers.js/commit/b1375f4e4463b856855ebc684b45945455ac082e)).
16+
617
ethers/v6.6.4 (2023-07-16 00:35)
718
--------------------------------
819

dist/ethers.js

Lines changed: 71 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
33
/**
44
* The current version of Ethers.
55
*/
6-
const version = "6.6.4";
6+
const version = "6.6.5";
77

88
/**
99
* Property helper functions.
@@ -10446,9 +10446,16 @@ class ParamType {
1044610446
format = "sighash";
1044710447
}
1044810448
if (format === "json") {
10449-
let result = {
10449+
const name = this.name || undefined; // @TODO: Make this "" (minor bump)
10450+
if (this.isArray()) {
10451+
const result = JSON.parse(this.arrayChildren.format("json"));
10452+
result.name = name;
10453+
result.type += `[${(this.arrayLength < 0 ? "" : String(this.arrayLength))}]`;
10454+
return JSON.stringify(result);
10455+
}
10456+
const result = {
1045010457
type: ((this.baseType === "tuple") ? "tuple" : this.type),
10451-
name: (this.name || undefined)
10458+
name
1045210459
};
1045310460
if (typeof (this.indexed) === "boolean") {
1045410461
result.indexed = this.indexed;
@@ -10626,7 +10633,12 @@ class ParamType {
1062610633
return obj;
1062710634
}
1062810635
if (typeof (obj) === "string") {
10629-
return ParamType.from(lex(obj), allowIndexed);
10636+
try {
10637+
return ParamType.from(lex(obj), allowIndexed);
10638+
}
10639+
catch (error) {
10640+
assertArgument(false, "invalid param type", "obj", obj);
10641+
}
1063010642
}
1063110643
else if (obj instanceof TokenString) {
1063210644
let type = "", baseType = "";
@@ -10946,7 +10958,12 @@ class EventFragment extends NamedFragment {
1094610958
return obj;
1094710959
}
1094810960
if (typeof (obj) === "string") {
10949-
return EventFragment.from(lex(obj));
10961+
try {
10962+
return EventFragment.from(lex(obj));
10963+
}
10964+
catch (error) {
10965+
assertArgument(false, "invalid event fragment", "obj", obj);
10966+
}
1095010967
}
1095110968
else if (obj instanceof TokenString) {
1095210969
const name = consumeName("event", obj);
@@ -11014,7 +11031,12 @@ class ConstructorFragment extends Fragment {
1101411031
return obj;
1101511032
}
1101611033
if (typeof (obj) === "string") {
11017-
return ConstructorFragment.from(lex(obj));
11034+
try {
11035+
return ConstructorFragment.from(lex(obj));
11036+
}
11037+
catch (error) {
11038+
assertArgument(false, "invalid constuctor fragment", "obj", obj);
11039+
}
1101811040
}
1101911041
else if (obj instanceof TokenString) {
1102011042
consumeKeywords(obj, setify(["constructor"]));
@@ -11066,7 +11088,12 @@ class FallbackFragment extends Fragment {
1106611088
return obj;
1106711089
}
1106811090
if (typeof (obj) === "string") {
11069-
return FallbackFragment.from(lex(obj));
11091+
try {
11092+
return FallbackFragment.from(lex(obj));
11093+
}
11094+
catch (error) {
11095+
assertArgument(false, "invalid fallback fragment", "obj", obj);
11096+
}
1107011097
}
1107111098
else if (obj instanceof TokenString) {
1107211099
const errorObj = obj.toString();
@@ -11213,7 +11240,12 @@ class FunctionFragment extends NamedFragment {
1121311240
return obj;
1121411241
}
1121511242
if (typeof (obj) === "string") {
11216-
return FunctionFragment.from(lex(obj));
11243+
try {
11244+
return FunctionFragment.from(lex(obj));
11245+
}
11246+
catch (error) {
11247+
assertArgument(false, "invalid function fragment", "obj", obj);
11248+
}
1121711249
}
1121811250
else if (obj instanceof TokenString) {
1121911251
const name = consumeName("function", obj);
@@ -11278,7 +11310,12 @@ class StructFragment extends NamedFragment {
1127811310
*/
1127911311
static from(obj) {
1128011312
if (typeof (obj) === "string") {
11281-
return StructFragment.from(lex(obj));
11313+
try {
11314+
return StructFragment.from(lex(obj));
11315+
}
11316+
catch (error) {
11317+
assertArgument(false, "invalid struct fragment", "obj", obj);
11318+
}
1128211319
}
1128311320
else if (obj instanceof TokenString) {
1128411321
const name = consumeName("struct", obj);
@@ -12394,15 +12431,17 @@ getSelector(fragment: ErrorFragment | FunctionFragment): string {
1239412431
if (param.type === "bool" && typeof (value) === "boolean") {
1239512432
value = (value ? "0x01" : "0x00");
1239612433
}
12397-
if (param.type.match(/^u?int/)) {
12398-
value = toBeHex(value);
12434+
else if (param.type.match(/^u?int/)) {
12435+
value = toBeHex(value); // @TODO: Should this toTwos??
1239912436
}
12400-
// Check addresses are valid
12401-
if (param.type === "address") {
12437+
else if (param.type.match(/^bytes/)) {
12438+
value = zeroPadBytes(value, 32);
12439+
}
12440+
else if (param.type === "address") {
12441+
// Check addresses are valid
1240212442
this.#abiCoder.encode(["address"], [value]);
1240312443
}
1240412444
return zeroPadValue(hexlify(value), 32);
12405-
//@TOOD should probably be return toHex(value, 32)
1240612445
};
1240712446
values.forEach((value, index) => {
1240812447
const param = fragment.inputs[index];
@@ -13994,6 +14033,9 @@ class PreparedTopicFilter {
1399414033
}
1399514034
return param.walkAsync(args[index], (type, value) => {
1399614035
if (type === "address") {
14036+
if (Array.isArray(value)) {
14037+
return Promise.all(value.map((v) => resolveAddress(v, resolver)));
14038+
}
1399714039
return resolveAddress(value, resolver);
1399814040
}
1399914041
return value;
@@ -14123,7 +14165,8 @@ function buildWrappedMethod(contract, key) {
1412314165
const getFragment = function (...args) {
1412414166
const fragment = contract.interface.getFunction(key, args);
1412514167
assert$1(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
14126-
operation: "fragment"
14168+
operation: "fragment",
14169+
info: { key, args }
1412714170
});
1412814171
return fragment;
1412914172
};
@@ -14203,7 +14246,8 @@ function buildWrappedMethod(contract, key) {
1420314246
get: () => {
1420414247
const fragment = contract.interface.getFunction(key);
1420514248
assert$1(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
14206-
operation: "fragment"
14249+
operation: "fragment",
14250+
info: { key }
1420714251
});
1420814252
return fragment;
1420914253
}
@@ -14214,7 +14258,8 @@ function buildWrappedEvent(contract, key) {
1421414258
const getFragment = function (...args) {
1421514259
const fragment = contract.interface.getEvent(key, args);
1421614260
assert$1(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
14217-
operation: "fragment"
14261+
operation: "fragment",
14262+
info: { key, args }
1421814263
});
1421914264
return fragment;
1422014265
};
@@ -14233,7 +14278,8 @@ function buildWrappedEvent(contract, key) {
1423314278
get: () => {
1423414279
const fragment = contract.interface.getEvent(key);
1423514280
assert$1(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
14236-
operation: "fragment"
14281+
operation: "fragment",
14282+
info: { key }
1423714283
});
1423814284
return fragment;
1423914285
}
@@ -14549,7 +14595,7 @@ class BaseContract {
1454914595
// Return a Proxy that will respond to functions
1455014596
return new Proxy(this, {
1455114597
get: (target, _prop, receiver) => {
14552-
if (_prop in target || passProperties.indexOf(_prop) >= 0) {
14598+
if (_prop in target || passProperties.indexOf(_prop) >= 0 || typeof (_prop) === "symbol") {
1455314599
return Reflect.get(target, _prop, receiver);
1455414600
}
1455514601
const prop = String(_prop);
@@ -14560,7 +14606,7 @@ class BaseContract {
1456014606
throw new Error(`unknown contract method: ${prop}`);
1456114607
},
1456214608
has: (target, prop) => {
14563-
if (prop in target || passProperties.indexOf(prop) >= 0) {
14609+
if (prop in target || passProperties.indexOf(prop) >= 0 || typeof (prop) === "symbol") {
1456414610
return Reflect.has(target, prop);
1456514611
}
1456614612
return target.interface.hasFunction(String(prop));
@@ -14698,11 +14744,12 @@ class BaseContract {
1469814744
catch (error) { }
1469914745
}
1470014746
if (foundFragment) {
14701-
return new EventLog(log, this.interface, foundFragment);
14702-
}
14703-
else {
14704-
return new Log(log, provider);
14747+
try {
14748+
return new EventLog(log, this.interface, foundFragment);
14749+
}
14750+
catch (error) { }
1470514751
}
14752+
return new Log(log, provider);
1470614753
});
1470714754
}
1470814755
/**

dist/ethers.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ethers.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)