@pioneer-platform/tenderly-client 8.3.2 → 8.4.0
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.
- package/CHANGELOG.md +12 -0
- package/lib/index.js +7 -3
- package/package.json +16 -15
package/CHANGELOG.md
ADDED
package/lib/index.js
CHANGED
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
13
|
-
return g =
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
15
15
|
function step(op) {
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
@@ -62,9 +62,9 @@ module.exports = {
|
|
62
62
|
};
|
63
63
|
// Function to simulate a transaction
|
64
64
|
function simulateTransaction(tx) {
|
65
|
-
var _a;
|
66
65
|
return __awaiter(this, void 0, void 0, function () {
|
67
66
|
var tag, apiURL, body, headers, response, summary, error_1;
|
67
|
+
var _a;
|
68
68
|
return __generator(this, function (_b) {
|
69
69
|
switch (_b.label) {
|
70
70
|
case 0:
|
@@ -99,11 +99,15 @@ function simulateTransaction(tx) {
|
|
99
99
|
return [4 /*yield*/, axiosInstance.post(apiURL, body, headers)];
|
100
100
|
case 2:
|
101
101
|
response = _b.sent();
|
102
|
+
// console.log(tag,'response: ',Object.keys(response.data))
|
103
|
+
// console.log(tag,'response simulation: ',Object.keys(response.data.simulation))
|
104
|
+
console.log(tag, 'response simulation: ', response.data.simulation);
|
102
105
|
summary = {
|
103
106
|
isValid: response.data.simulation.status,
|
104
107
|
method: response.data.simulation.method,
|
105
108
|
gas_used: response.data.simulation.gas_used,
|
106
109
|
nonce: response.data.simulation.nonce,
|
110
|
+
addresses: response.data.simulation.addresses,
|
107
111
|
};
|
108
112
|
if (!response.data.simulation.status) {
|
109
113
|
summary.error = response.data.simulation.error_message;
|
package/package.json
CHANGED
@@ -1,30 +1,31 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pioneer-platform/tenderly-client",
|
3
|
-
"version": "8.
|
3
|
+
"version": "8.4.0",
|
4
4
|
"main": "./lib/index.js",
|
5
5
|
"types": "./lib/index.d.ts",
|
6
6
|
"dependencies": {
|
7
|
-
"@pioneer-platform/loggerdog": "^8.
|
8
|
-
"axios": "^1.
|
9
|
-
"dotenv": "^8.2.0"
|
10
|
-
|
11
|
-
"scripts": {
|
12
|
-
"npm": "npm i",
|
13
|
-
"test": "npm run build && node __tests__/test-module.js",
|
14
|
-
"build": "tsc -p .",
|
15
|
-
"prepublish": "npm run build",
|
16
|
-
"refresh": "rm -rf ./node_modules ./package-lock.json && npm install"
|
7
|
+
"@pioneer-platform/loggerdog": "^8.4.0",
|
8
|
+
"axios": "^1.8.4",
|
9
|
+
"dotenv": "^8.2.0",
|
10
|
+
"ethers": "5.7.2"
|
17
11
|
},
|
18
12
|
"devDependencies": {
|
19
13
|
"@types/jest": "^25.2.3",
|
20
|
-
"@types/node": "^
|
14
|
+
"@types/node": "^18.16.0",
|
21
15
|
"@types/source-map-support": "^0.5.3",
|
22
16
|
"jest": "^26.4.2",
|
23
17
|
"onchange": "^7.0.2",
|
24
18
|
"serve": "^11.3.2",
|
25
19
|
"source-map-support": "^0.5.19",
|
26
20
|
"ts-jest": "^29.0.5",
|
27
|
-
"typescript": "^5.0.
|
21
|
+
"typescript": "^5.0.4"
|
28
22
|
},
|
29
|
-
"gitHead": "aeae28273014ab69b42f22abec159c6693a56c40"
|
30
|
-
|
23
|
+
"gitHead": "aeae28273014ab69b42f22abec159c6693a56c40",
|
24
|
+
"scripts": {
|
25
|
+
"npm": "pnpm i",
|
26
|
+
"test": "pnpm run build && node __tests__/test-module.js",
|
27
|
+
"build": "tsc -p .",
|
28
|
+
"prepublish": "pnpm run build",
|
29
|
+
"refresh": "rm -rf ./node_modules ./package-lock.json && pnpm install"
|
30
|
+
}
|
31
|
+
}
|