(options, action)
| 41 | }; |
| 42 | |
| 43 | async function getGasLimit(options, action) { |
| 44 | let block = await web3.eth.getBlock('latest'); |
| 45 | let networkGasLimit = block.gasLimit; |
| 46 | let gas = Math.round(options.factor * (await action.estimateGas({ from: options.from.address, value: options.value }))); |
| 47 | return (gas > networkGasLimit) ? networkGasLimit : gas; |
| 48 | } |
| 49 | |
| 50 | async function checkPermissions(action) { |
| 51 | let contractRegistry = await connect(action._parent.options.jsonInterface, action._parent._address); |