@everyprotocol/every-cli 0.1.14 → 0.1.15

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/dist/cmdgen.js CHANGED
@@ -25,7 +25,6 @@ const getWriteAction = (config, funcName, abiFunc, abi) => async function writeA
25
25
  const address = config.getContract(conf, this.args, abiFunc);
26
26
  const account = walletClient.account;
27
27
  const simulation = { address, abi, functionName: funcName, args, account };
28
- console.log({ address, functionName: funcName, args, account });
29
28
  await submitSimulation(simulation, publicClient, walletClient, new Logger(opts));
30
29
  };
31
30
  export const getCommandGen = (config) => function genCmd(cmdName) {
@@ -5,13 +5,14 @@ import path from "path";
5
5
  import columify from "columnify";
6
6
  import { j11String, loadBinary, loadJson } from "../utils.js";
7
7
  import { submitTransaction } from "../substrate.js";
8
- import { network } from "../commander-patch.js";
8
+ import { network, universe } from "../commander-patch.js";
9
9
  import { Logger } from "../logger.js";
10
10
  import { compileEnumCsv, compilePermCsv, computeHash, parseFileSpec, specToInput, } from "../matter.js";
11
11
  const matterRegisterCmd = new Command("register")
12
12
  .description("Register matters")
13
13
  .argument("<files...>", "Paths of matter blob files")
14
14
  .addOption(network)
15
+ .addOption(universe)
15
16
  .addKeystoreOptions()
16
17
  .addOutputOptions()
17
18
  .subWriteAction(async function (api, pair, files) {
package/dist/from-opts.js CHANGED
@@ -67,22 +67,21 @@ export const FromOpts = {
67
67
  }
68
68
  return universe;
69
69
  },
70
- getObserverConfig: function (options) {
70
+ getObserverConfig: function (opts) {
71
71
  const conf = loadMergedConfig();
72
72
  let observerName;
73
- const DEFAULT_OBSERVER = "localnet";
74
- if (options.network) {
75
- observerName = options.network;
73
+ if (opts.network) {
74
+ observerName = opts.network;
76
75
  }
77
- else if (options.universe) {
78
- const universe = conf.universes[options.universe];
76
+ else if (opts.universe) {
77
+ const universe = conf.universes[opts.universe];
79
78
  if (!universe) {
80
- throw new Error(`Universe '${options.universe}' not found in config. Available: ${Object.keys(conf.universes).join(", ")}`);
79
+ throw new Error(`Universe '${opts.universe}' not found in config. Available: ${Object.keys(conf.universes).join(", ")}`);
81
80
  }
82
81
  observerName = universe.observer;
83
82
  }
84
83
  else {
85
- observerName = DEFAULT_OBSERVER;
84
+ observerName = "local";
86
85
  }
87
86
  if (!observerName) {
88
87
  throw new Error(`No observer resolved from options or config.`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@everyprotocol/every-cli",
3
3
  "type": "module",
4
- "version": "0.1.14",
4
+ "version": "0.1.15",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/everyprotocol/cli.git"