diff --git a/packages/synthetic-chain/src/lib/agd-lib.ts b/packages/synthetic-chain/src/lib/agd-lib.ts index 68afb7c5..412f68ec 100644 --- a/packages/synthetic-chain/src/lib/agd-lib.ts +++ b/packages/synthetic-chain/src/lib/agd-lib.ts @@ -77,7 +77,8 @@ export const makeAgd = ({ }); const rw = freeze({ /** - * TODO: gas + * @param {string[]} txArgs + * @param {{ chainId: string, from: string, yes?: boolean }} opts */ tx: async ( txArgs: string[], @@ -95,6 +96,8 @@ export const makeAgd = ({ ...[`--from`, from], 'tx', ...['--broadcast-mode', 'block'], + ...['--gas', 'auto'], + ...['--gas-adjustment', '1.3'], ...txArgs, ...yesArg, ...outJson, diff --git a/packages/synthetic-chain/src/lib/cliHelper.js b/packages/synthetic-chain/src/lib/cliHelper.js index cc56d473..98f0e666 100644 --- a/packages/synthetic-chain/src/lib/cliHelper.js +++ b/packages/synthetic-chain/src/lib/cliHelper.js @@ -16,7 +16,14 @@ export const agd = { return JSON.parse(data); }, tx: async (...params) => { - const newParams = ['tx', '-bblock', ...params, '-o json']; + const newParams = [ + 'tx', + '-bblock', + '--gas auto', + '--gas-adjustment 1.3', + ...params, + '-o json', + ]; const data = await executeCommand(BINARY, newParams, { shell: true }); return JSON.parse(data); }, diff --git a/packages/synthetic-chain/src/lib/commonUpgradeHelpers.js b/packages/synthetic-chain/src/lib/commonUpgradeHelpers.js index ecbb422d..1c2e8db6 100644 --- a/packages/synthetic-chain/src/lib/commonUpgradeHelpers.js +++ b/packages/synthetic-chain/src/lib/commonUpgradeHelpers.js @@ -275,7 +275,6 @@ export const installBundle = async (addr, bundlePath) => { '--from', addr, '--keyring-backend=test', - '--gas=auto', '--chain-id', CHAINID, '-bblock', @@ -301,8 +300,6 @@ export const submitProposal = async ( '--from', VALIDATORADDR, '--keyring-backend=test', - '--gas=auto', - '--gas-adjustment=1.2', '--chain-id', CHAINID, '-bblock', diff --git a/packages/synthetic-chain/src/lib/core-eval.ts b/packages/synthetic-chain/src/lib/core-eval.ts index 98a4c2b4..c85087e7 100644 --- a/packages/synthetic-chain/src/lib/core-eval.ts +++ b/packages/synthetic-chain/src/lib/core-eval.ts @@ -171,7 +171,7 @@ export const passCoreEvalProposal = async ( const bundleRd = path.join(dir, fileName); const result = await agd.tx( - ['swingset', 'install-bundle', `@${bundleRd}`, '--gas', 'auto'], + ['swingset', 'install-bundle', `@${bundleRd}`], { from, chainId, yes: true }, ); console.log(txAbbr(result)); @@ -224,7 +224,6 @@ export const passCoreEvalProposal = async ( 'swingset-core-eval', ...evalPaths, ...flags({ ...info, deposit }), - ...flags({ gas: 'auto', 'gas-adjustment': '1.2' }), ], { from, chainId, yes: true }, );