agoric 0.21.2-dev-c50ca19.0 → 0.21.2-dev-f5f34f4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agoric",
3
- "version": "0.21.2-dev-c50ca19.0+c50ca19",
3
+ "version": "0.21.2-dev-f5f34f4.0+f5f34f4",
4
4
  "description": "Manage the Agoric Javascript smart contract platform",
5
5
  "type": "module",
6
6
  "main": "src/main.js",
@@ -28,25 +28,25 @@
28
28
  "lint:eslint": "eslint ."
29
29
  },
30
30
  "devDependencies": {
31
- "@agoric/deploy-script-support": "0.10.4-dev-c50ca19.0+c50ca19",
31
+ "@agoric/deploy-script-support": "0.10.4-dev-f5f34f4.0+f5f34f4",
32
32
  "ava": "^5.3.0",
33
33
  "c8": "^7.13.0"
34
34
  },
35
35
  "dependencies": {
36
- "@agoric/access-token": "0.4.22-dev-c50ca19.0+c50ca19",
37
- "@agoric/assert": "0.6.1-dev-c50ca19.0+c50ca19",
38
- "@agoric/cache": "0.3.3-dev-c50ca19.0+c50ca19",
39
- "@agoric/casting": "0.4.3-dev-c50ca19.0+c50ca19",
40
- "@agoric/cosmic-proto": "0.3.1-dev-c50ca19.0+c50ca19",
41
- "@agoric/ertp": "0.16.3-dev-c50ca19.0+c50ca19",
42
- "@agoric/inter-protocol": "0.16.2-dev-c50ca19.0+c50ca19",
43
- "@agoric/internal": "0.3.3-dev-c50ca19.0+c50ca19",
44
- "@agoric/smart-wallet": "0.5.4-dev-c50ca19.0+c50ca19",
45
- "@agoric/store": "0.9.3-dev-c50ca19.0+c50ca19",
46
- "@agoric/swingset-vat": "0.32.3-dev-c50ca19.0+c50ca19",
47
- "@agoric/vats": "0.15.2-dev-c50ca19.0+c50ca19",
48
- "@agoric/zoe": "0.26.3-dev-c50ca19.0+c50ca19",
49
- "@agoric/zone": "0.2.3-dev-c50ca19.0+c50ca19",
36
+ "@agoric/access-token": "0.4.22-dev-f5f34f4.0+f5f34f4",
37
+ "@agoric/assert": "0.6.1-dev-f5f34f4.0+f5f34f4",
38
+ "@agoric/cache": "0.3.3-dev-f5f34f4.0+f5f34f4",
39
+ "@agoric/casting": "0.4.3-dev-f5f34f4.0+f5f34f4",
40
+ "@agoric/cosmic-proto": "0.3.1-dev-f5f34f4.0+f5f34f4",
41
+ "@agoric/ertp": "0.16.3-dev-f5f34f4.0+f5f34f4",
42
+ "@agoric/inter-protocol": "0.16.2-dev-f5f34f4.0+f5f34f4",
43
+ "@agoric/internal": "0.3.3-dev-f5f34f4.0+f5f34f4",
44
+ "@agoric/smart-wallet": "0.5.4-dev-f5f34f4.0+f5f34f4",
45
+ "@agoric/store": "0.9.3-dev-f5f34f4.0+f5f34f4",
46
+ "@agoric/swingset-vat": "0.32.3-dev-f5f34f4.0+f5f34f4",
47
+ "@agoric/vats": "0.15.2-dev-f5f34f4.0+f5f34f4",
48
+ "@agoric/zoe": "0.26.3-dev-f5f34f4.0+f5f34f4",
49
+ "@agoric/zone": "0.2.3-dev-f5f34f4.0+f5f34f4",
50
50
  "@confio/relayer": "^0.9.0",
51
51
  "@cosmjs/crypto": "^0.30.1",
52
52
  "@cosmjs/encoding": "^0.30.1",
@@ -92,5 +92,5 @@
92
92
  "timeout": "2m",
93
93
  "workerThreads": false
94
94
  },
95
- "gitHead": "c50ca190ec2254d16e6d15d8f1235fcb4aa63560"
95
+ "gitHead": "f5f34f4ad80a92d66f74e588e0fa119dfc99ca31"
96
96
  }
@@ -205,6 +205,10 @@ export const makeInterCommand = (
205
205
  const interCmd = createCommand('inter')
206
206
  .description('Inter Protocol commands for liquidation bidding etc.')
207
207
  .option('--home <dir>', 'agd CosmosSDK application home directory')
208
+ .option(
209
+ '--fees <amount>',
210
+ 'set fees for transaction broadcast (e.g. 5000ubld)',
211
+ )
208
212
  .option(
209
213
  '--keyring-backend <os|file|test>',
210
214
  `keyring's backend (os|file|test) (default "${
@@ -337,10 +341,10 @@ inter auction status
337
341
  const { networkConfig, agoricNames, pollOffer } = tools;
338
342
  const io = { ...networkConfig, execFileSync, delay, stdout };
339
343
 
340
- const { home, keyringBackend: backend } = interCmd.opts();
344
+ const { home, keyringBackend: backend, fees } = interCmd.opts();
341
345
  const result = await sendAction(
342
346
  { method: 'executeOffer', offer },
343
- { keyring: { home, backend }, from, verbose: false, dryRun, ...io },
347
+ { keyring: { home, backend }, from, fees, verbose: false, dryRun, ...io },
344
348
  );
345
349
  if (dryRun) {
346
350
  return;
package/src/lib/chain.js CHANGED
@@ -38,6 +38,7 @@ harden(normalizeAddressWithOptions);
38
38
  * @param {ReadonlyArray<string>} swingsetArgs
39
39
  * @param {import('./rpc').MinimalNetworkConfig & {
40
40
  * from: string,
41
+ * fees?: string,
41
42
  * dryRun?: boolean,
42
43
  * verbose?: boolean,
43
44
  * keyring?: {home?: string, backend: string}
@@ -48,6 +49,7 @@ harden(normalizeAddressWithOptions);
48
49
  export const execSwingsetTransaction = (swingsetArgs, opts) => {
49
50
  const {
50
51
  from,
52
+ fees,
51
53
  dryRun = false,
52
54
  verbose = true,
53
55
  keyring = undefined,
@@ -60,9 +62,11 @@ export const execSwingsetTransaction = (swingsetArgs, opts) => {
60
62
  const backendOpt = keyring?.backend
61
63
  ? [`--keyring-backend=${keyring.backend}`]
62
64
  : [];
65
+ const feeOpt = fees ? ['--fees', fees] : [];
63
66
  const cmd = [`--node=${rpcAddrs[0]}`, `--chain-id=${chainName}`].concat(
64
67
  homeOpt,
65
68
  backendOpt,
69
+ feeOpt,
66
70
  [`--from=${from}`, 'tx', 'swingset'],
67
71
  swingsetArgs,
68
72
  );
@@ -75,7 +79,15 @@ export const execSwingsetTransaction = (swingsetArgs, opts) => {
75
79
  } else {
76
80
  const yesCmd = cmd.concat(['--yes']);
77
81
  if (verbose) console.log('Executing ', yesCmd);
78
- return execFileSync(agdBinary, yesCmd, { encoding: 'utf-8' });
82
+ const out = execFileSync(agdBinary, yesCmd, { encoding: 'utf-8' });
83
+
84
+ // agd puts this diagnostic on stdout rather than stderr :-/
85
+ // "Default sign-mode 'direct' not supported by Ledger, using sign-mode 'amino-json'.
86
+ if (out.startsWith('Default sign-mode')) {
87
+ const stripDiagnostic = out.replace(/^Default[^\n]+\n/, '');
88
+ return stripDiagnostic;
89
+ }
90
+ return out;
79
91
  }
80
92
  };
81
93
  harden(execSwingsetTransaction);
package/src/lib/wallet.js CHANGED
@@ -131,6 +131,7 @@ export const coalesceWalletState = async (follower, invitationBrand) => {
131
131
  * @param {import('@agoric/smart-wallet/src/smartWallet').BridgeAction} bridgeAction
132
132
  * @param {import('./rpc').MinimalNetworkConfig & {
133
133
  * from: string,
134
+ * fees?: string,
134
135
  * verbose?: boolean,
135
136
  * keyring?: {home?: string, backend: string},
136
137
  * stdout: Pick<import('stream').Writable, 'write'>,
@@ -158,7 +159,7 @@ export const sendAction = async (bridgeAction, opts) => {
158
159
  assert(out); // not dry run
159
160
  const tx = JSON.parse(out);
160
161
  if (tx.code !== 0) {
161
- const err = Error(`failed to send action. code: ${tx.code}`);
162
+ const err = Error(`failed to send tx: ${tx.raw_log} code: ${tx.code}`);
162
163
  // @ts-expect-error XXX how to add properties to an error?
163
164
  err.code = tx.code;
164
165
  throw err;