|
|
@ -35,7 +35,13 @@ class TxGasUtil { |
|
|
|
txMeta.simulationFails = { |
|
|
|
txMeta.simulationFails = { |
|
|
|
reason: err.message, |
|
|
|
reason: err.message, |
|
|
|
errorKey: err.errorKey, |
|
|
|
errorKey: err.errorKey, |
|
|
|
|
|
|
|
debug: { blockNumber: block.number, blockGasLimit: block.gasLimit }, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (err.errorKey === TRANSACTION_NO_CONTRACT_ERROR_KEY) { |
|
|
|
|
|
|
|
txMeta.simulationFails.debug.getCodeResponse = err.getCodeResponse |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return txMeta |
|
|
|
return txMeta |
|
|
|
} |
|
|
|
} |
|
|
|
this.setTxGas(txMeta, block.gasLimit, estimatedGasHex) |
|
|
|
this.setTxGas(txMeta, block.gasLimit, estimatedGasHex) |
|
|
@ -74,6 +80,9 @@ class TxGasUtil { |
|
|
|
const err = new Error('TxGasUtil - Trying to call a function on a non-contract address') |
|
|
|
const err = new Error('TxGasUtil - Trying to call a function on a non-contract address') |
|
|
|
// set error key so ui can display localized error message
|
|
|
|
// set error key so ui can display localized error message
|
|
|
|
err.errorKey = TRANSACTION_NO_CONTRACT_ERROR_KEY |
|
|
|
err.errorKey = TRANSACTION_NO_CONTRACT_ERROR_KEY |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// set the response on the error so that we can see in logs what the actual response was
|
|
|
|
|
|
|
|
err.getCodeResponse = code |
|
|
|
throw err |
|
|
|
throw err |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|