essential-eth 0.9.0 → 0.9.1-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/cjs/classes/Contract.js +66 -307
  2. package/dist/cjs/classes/test/Contract/crv-abi.js +256 -252
  3. package/dist/cjs/classes/test/Contract/ens-abi.d.ts +1 -1
  4. package/dist/cjs/classes/test/Contract/ens-abi.js +212 -497
  5. package/dist/cjs/classes/test/Contract/fei-abi.js +284 -605
  6. package/dist/cjs/classes/test/Contract/foo-abi.d.ts +1 -1
  7. package/dist/cjs/classes/test/Contract/foo-abi.js +21 -44
  8. package/dist/cjs/classes/test/Contract/uniswap-abi.js +68 -64
  9. package/dist/cjs/classes/utils/clean-block.js +30 -52
  10. package/dist/cjs/classes/utils/clean-log.js +20 -42
  11. package/dist/cjs/classes/utils/clean-transaction-receipt.js +30 -51
  12. package/dist/cjs/classes/utils/clean-transaction.js +30 -52
  13. package/dist/cjs/classes/utils/encode-decode-transaction.js +107 -148
  14. package/dist/cjs/classes/utils/fetchers.d.ts +8 -2
  15. package/dist/cjs/classes/utils/fetchers.js +52 -166
  16. package/dist/cjs/classes/utils/hex-to-decimal.js +6 -1
  17. package/dist/cjs/classes/utils/prepare-transaction.js +36 -59
  18. package/dist/cjs/index.d.ts +21 -22
  19. package/dist/cjs/index.js +56 -26
  20. package/dist/cjs/index.umd.js +1 -1
  21. package/dist/cjs/index.umd.js.map +1 -1
  22. package/dist/cjs/logger/logger.js +23 -79
  23. package/dist/cjs/logger/package-version.d.ts +1 -1
  24. package/dist/cjs/logger/package-version.js +4 -1
  25. package/dist/cjs/providers/AlchemyProvider.js +9 -82
  26. package/dist/cjs/providers/BaseProvider.js +511 -882
  27. package/dist/cjs/providers/FallthroughProvider.js +46 -123
  28. package/dist/cjs/providers/JsonRpcProvider.js +28 -93
  29. package/dist/cjs/providers/test/json-rpc-provider/get-logs/mocks.d.ts +14 -0
  30. package/dist/cjs/providers/test/json-rpc-provider/get-logs/mocks.js +152 -0
  31. package/dist/cjs/providers/test/mock-of.js +6 -8
  32. package/dist/cjs/providers/test/rpc-urls.d.ts +1 -0
  33. package/dist/cjs/providers/test/rpc-urls.js +23 -14
  34. package/dist/cjs/providers/utils/chains-info.d.ts +5 -448
  35. package/dist/cjs/providers/utils/chains-info.js +16 -1345
  36. package/dist/cjs/shared/tiny-big/helpers.js +42 -93
  37. package/dist/cjs/shared/tiny-big/tiny-big.js +72 -161
  38. package/dist/cjs/shared/validate-type.d.ts +1 -1
  39. package/dist/cjs/shared/validate-type.js +7 -7
  40. package/dist/cjs/types/Block.types.d.ts +3 -3
  41. package/dist/cjs/types/Block.types.js +2 -1
  42. package/dist/cjs/types/Contract.types.d.ts +4 -4
  43. package/dist/cjs/types/Contract.types.js +2 -1
  44. package/dist/cjs/types/FeeData.types.js +2 -1
  45. package/dist/cjs/types/Filter.types.js +2 -1
  46. package/dist/cjs/types/Network.types.js +2 -3
  47. package/dist/cjs/types/Transaction.types.d.ts +5 -5
  48. package/dist/cjs/types/Transaction.types.js +2 -1
  49. package/dist/cjs/utils/bytes.d.ts +4 -4
  50. package/dist/cjs/utils/bytes.js +318 -286
  51. package/dist/cjs/utils/compute-address.js +15 -8
  52. package/dist/cjs/utils/compute-public-key.js +10 -5
  53. package/dist/cjs/utils/ether-to-gwei.js +11 -10
  54. package/dist/cjs/utils/ether-to-wei.js +11 -10
  55. package/dist/cjs/utils/gwei-to-ether.js +11 -10
  56. package/dist/cjs/utils/hash-message.js +16 -11
  57. package/dist/cjs/utils/is-address.js +12 -8
  58. package/dist/cjs/utils/keccak256.js +14 -8
  59. package/dist/cjs/utils/solidity-keccak256.js +60 -49
  60. package/dist/cjs/utils/split-signature.js +73 -55
  61. package/dist/cjs/utils/to-checksum-address.js +20 -15
  62. package/dist/cjs/utils/to-utf8-bytes.js +6 -1
  63. package/dist/cjs/utils/wei-to-ether.js +15 -13
  64. package/dist/esm/classes/test/Contract/ens-abi.d.ts +1 -1
  65. package/dist/esm/classes/test/Contract/foo-abi.d.ts +1 -1
  66. package/dist/esm/classes/utils/fetchers.d.ts +8 -2
  67. package/dist/esm/classes/utils/fetchers.js +6 -3
  68. package/dist/esm/index.d.ts +21 -22
  69. package/dist/esm/index.js +16 -17
  70. package/dist/esm/logger/package-version.d.ts +1 -1
  71. package/dist/esm/logger/package-version.js +1 -1
  72. package/dist/esm/providers/FallthroughProvider.js +3 -3
  73. package/dist/esm/providers/test/json-rpc-provider/get-logs/mocks.d.ts +14 -0
  74. package/dist/esm/providers/test/json-rpc-provider/get-logs/mocks.js +142 -0
  75. package/dist/esm/providers/test/rpc-urls.d.ts +1 -0
  76. package/dist/esm/providers/test/rpc-urls.js +7 -4
  77. package/dist/esm/providers/utils/chains-info.d.ts +5 -448
  78. package/dist/esm/providers/utils/chains-info.js +13 -1344
  79. package/dist/esm/shared/validate-type.d.ts +1 -1
  80. package/dist/esm/types/Block.types.d.ts +3 -3
  81. package/dist/esm/types/Contract.types.d.ts +4 -4
  82. package/dist/esm/types/Transaction.types.d.ts +5 -5
  83. package/dist/esm/utils/bytes.d.ts +4 -4
  84. package/package.json +23 -51
  85. package/readme.md +15 -38
  86. package/dist/cjs/classes/test/Contract/crv.test.js +0 -690
  87. package/dist/cjs/classes/test/Contract/ens.test.js +0 -217
  88. package/dist/cjs/classes/test/Contract/fei.test.js +0 -224
  89. package/dist/cjs/classes/test/Contract/foo.test.js +0 -33
  90. package/dist/cjs/classes/test/Contract/uni.test.js +0 -387
  91. package/dist/cjs/providers/test/fallthrough-provider/get-gas-price.test.js +0 -228
  92. package/dist/cjs/providers/test/get-transaction-count.test.js +0 -276
  93. package/dist/cjs/providers/test/json-rpc-provider/call.test.js +0 -436
  94. package/dist/cjs/providers/test/json-rpc-provider/estimate-gas.test.js +0 -288
  95. package/dist/cjs/providers/test/json-rpc-provider/get-balance.test.js +0 -261
  96. package/dist/cjs/providers/test/json-rpc-provider/get-block-number.test.js +0 -159
  97. package/dist/cjs/providers/test/json-rpc-provider/get-block.test.js +0 -477
  98. package/dist/cjs/providers/test/json-rpc-provider/get-code.test.js +0 -311
  99. package/dist/cjs/providers/test/json-rpc-provider/get-fee-data.test.js +0 -212
  100. package/dist/cjs/providers/test/json-rpc-provider/get-gas-price.test.js +0 -164
  101. package/dist/cjs/providers/test/json-rpc-provider/get-logs.test.js +0 -361
  102. package/dist/cjs/providers/test/json-rpc-provider/get-network.test.js +0 -274
  103. package/dist/cjs/providers/test/json-rpc-provider/get-transaction-receipt.test.js +0 -301
  104. package/dist/cjs/providers/test/json-rpc-provider/get-transaction.test.js +0 -307
  105. package/dist/cjs/providers/test/test-alchemy-provider.test.js +0 -151
  106. package/dist/cjs/shared/tiny-big/helpers.test.js +0 -29
  107. package/dist/cjs/shared/tiny-big/tiny-big.test.js +0 -34
  108. package/dist/cjs/utils/tests/bytes/arrayify.test.js +0 -40
  109. package/dist/cjs/utils/tests/bytes/concat.test.js +0 -15
  110. package/dist/cjs/utils/tests/bytes/hex-concat.test.js +0 -63
  111. package/dist/cjs/utils/tests/bytes/hex-data-length.test.js +0 -49
  112. package/dist/cjs/utils/tests/bytes/hex-data-slice.test.js +0 -52
  113. package/dist/cjs/utils/tests/bytes/hex-strip-zeros.test.js +0 -58
  114. package/dist/cjs/utils/tests/bytes/hex-value.test.js +0 -85
  115. package/dist/cjs/utils/tests/bytes/hex-zero-pad.test.js +0 -62
  116. package/dist/cjs/utils/tests/bytes/hexlify.test.js +0 -62
  117. package/dist/cjs/utils/tests/bytes/is-bytes-like.test.js +0 -69
  118. package/dist/cjs/utils/tests/bytes/is-bytes.test.js +0 -33
  119. package/dist/cjs/utils/tests/bytes/is-hex-string.test.js +0 -88
  120. package/dist/cjs/utils/tests/bytes/strip-zeros.test.js +0 -57
  121. package/dist/cjs/utils/tests/bytes/zero-pad.test.js +0 -80
  122. package/dist/cjs/utils/tests/compute-address.test.js +0 -27
  123. package/dist/cjs/utils/tests/compute-public-key.test.js +0 -15
  124. package/dist/cjs/utils/tests/ether-to-gwei.test.js +0 -26
  125. package/dist/cjs/utils/tests/ether-to-wei.test.js +0 -44
  126. package/dist/cjs/utils/tests/gwei-to-ether.test.js +0 -28
  127. package/dist/cjs/utils/tests/hash-message.test.js +0 -21
  128. package/dist/cjs/utils/tests/is-address.test.js +0 -55
  129. package/dist/cjs/utils/tests/keccak256.test.js +0 -97
  130. package/dist/cjs/utils/tests/solidity-keccak256.test.js +0 -310
  131. package/dist/cjs/utils/tests/split-signature.test.js +0 -25
  132. package/dist/cjs/utils/tests/to-checksum-address.test.js +0 -42
  133. package/dist/cjs/utils/tests/to-utf8-bytes.test.js +0 -14
  134. package/dist/cjs/utils/tests/wei-to-ether.test.js +0 -51
@@ -1,309 +1,72 @@
1
- function _assertThisInitialized(self) {
2
- if (self === void 0) {
3
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4
- }
5
- return self;
6
- }
7
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
8
- try {
9
- var info = gen[key](arg);
10
- var value = info.value;
11
- } catch (error) {
12
- reject(error);
13
- return;
14
- }
15
- if (info.done) {
16
- resolve(value);
17
- } else {
18
- Promise.resolve(value).then(_next, _throw);
19
- }
20
- }
21
- function _asyncToGenerator(fn) {
22
- return function() {
23
- var self = this, args = arguments;
24
- return new Promise(function(resolve, reject) {
25
- var gen = fn.apply(self, args);
26
- function _next(value) {
27
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
28
- }
29
- function _throw(err) {
30
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
31
- }
32
- _next(undefined);
33
- });
34
- };
35
- }
36
- function _classCallCheck(instance, Constructor) {
37
- if (!(instance instanceof Constructor)) {
38
- throw new TypeError("Cannot call a class as a function");
39
- }
40
- }
41
- function _defineProperty(obj, key, value) {
42
- if (key in obj) {
43
- Object.defineProperty(obj, key, {
44
- value: value,
45
- enumerable: true,
46
- configurable: true,
47
- writable: true
48
- });
49
- } else {
50
- obj[key] = value;
51
- }
52
- return obj;
53
- }
54
- function _getPrototypeOf(o) {
55
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
56
- return o.__proto__ || Object.getPrototypeOf(o);
57
- };
58
- return _getPrototypeOf(o);
59
- }
60
- function _inherits(subClass, superClass) {
61
- if (typeof superClass !== "function" && superClass !== null) {
62
- throw new TypeError("Super expression must either be null or a function");
63
- }
64
- subClass.prototype = Object.create(superClass && superClass.prototype, {
65
- constructor: {
66
- value: subClass,
67
- writable: true,
68
- configurable: true
69
- }
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
70
9
  });
71
- if (superClass) _setPrototypeOf(subClass, superClass);
72
- }
73
- function _objectSpread(target) {
74
- for(var i = 1; i < arguments.length; i++){
75
- var source = arguments[i] != null ? arguments[i] : {};
76
- var ownKeys = Object.keys(source);
77
- if (typeof Object.getOwnPropertySymbols === "function") {
78
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
79
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
80
- }));
81
- }
82
- ownKeys.forEach(function(key) {
83
- _defineProperty(target, key, source[key]);
84
- });
85
- }
86
- return target;
87
- }
88
- function _possibleConstructorReturn(self, call) {
89
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
90
- return call;
91
- }
92
- return _assertThisInitialized(self);
93
- }
94
- function _setPrototypeOf(o, p) {
95
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
96
- o.__proto__ = p;
97
- return o;
98
- };
99
- return _setPrototypeOf(o, p);
100
- }
101
- var _typeof = function(obj) {
102
- "@swc/helpers - typeof";
103
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
104
10
  };
105
- function _isNativeReflectConstruct() {
106
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
107
- if (Reflect.construct.sham) return false;
108
- if (typeof Proxy === "function") return true;
109
- try {
110
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
111
- return true;
112
- } catch (e) {
113
- return false;
114
- }
115
- }
116
- function _createSuper(Derived) {
117
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
118
- return function _createSuperInternal() {
119
- var Super = _getPrototypeOf(Derived), result;
120
- if (hasNativeReflectConstruct) {
121
- var NewTarget = _getPrototypeOf(this).constructor;
122
- result = Reflect.construct(Super, arguments, NewTarget);
123
- } else {
124
- result = Super.apply(this, arguments);
125
- }
126
- return _possibleConstructorReturn(this, result);
127
- };
128
- }
129
- var __generator = this && this.__generator || function(thisArg, body) {
130
- var f, y, t, g, _ = {
131
- label: 0,
132
- sent: function() {
133
- if (t[0] & 1) throw t[1];
134
- return t[1];
135
- },
136
- trys: [],
137
- ops: []
138
- };
139
- return(g = {
140
- next: verb(0),
141
- "throw": verb(1),
142
- "return": verb(2)
143
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
144
- return this;
145
- }), g);
146
- function verb(n) {
147
- return function(v) {
148
- return step([
149
- n,
150
- v
151
- ]);
152
- };
153
- }
154
- function step(op) {
155
- if (f) throw new TypeError("Generator is already executing.");
156
- while(_)try {
157
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
158
- if (y = 0, t) op = [
159
- op[0] & 2,
160
- t.value
161
- ];
162
- switch(op[0]){
163
- case 0:
164
- case 1:
165
- t = op;
166
- break;
167
- case 4:
168
- _.label++;
169
- return {
170
- value: op[1],
171
- done: false
172
- };
173
- case 5:
174
- _.label++;
175
- y = op[1];
176
- op = [
177
- 0
178
- ];
179
- continue;
180
- case 7:
181
- op = _.ops.pop();
182
- _.trys.pop();
183
- continue;
184
- default:
185
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
186
- _ = 0;
187
- continue;
188
- }
189
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
190
- _.label = op[1];
191
- break;
192
- }
193
- if (op[0] === 6 && _.label < t[1]) {
194
- _.label = t[1];
195
- t = op;
196
- break;
197
- }
198
- if (t && _.label < t[2]) {
199
- _.label = t[2];
200
- _.ops.push(op);
201
- break;
202
- }
203
- if (t[2]) _.ops.pop();
204
- _.trys.pop();
205
- continue;
206
- }
207
- op = body.call(thisArg, _);
208
- } catch (e) {
209
- op = [
210
- 6,
211
- e
212
- ];
213
- y = 0;
214
- } finally{
215
- f = t = 0;
216
- }
217
- if (op[0] & 5) throw op[1];
218
- return {
219
- value: op[0] ? op[1] : void 0,
220
- done: true
221
- };
222
- }
223
- };
224
- import { decodeRPCResponse, encodeData } from "./utils/encode-decode-transaction";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Contract = exports.defineReadOnly = exports.BaseContract = void 0;
13
+ const encode_decode_transaction_1 = require("./utils/encode-decode-transaction");
225
14
  /**
226
15
  * @param txnData
227
16
  * @example
228
- */ function estimateGas(txnData) {
17
+ */
18
+ function estimateGas(txnData) {
229
19
  // https://ethereum.stackexchange.com/questions/1570/what-does-intrinsic-gas-too-low-mean/1694
230
- txnData.split("").reduce(function(previousValue, currentValue) {
20
+ txnData.split('').reduce((previousValue, currentValue) => {
231
21
  // 0 characters are 4 gwei, all others are 48 gwei
232
- var characterCost = currentValue === "0" ? 4 : 68;
22
+ const characterCost = currentValue === '0' ? 4 : 68;
233
23
  return previousValue + characterCost;
234
24
  }, 0);
235
25
  }
236
- export var BaseContract = function BaseContract(addressOrName, contractInterface, signerOrProvider) {
237
- "use strict";
238
- var _this = this;
239
- _classCallCheck(this, BaseContract);
240
- this._address = addressOrName;
241
- this._provider = signerOrProvider;
242
- contractInterface.filter(function(jsonABIArgument) {
243
- return jsonABIArgument.type === "function";
244
- }).forEach(function(jsonABIArgument) {
245
- if ("name" in jsonABIArgument && typeof jsonABIArgument.name === "string") {
246
- var _this1 = _this;
247
- defineReadOnly(_this, jsonABIArgument.name, /*#__PURE__*/ _asyncToGenerator(function() {
248
- var _len, _args, _key, functionArguments, options, lastArg, data, decimalGas, req, nodeResponse;
249
- var _arguments = arguments;
250
- return __generator(this, function(_state) {
251
- switch(_state.label){
252
- case 0:
253
- for(_len = _arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++){
254
- _args[_key] = _arguments[_key];
255
- }
256
- functionArguments = _args;
257
- options = {};
258
- lastArg = _args[_args.length - 1];
259
- if (!Array.isArray(lastArg) && typeof lastArg === "object") {
260
- options = lastArg;
261
- functionArguments = _args.slice(0, _args.length - 1);
262
- }
263
- data = encodeData(jsonABIArgument, functionArguments);
264
- decimalGas = typeof options.gasLimit === "number" ? options.gasLimit /* user passed in "gasLimit" directly */ : typeof (jsonABIArgument === null || jsonABIArgument === void 0 ? void 0 : jsonABIArgument.gas) === "number" /* ABI specified "gas". */ ? estimateGas(data) : null;
265
- req = function() {
266
- var _ref = _asyncToGenerator(function() {
267
- return __generator(this, function(_state) {
268
- switch(_state.label){
269
- case 0:
270
- return [
271
- 4,
272
- _this1._provider.call(_objectSpread({
273
- to: _this1._address.toLowerCase(),
274
- data: data
275
- }, decimalGas ? {
276
- gas: "0x".concat(decimalGas.toString(16))
277
- } : {}), "latest")
278
- ];
279
- case 1:
280
- return [
281
- 2,
282
- _state.sent()
283
- ];
284
- }
285
- });
286
- });
287
- return function req() {
288
- return _ref.apply(this, arguments);
289
- };
290
- }();
291
- return [
292
- 4,
293
- req()
294
- ];
295
- case 1:
296
- nodeResponse = _state.sent();
297
- return [
298
- 2,
299
- decodeRPCResponse(jsonABIArgument, nodeResponse)
300
- ];
26
+ class BaseContract {
27
+ /**
28
+ * @param addressOrName The ethereum address of the smart-contract
29
+ * @param contractInterface The JSON ABI of the smart-contract (like http://api.etherscan.io/api?module=contract&action=getabi&address=0x090d4613473dee047c3f2706764f49e0821d256e&format=raw)
30
+ * @param signerOrProvider An instantiated essential-eth provider
31
+ * @example
32
+ */
33
+ constructor(addressOrName, contractInterface, signerOrProvider) {
34
+ this._address = addressOrName;
35
+ this._provider = signerOrProvider;
36
+ contractInterface
37
+ .filter((jsonABIArgument) => jsonABIArgument.type === 'function')
38
+ .forEach((jsonABIArgument) => {
39
+ if ('name' in jsonABIArgument &&
40
+ typeof jsonABIArgument.name === 'string') {
41
+ defineReadOnly(this, jsonABIArgument.name, (..._args) => __awaiter(this, void 0, void 0, function* () {
42
+ let functionArguments = _args;
43
+ let options = {};
44
+ // remove options from encoding
45
+ const lastArg = _args[_args.length - 1];
46
+ if (!Array.isArray(lastArg) && typeof lastArg === 'object') {
47
+ options = lastArg;
48
+ functionArguments = _args.slice(0, _args.length - 1);
301
49
  }
302
- });
303
- }));
304
- }
305
- });
306
- };
50
+ const data = (0, encode_decode_transaction_1.encodeData)(jsonABIArgument, functionArguments);
51
+ const decimalGas = typeof options.gasLimit === 'number'
52
+ ? options.gasLimit /* user passed in "gasLimit" directly */
53
+ : typeof (jsonABIArgument === null || jsonABIArgument === void 0 ? void 0 : jsonABIArgument.gas) ===
54
+ 'number' /* ABI specified "gas". */
55
+ ? estimateGas(data)
56
+ : null;
57
+ const req = () => __awaiter(this, void 0, void 0, function* () {
58
+ return yield this._provider.call(Object.assign({ to: this._address.toLowerCase(), data }, (decimalGas
59
+ ? { gas: `0x${decimalGas.toString(16)}` }
60
+ : {})), 'latest');
61
+ });
62
+ const nodeResponse = yield req();
63
+ return (0, encode_decode_transaction_1.decodeRPCResponse)(jsonABIArgument, nodeResponse);
64
+ }));
65
+ }
66
+ });
67
+ }
68
+ }
69
+ exports.BaseContract = BaseContract;
307
70
  /**
308
71
  * Applies the unique contract's methods to the instantiated Contract in the constructor based-upon the provided ABI
309
72
  *
@@ -312,13 +75,15 @@ export var BaseContract = function BaseContract(addressOrName, contractInterface
312
75
  * @param value
313
76
  * @internal
314
77
  * @example
315
- */ export function defineReadOnly(object, name, value) {
78
+ */
79
+ function defineReadOnly(object, name, value) {
316
80
  Object.defineProperty(object, name, {
317
81
  enumerable: true,
318
82
  value: value,
319
- writable: false
83
+ writable: false,
320
84
  });
321
85
  }
86
+ exports.defineReadOnly = defineReadOnly;
322
87
  /**
323
88
  * @alpha
324
89
  * Only accepts ABIS in JSON format. This allows for stronger typing and assurances of data-types
@@ -367,13 +132,7 @@ export var BaseContract = function BaseContract(addressOrName, contractInterface
367
132
  *
368
133
  *
369
134
  * ```
370
- */ export var Contract = /*#__PURE__*/ function(BaseContract) {
371
- "use strict";
372
- _inherits(Contract, BaseContract);
373
- var _super = _createSuper(Contract);
374
- function Contract() {
375
- _classCallCheck(this, Contract);
376
- return _super.apply(this, arguments);
377
- }
378
- return Contract;
379
- }(BaseContract);
135
+ */
136
+ class Contract extends BaseContract {
137
+ }
138
+ exports.Contract = Contract;