@tenderly/actions-test 0.0.15 → 0.1.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/README.md CHANGED
@@ -4,6 +4,6 @@ Tenderly Web3 Actions will run your code in response to on-chain (or even off-ch
4
4
 
5
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.
6
6
 
7
- The code Web3 Actions run is called a function. Function must be written in TypeScript (or JavaScript) and runs in Node 14 runtime. Specification of events that your action listens to is called a trigger.
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.
8
8
 
9
9
  To get started, see [docs](https://docs.tenderly.co/web3-actions/intro-to-web3-actions).
package/lib/gateways.d.ts CHANGED
@@ -3,5 +3,6 @@ export declare class TestGateways implements Gateways {
3
3
  private gatewayConfig;
4
4
  constructor();
5
5
  getGateway(network: Network, name?: string | undefined): string;
6
+ setConfig(name: string, config: any): void;
6
7
  }
7
8
  //# sourceMappingURL=gateways.d.ts.map
@@ -1 +1 @@
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;CAIlE"}
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 CHANGED
@@ -7,7 +7,10 @@ class TestGateways {
7
7
  }
8
8
  getGateway(network, name) {
9
9
  const gatewayConfig = this.gatewayConfig.get(name ?? "");
10
- return `https://${network}.gateway.tenderly.co/${gatewayConfig.accessKey}`;
10
+ return `https://${network}.gateway.tenderly.co/${gatewayConfig?.accessKey}`;
11
+ }
12
+ setConfig(name, config) {
13
+ this.gatewayConfig.set(name, config);
11
14
  }
12
15
  }
13
16
  exports.TestGateways = TestGateways;
@@ -1 +1 @@
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,CAAC,SAAS,EAAE,CAAA;IAC9E,CAAC;CACJ;AAXD,oCAWC"}
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/runtime.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import { ActionFn, Context, Event, Gateways } from "@tenderly/actions";
1
+ import { ActionFn, Context, Event } from "@tenderly/actions";
2
2
  import { TestSecrets } from "./secrets";
3
3
  import { TestStorage } from "./storage";
4
+ import { TestGateways } from "./gateways";
4
5
  export declare class TestContext implements Context {
5
6
  secrets: TestSecrets;
6
7
  storage: TestStorage;
7
- gateways: Gateways;
8
+ gateways: TestGateways;
8
9
  constructor();
9
10
  }
10
11
  export declare class TestRuntime {
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AACtC,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AAGtC,qBAAa,WAAY,YAAW,OAAO;IACvC,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;;CAOtB;AAED,qBAAa,WAAW;IACpB,OAAO,EAAE,WAAW,CAAC;;IAMf,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;CAG/D"}
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,IAAI,CAAC;CAG/D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenderly/actions-test",
3
- "version": "0.0.15",
3
+ "version": "0.1.0",
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.0.13"
31
+ "@tenderly/actions": "^0.1.0"
32
32
  }
33
33
  }