Skip to content

Commit

Permalink
admin: updated dist files
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jul 24, 2023
1 parent ac2f5e5 commit bcc4d8c
Show file tree
Hide file tree
Showing 34 changed files with 348 additions and 121 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ Change Log

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

ethers/v6.6.5 (2023-07-24 00:04)
--------------------------------

- 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)).
- 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)).
- 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)).
- 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)).
- 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)).
- 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)).
- Prevent a single malformed event from preventing other Contract logs; reported on Discord ([b1375f4](https://github.com/ethers-io/ethers.js/commit/b1375f4e4463b856855ebc684b45945455ac082e)).

ethers/v6.6.4 (2023-07-16 00:35)
--------------------------------

Expand Down
95 changes: 71 additions & 24 deletions dist/ethers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
/**
* The current version of Ethers.
*/
const version = "6.6.4";
const version = "6.6.5";

/**
* Property helper functions.
Expand Down Expand Up @@ -10446,9 +10446,16 @@ class ParamType {
format = "sighash";
}
if (format === "json") {
let result = {
const name = this.name || undefined; // @TODO: Make this "" (minor bump)
if (this.isArray()) {
const result = JSON.parse(this.arrayChildren.format("json"));
result.name = name;
result.type += `[${(this.arrayLength < 0 ? "" : String(this.arrayLength))}]`;
return JSON.stringify(result);
}
const result = {
type: ((this.baseType === "tuple") ? "tuple" : this.type),
name: (this.name || undefined)
name
};
if (typeof (this.indexed) === "boolean") {
result.indexed = this.indexed;
Expand Down Expand Up @@ -10626,7 +10633,12 @@ class ParamType {
return obj;
}
if (typeof (obj) === "string") {
return ParamType.from(lex(obj), allowIndexed);
try {
return ParamType.from(lex(obj), allowIndexed);
}
catch (error) {
assertArgument(false, "invalid param type", "obj", obj);
}
}
else if (obj instanceof TokenString) {
let type = "", baseType = "";
Expand Down Expand Up @@ -10946,7 +10958,12 @@ class EventFragment extends NamedFragment {
return obj;
}
if (typeof (obj) === "string") {
return EventFragment.from(lex(obj));
try {
return EventFragment.from(lex(obj));
}
catch (error) {
assertArgument(false, "invalid event fragment", "obj", obj);
}
}
else if (obj instanceof TokenString) {
const name = consumeName("event", obj);
Expand Down Expand Up @@ -11014,7 +11031,12 @@ class ConstructorFragment extends Fragment {
return obj;
}
if (typeof (obj) === "string") {
return ConstructorFragment.from(lex(obj));
try {
return ConstructorFragment.from(lex(obj));
}
catch (error) {
assertArgument(false, "invalid constuctor fragment", "obj", obj);
}
}
else if (obj instanceof TokenString) {
consumeKeywords(obj, setify(["constructor"]));
Expand Down Expand Up @@ -11066,7 +11088,12 @@ class FallbackFragment extends Fragment {
return obj;
}
if (typeof (obj) === "string") {
return FallbackFragment.from(lex(obj));
try {
return FallbackFragment.from(lex(obj));
}
catch (error) {
assertArgument(false, "invalid fallback fragment", "obj", obj);
}
}
else if (obj instanceof TokenString) {
const errorObj = obj.toString();
Expand Down Expand Up @@ -11213,7 +11240,12 @@ class FunctionFragment extends NamedFragment {
return obj;
}
if (typeof (obj) === "string") {
return FunctionFragment.from(lex(obj));
try {
return FunctionFragment.from(lex(obj));
}
catch (error) {
assertArgument(false, "invalid function fragment", "obj", obj);
}
}
else if (obj instanceof TokenString) {
const name = consumeName("function", obj);
Expand Down Expand Up @@ -11278,7 +11310,12 @@ class StructFragment extends NamedFragment {
*/
static from(obj) {
if (typeof (obj) === "string") {
return StructFragment.from(lex(obj));
try {
return StructFragment.from(lex(obj));
}
catch (error) {
assertArgument(false, "invalid struct fragment", "obj", obj);
}
}
else if (obj instanceof TokenString) {
const name = consumeName("struct", obj);
Expand Down Expand Up @@ -12394,15 +12431,17 @@ getSelector(fragment: ErrorFragment | FunctionFragment): string {
if (param.type === "bool" && typeof (value) === "boolean") {
value = (value ? "0x01" : "0x00");
}
if (param.type.match(/^u?int/)) {
value = toBeHex(value);
else if (param.type.match(/^u?int/)) {
value = toBeHex(value); // @TODO: Should this toTwos??
}
// Check addresses are valid
if (param.type === "address") {
else if (param.type.match(/^bytes/)) {
value = zeroPadBytes(value, 32);
}
else if (param.type === "address") {
// Check addresses are valid
this.#abiCoder.encode(["address"], [value]);
}
return zeroPadValue(hexlify(value), 32);
//@TOOD should probably be return toHex(value, 32)
};
values.forEach((value, index) => {
const param = fragment.inputs[index];
Expand Down Expand Up @@ -13994,6 +14033,9 @@ class PreparedTopicFilter {
}
return param.walkAsync(args[index], (type, value) => {
if (type === "address") {
if (Array.isArray(value)) {
return Promise.all(value.map((v) => resolveAddress(v, resolver)));
}
return resolveAddress(value, resolver);
}
return value;
Expand Down Expand Up @@ -14123,7 +14165,8 @@ function buildWrappedMethod(contract, key) {
const getFragment = function (...args) {
const fragment = contract.interface.getFunction(key, args);
assert$1(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
operation: "fragment"
operation: "fragment",
info: { key, args }
});
return fragment;
};
Expand Down Expand Up @@ -14203,7 +14246,8 @@ function buildWrappedMethod(contract, key) {
get: () => {
const fragment = contract.interface.getFunction(key);
assert$1(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
operation: "fragment"
operation: "fragment",
info: { key }
});
return fragment;
}
Expand All @@ -14214,7 +14258,8 @@ function buildWrappedEvent(contract, key) {
const getFragment = function (...args) {
const fragment = contract.interface.getEvent(key, args);
assert$1(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
operation: "fragment"
operation: "fragment",
info: { key, args }
});
return fragment;
};
Expand All @@ -14233,7 +14278,8 @@ function buildWrappedEvent(contract, key) {
get: () => {
const fragment = contract.interface.getEvent(key);
assert$1(fragment, "no matching fragment", "UNSUPPORTED_OPERATION", {
operation: "fragment"
operation: "fragment",
info: { key }
});
return fragment;
}
Expand Down Expand Up @@ -14549,7 +14595,7 @@ class BaseContract {
// Return a Proxy that will respond to functions
return new Proxy(this, {
get: (target, _prop, receiver) => {
if (_prop in target || passProperties.indexOf(_prop) >= 0) {
if (_prop in target || passProperties.indexOf(_prop) >= 0 || typeof (_prop) === "symbol") {
return Reflect.get(target, _prop, receiver);
}
const prop = String(_prop);
Expand All @@ -14560,7 +14606,7 @@ class BaseContract {
throw new Error(`unknown contract method: ${prop}`);
},
has: (target, prop) => {
if (prop in target || passProperties.indexOf(prop) >= 0) {
if (prop in target || passProperties.indexOf(prop) >= 0 || typeof (prop) === "symbol") {
return Reflect.has(target, prop);
}
return target.interface.hasFunction(String(prop));
Expand Down Expand Up @@ -14698,11 +14744,12 @@ class BaseContract {
catch (error) { }
}
if (foundFragment) {
return new EventLog(log, this.interface, foundFragment);
}
else {
return new Log(log, provider);
try {
return new EventLog(log, this.interface, foundFragment);
}
catch (error) { }
}
return new Log(log, provider);
});
}
/**
Expand Down
2 changes: 1 addition & 1 deletion dist/ethers.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ethers.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit bcc4d8c

Please sign in to comment.