@tenderly/actions-test 0.1.1 → 0.2.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.
package/README.md CHANGED
@@ -1,9 +1,65 @@
1
- # Web3 Actions Local Development
1
+ # Tenderly Web3 Actions Local Development
2
2
 
3
- Tenderly Web3 Actions will run your code in response to on-chain (or even off-chain) events, usually on your smart contracts.
3
+ <div align="center">
4
+ <a href="https://tenderly.co">
5
+ <img src="https://storage.googleapis.com/tenderly-public-assets/tenderly-logo-purple.png" alt="Tenderly" width="100%" height="auto" style="background-color: #ffffffb2; padding: 10px 20px; margin-bottom: 20px; box-sizing: border-box; max-width:200px;" />
6
+ </a>
7
+ </div>
4
8
 
5
- You can use Web3 Actions to create custom scenarios in order to further deepen your debugging process, create alerting patterns that are not available out-of-the-box in the Alerting section, automating testing or live production execution in the Simulator and Forks, or anything else that comes to (your) mind.
9
+ <div align="center">
6
10
 
7
- The code Web3 Actions run is called a function. Function must be written in TypeScript (or JavaScript) and runs in Node runtime. Specification of events that your action listens to is called a trigger.
11
+ [![npm](https://img.shields.io/npm/v/@tenderly%2Factions-test.svg)](https://www.npmjs.org/package/@tenderly/actions-test)
12
+ [![Twitter](https://img.shields.io/twitter/follow/TenderlyApp?style=social)](https://twitter.com/intent/follow?screen_name=TenderlyApp)
13
+ [![Github](https://img.shields.io/github/stars/Tenderly/tenderly-actions?style=social)](https://github.com/Tenderly/tenderly-actions)
8
14
 
9
- To get started, see [docs](https://docs.tenderly.co/web3-actions/intro-to-web3-actions).
15
+ </div>
16
+
17
+ ## Introduction
18
+
19
+ [Tenderly](https://tenderly.co) Web3 Actions are programmable hooks for smart contract and chain events. They can also
20
+ be serverless backends for your dapps. A Web3 Action is a regular TypeScript/JavaScript function that runs on Tenderly
21
+ infrastructure.
22
+
23
+ A Web3 Action comes with key-value storage for data you need to persist and secrets management for sensitive information
24
+ such as API keys. You can think of Web3 Actions as infrastructure building a Web3 version of IFTTT/Zapier automation,
25
+ allowing you to glue together your smart contracts, on-chain events, dapp frontends, APIs, and other services.
26
+
27
+ ![Web3 Actions](https://storage.googleapis.com/tenderly-public-assets/web3-actions/tenderly-web3-actions-breakdown.webp)
28
+
29
+ Based on the trigger rules you define, external on-chain or off-chain events will trigger your Web3 Action and your
30
+ TypeScript/JavaScript code will handle the event instantly.
31
+
32
+ With Web3 Actions, you can build systems that let you be timely informed about non-trivial events. This way, you can
33
+ improve your dapp in terms of UX and interactivity and enhance your project through the depth of information you can
34
+ collect or share through notifications.
35
+
36
+ > The code Web3 Actions run is called a **function**. Function must be written in TypeScript/JavaScript and runs in
37
+ **Node** runtime. Specification of events that your action listens to is called a **trigger**.
38
+
39
+ ## Getting Started
40
+
41
+ ```bash
42
+ yarn add -D @tenderly/actions-test
43
+ ```
44
+
45
+ Follow these guides to quickly get started with building Web3 Actions via the browser or command line tools.
46
+
47
+ Read our [documentation](https://docs.tenderly.co/web3-actions/intro-to-web3-actions) to get started with Tenderly Web3 Actions.
48
+
49
+ Setting up Web3 Actions requires you to write TypeScript/JavaScript code for your functions. Building your Web3 Actions
50
+ using Tenderly CLI includes defining triggers in a [yaml configuration file](https://docs.tenderly.co/web3-actions/references/project-structure#the-tenderly.yaml-file-structure).
51
+ The defined trigger and yaml configuration become an integral part of your project’s codebase.
52
+
53
+ - [Deploy Web3 Actions via Tenderly Dashboard](https://docs.tenderly.co/web3-actions/tutorials-and-quickstarts/deploy-web3-actions-via-dashboard) - Learn how to set up and deploy Web3 Actions directly in your browser.
54
+ - [Deploy Web3 Actions via Tenderly CLI](https://docs.tenderly.co/web3-actions/tutorials-and-quickstarts/deploy-web3-action-via-cli) - Learn how to install the Tenderly CLI, define triggers using the YAML configuration, and set up and deploy Web3 Actions through the command line.
55
+ - [Local Development and Testing](https://docs.tenderly.co/web3-actions/references/local-development-and-testing) - Learn how to test your Web3 Actions locally before deploying them to Tenderly.
56
+
57
+ ### Supported Networks
58
+
59
+ Tenderly Web3 Actions are currently supported on the [following networks](https://docs.tenderly.co/web3-actions/references/networks).
60
+
61
+ ## Contributors
62
+
63
+ <a href="https://github.com/Tenderly/tenderly-actions/graphs/contributors">
64
+ <img src="https://contrib.rocks/image?repo=Tenderly/tenderly-actions&max=100&columns=20" alt="tenderly-contributors" />
65
+ </a>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenderly/actions-test",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "Helper library for testing Web3 Actions.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -28,6 +28,6 @@
28
28
  "typescript": "^4.4.3"
29
29
  },
30
30
  "dependencies": {
31
- "@tenderly/actions": "^0.1.1"
31
+ "@tenderly/actions": "^0.2.1"
32
32
  }
33
33
  }
package/lib/event.d.ts DELETED
@@ -1,45 +0,0 @@
1
- import { BlockEvent, PeriodicEvent, TransactionEvent, WebhookEvent, Log } from "@tenderly/actions";
2
- export declare class TestPeriodicEvent implements PeriodicEvent {
3
- time: Date;
4
- constructor();
5
- }
6
- export declare class TestWebhookEvent implements WebhookEvent {
7
- time: Date;
8
- payload: any;
9
- constructor(payload: any);
10
- }
11
- export declare class TestBlockEvent implements BlockEvent {
12
- blockHash: string;
13
- blockNumber: number;
14
- network: string;
15
- blockDifficulty: string;
16
- totalDifficulty: string;
17
- constructor();
18
- }
19
- export declare class TestTransactionEvent implements TransactionEvent {
20
- blockHash: string;
21
- blockNumber: number;
22
- from: string;
23
- hash: string;
24
- network: string;
25
- to?: string;
26
- logs: TestLog[];
27
- input: string;
28
- value: string;
29
- nonce: string;
30
- gas: string;
31
- gasUsed: string;
32
- cumulativeGasUsed: string;
33
- gasPrice: string;
34
- gasTipCap: string;
35
- gasFeeCap: string;
36
- transactionHash: string;
37
- constructor();
38
- }
39
- export declare class TestLog implements Log {
40
- address: string;
41
- data: string;
42
- topics: string[];
43
- constructor();
44
- }
45
- //# sourceMappingURL=event.d.ts.map
@@ -1 +0,0 @@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,EAAE,CAAC;;CAOpB"}
package/lib/event.js DELETED
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TestLog = exports.TestTransactionEvent = exports.TestBlockEvent = exports.TestWebhookEvent = exports.TestPeriodicEvent = void 0;
4
- class TestPeriodicEvent {
5
- constructor() {
6
- this.time = new Date(Date.now());
7
- }
8
- }
9
- exports.TestPeriodicEvent = TestPeriodicEvent;
10
- class TestWebhookEvent {
11
- constructor(payload) {
12
- this.payload = payload;
13
- this.time = new Date(Date.now());
14
- }
15
- }
16
- exports.TestWebhookEvent = TestWebhookEvent;
17
- class TestBlockEvent {
18
- constructor() {
19
- this.blockHash = "0x";
20
- this.blockNumber = 0;
21
- this.network = "0";
22
- this.blockDifficulty = "0";
23
- this.totalDifficulty = "0";
24
- }
25
- }
26
- exports.TestBlockEvent = TestBlockEvent;
27
- class TestTransactionEvent {
28
- constructor() {
29
- this.blockHash = "0x";
30
- this.blockNumber = 0;
31
- this.from = "0x";
32
- this.hash = "0x";
33
- this.network = "0";
34
- this.to = "0x";
35
- this.logs = [new TestLog()];
36
- this.input = "0x";
37
- this.value = "0x";
38
- this.nonce = "0x";
39
- this.gas = "0x";
40
- this.gasUsed = "0x";
41
- this.cumulativeGasUsed = "0x";
42
- this.gasPrice = "0x";
43
- this.gasTipCap = "0x";
44
- this.gasFeeCap = "0x";
45
- this.transactionHash = "0x";
46
- }
47
- }
48
- exports.TestTransactionEvent = TestTransactionEvent;
49
- class TestLog {
50
- constructor() {
51
- this.address = "0x";
52
- this.data = "0x";
53
- this.topics = ["0x"];
54
- }
55
- }
56
- exports.TestLog = TestLog;
57
- //# sourceMappingURL=event.js.map
package/lib/event.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"event.js","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":";;;AAEA,MAAa,iBAAiB;IAG1B;QACI,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,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,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;IAChC,CAAC;CACJ;AAtCD,oDAsCC;AAED,MAAa,OAAO;IAKhB;QACI,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;CACJ;AAVD,0BAUC"}
package/lib/gateways.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import { Gateways, Network } from "@tenderly/actions";
2
- export declare class TestGateways implements Gateways {
3
- private gatewayConfig;
4
- constructor();
5
- getGateway(network: Network, name?: string | undefined): string;
6
- setConfig(name: string, config: any): void;
7
- }
8
- //# sourceMappingURL=gateways.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gateways.d.ts","sourceRoot":"","sources":["../src/gateways.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAEpD,qBAAa,YAAa,YAAW,QAAQ;IACzC,OAAO,CAAC,aAAa,CAAmB;;IAMxC,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM;IAK/D,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG;CAGtC"}
package/lib/gateways.js DELETED
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TestGateways = void 0;
4
- class TestGateways {
5
- constructor() {
6
- this.gatewayConfig = new Map();
7
- }
8
- getGateway(network, name) {
9
- const gatewayConfig = this.gatewayConfig.get(name ?? "");
10
- return `https://${network}.gateway.tenderly.co/${gatewayConfig?.accessKey}`;
11
- }
12
- setConfig(name, config) {
13
- this.gatewayConfig.set(name, config);
14
- }
15
- }
16
- exports.TestGateways = TestGateways;
17
- //# sourceMappingURL=gateways.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gateways.js","sourceRoot":"","sources":["../src/gateways.ts"],"names":[],"mappings":";;;AAEA,MAAa,YAAY;IAGrB;QACI,IAAI,CAAC,aAAa,GAAG,IAAI,GAAG,EAAe,CAAC;IAChD,CAAC;IAED,UAAU,CAAC,OAAgB,EAAE,IAAyB;QAClD,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;QACxD,OAAO,WAAW,OAAO,wBAAwB,aAAa,EAAE,SAAS,EAAE,CAAA;IAC/E,CAAC;IAED,SAAS,CAAC,IAAY,EAAE,MAAW;QAC/B,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IACxC,CAAC;CACJ;AAfD,oCAeC"}
package/lib/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export { TestPeriodicEvent, TestWebhookEvent, TestBlockEvent, TestTransactionEvent, TestLog } from './event';
2
- export { TestSecrets } from './secrets';
3
- export { TestStorage } from './storage';
4
- export { TestRuntime, TestContext } from './runtime';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,EAAE,oBAAoB,EAAE,OAAO,EAAC,MAAM,SAAS,CAAA;AAC1G,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AACrC,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AACrC,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,WAAW,CAAA"}
package/lib/index.js DELETED
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TestContext = exports.TestRuntime = exports.TestStorage = exports.TestSecrets = exports.TestLog = exports.TestTransactionEvent = exports.TestBlockEvent = exports.TestWebhookEvent = exports.TestPeriodicEvent = void 0;
4
- var event_1 = require("./event");
5
- Object.defineProperty(exports, "TestPeriodicEvent", { enumerable: true, get: function () { return event_1.TestPeriodicEvent; } });
6
- Object.defineProperty(exports, "TestWebhookEvent", { enumerable: true, get: function () { return event_1.TestWebhookEvent; } });
7
- Object.defineProperty(exports, "TestBlockEvent", { enumerable: true, get: function () { return event_1.TestBlockEvent; } });
8
- Object.defineProperty(exports, "TestTransactionEvent", { enumerable: true, get: function () { return event_1.TestTransactionEvent; } });
9
- Object.defineProperty(exports, "TestLog", { enumerable: true, get: function () { return event_1.TestLog; } });
10
- var secrets_1 = require("./secrets");
11
- Object.defineProperty(exports, "TestSecrets", { enumerable: true, get: function () { return secrets_1.TestSecrets; } });
12
- var storage_1 = require("./storage");
13
- Object.defineProperty(exports, "TestStorage", { enumerable: true, get: function () { return storage_1.TestStorage; } });
14
- var runtime_1 = require("./runtime");
15
- Object.defineProperty(exports, "TestRuntime", { enumerable: true, get: function () { return runtime_1.TestRuntime; } });
16
- Object.defineProperty(exports, "TestContext", { enumerable: true, get: function () { return runtime_1.TestContext; } });
17
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iCAA0G;AAAlG,0GAAA,iBAAiB,OAAA;AAAE,yGAAA,gBAAgB,OAAA;AAAE,uGAAA,cAAc,OAAA;AAAE,6GAAA,oBAAoB,OAAA;AAAE,gGAAA,OAAO,OAAA;AAC1F,qCAAqC;AAA7B,sGAAA,WAAW,OAAA;AACnB,qCAAqC;AAA7B,sGAAA,WAAW,OAAA;AACnB,qCAAkD;AAA1C,sGAAA,WAAW,OAAA;AAAE,sGAAA,WAAW,OAAA"}
package/lib/runtime.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import { ActionFn, Context, Event } from "@tenderly/actions";
2
- import { TestSecrets } from "./secrets";
3
- import { TestStorage } from "./storage";
4
- import { TestGateways } from "./gateways";
5
- export declare class TestContext implements Context {
6
- secrets: TestSecrets;
7
- storage: TestStorage;
8
- gateways: TestGateways;
9
- constructor();
10
- }
11
- export declare class TestRuntime {
12
- context: TestContext;
13
- constructor();
14
- execute(action: ActionFn, event: Event): Promise<any>;
15
- }
16
- //# sourceMappingURL=runtime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AACtC,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,qBAAa,WAAY,YAAW,OAAO;IACvC,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,YAAY,CAAC;;CAO1B;AAED,qBAAa,WAAW;IACpB,OAAO,EAAE,WAAW,CAAC;;IAMf,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC;CAG9D"}
package/lib/runtime.js DELETED
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TestRuntime = exports.TestContext = void 0;
4
- const secrets_1 = require("./secrets");
5
- const storage_1 = require("./storage");
6
- const gateways_1 = require("./gateways");
7
- class TestContext {
8
- constructor() {
9
- this.secrets = new secrets_1.TestSecrets();
10
- this.storage = new storage_1.TestStorage();
11
- this.gateways = new gateways_1.TestGateways();
12
- }
13
- }
14
- exports.TestContext = TestContext;
15
- class TestRuntime {
16
- constructor() {
17
- this.context = new TestContext();
18
- }
19
- async execute(action, event) {
20
- return action(this.context, event);
21
- }
22
- }
23
- exports.TestRuntime = TestRuntime;
24
- //# sourceMappingURL=runtime.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":";;;AACA,uCAAsC;AACtC,uCAAsC;AACtC,yCAA0C;AAE1C,MAAa,WAAW;IAKpB;QACI,IAAI,CAAC,OAAO,GAAG,IAAI,qBAAW,EAAE,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,IAAI,qBAAW,EAAE,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,IAAI,uBAAY,EAAE,CAAC;IACvC,CAAC;CACJ;AAVD,kCAUC;AAED,MAAa,WAAW;IAGpB;QACI,IAAI,CAAC,OAAO,GAAG,IAAI,WAAW,EAAE,CAAA;IACpC,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,MAAgB,EAAE,KAAY;QACxC,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;IACtC,CAAC;CACJ;AAVD,kCAUC"}
package/lib/secrets.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import { Secrets } from "@tenderly/actions";
2
- export declare class TestSecrets implements Secrets {
3
- private stored;
4
- constructor();
5
- get(key: string): Promise<string>;
6
- put(key: string, value: string): void;
7
- delete(key: string): void;
8
- clear(): void;
9
- }
10
- //# sourceMappingURL=secrets.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../src/secrets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAE1C,qBAAa,WAAY,YAAW,OAAO;IACvC,OAAO,CAAC,MAAM,CAAsB;;IAMpC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAQjC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAI9B,MAAM,CAAC,GAAG,EAAE,MAAM;IAIlB,KAAK;CAGR"}
package/lib/secrets.js DELETED
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TestSecrets = void 0;
4
- class TestSecrets {
5
- constructor() {
6
- this.stored = new Map();
7
- }
8
- get(key) {
9
- let value = this.stored.get(key);
10
- if (value === undefined) {
11
- return Promise.resolve("");
12
- }
13
- return Promise.resolve(value);
14
- }
15
- put(key, value) {
16
- this.stored.set(key, value);
17
- }
18
- delete(key) {
19
- this.stored.delete(key);
20
- }
21
- clear() {
22
- this.stored = new Map();
23
- }
24
- }
25
- exports.TestSecrets = TestSecrets;
26
- //# sourceMappingURL=secrets.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"secrets.js","sourceRoot":"","sources":["../src/secrets.ts"],"names":[],"mappings":";;;AAEA,MAAa,WAAW;IAGpB;QACI,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC5C,CAAC;IAED,GAAG,CAAC,GAAW;QACX,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAChC,IAAI,KAAK,KAAK,SAAS,EAAE;YACrB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;SAC7B;QACD,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,GAAG,CAAC,GAAW,EAAE,KAAa;QAC1B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAC/B,CAAC;IAED,MAAM,CAAC,GAAW;QACd,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAC3B,CAAC;IAED,KAAK;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC5C,CAAC;CACJ;AA1BD,kCA0BC"}
package/lib/storage.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import { Storage } from "@tenderly/actions";
2
- export declare class TestStorage implements Storage {
3
- private stored;
4
- constructor();
5
- delete(key: string): Promise<void>;
6
- getBigInt(key: string): Promise<bigint>;
7
- getJson(key: string): Promise<any>;
8
- getStr(key: string): Promise<string>;
9
- getNumber(key: string): Promise<number>;
10
- putNumber(key: string, value: number): Promise<void>;
11
- putBigInt(key: string, value: bigint): Promise<void>;
12
- putJson(key: string, value: any): Promise<void>;
13
- putStr(key: string, value: string): Promise<void>;
14
- clear(): void;
15
- }
16
- //# sourceMappingURL=storage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,qBAAa,WAAY,YAAW,OAAO;IACvC,OAAO,CAAC,MAAM,CAAsB;;IAMpC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKlC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAQvC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAQlC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAQpC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAQvC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKpD,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKpD,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAK/C,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKjD,KAAK;CAIR"}
package/lib/storage.js DELETED
@@ -1,61 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TestStorage = void 0;
4
- class TestStorage {
5
- constructor() {
6
- this.stored = new Map();
7
- }
8
- delete(key) {
9
- this.stored.delete(key);
10
- return Promise.resolve(undefined);
11
- }
12
- getBigInt(key) {
13
- let value = this.stored.get(key);
14
- if (value === undefined) {
15
- return Promise.resolve(BigInt(0));
16
- }
17
- return Promise.resolve(BigInt(value));
18
- }
19
- getJson(key) {
20
- let value = this.stored.get(key);
21
- if (value === undefined) {
22
- return Promise.resolve({});
23
- }
24
- return Promise.resolve(JSON.parse(value));
25
- }
26
- getStr(key) {
27
- let value = this.stored.get(key);
28
- if (value === undefined) {
29
- return Promise.resolve("");
30
- }
31
- return Promise.resolve(value);
32
- }
33
- getNumber(key) {
34
- let value = this.stored.get(key);
35
- if (value === undefined) {
36
- return Promise.resolve(0);
37
- }
38
- return Promise.resolve(Number(value));
39
- }
40
- putNumber(key, value) {
41
- this.stored.set(key, value.toString());
42
- return Promise.resolve();
43
- }
44
- putBigInt(key, value) {
45
- this.stored.set(key, value.toString());
46
- return Promise.resolve();
47
- }
48
- putJson(key, value) {
49
- this.stored.set(key, JSON.stringify(value));
50
- return Promise.resolve();
51
- }
52
- putStr(key, value) {
53
- this.stored.set(key, value);
54
- return Promise.resolve();
55
- }
56
- clear() {
57
- this.stored = new Map();
58
- }
59
- }
60
- exports.TestStorage = TestStorage;
61
- //# sourceMappingURL=storage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":";;;AAEA,MAAa,WAAW;IAGpB;QACI,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC5C,CAAC;IAED,MAAM,CAAC,GAAW;QACd,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QACvB,OAAO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