ethers.js/packages/abi/lib/coders/anonymous.js
2022-04-11 17:14:19 -04:00

18 lines
541 B
JavaScript

import { Coder } from "./abstract-coder.js";
// Clones the functionality of an existing Coder, but without a localName
export class AnonymousCoder extends Coder {
constructor(coder) {
super(coder.name, coder.type, "_", coder.dynamic);
this.coder = coder;
}
defaultValue() {
return this.coder.defaultValue();
}
encode(writer, value) {
return this.coder.encode(writer, value);
}
decode(reader) {
return this.coder.decode(reader);
}
}
//# sourceMappingURL=anonymous.js.map