From f949792297999d8b33a38459cff6101fc2110982 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 10 May 2021 11:06:07 +0200 Subject: [PATCH] make sure contract abi is passed to the whols stack --- apps/remix-ide/src/blockchain/blockchain.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/src/blockchain/blockchain.js b/apps/remix-ide/src/blockchain/blockchain.js index 27f9be195d..a5afab15c5 100644 --- a/apps/remix-ide/src/blockchain/blockchain.js +++ b/apps/remix-ide/src/blockchain/blockchain.js @@ -262,6 +262,10 @@ class Blockchain { } if (funABI.type === 'fallback') data.dataHex = value + if (data) { + data.contractName = contractName + data.contractABI = contractAbi + } const useCall = funABI.stateMutability === 'view' || funABI.stateMutability === 'pure' this.runTx({ to: address, data, useCall }, confirmationCb, continueCb, promptCb, (error, txResult, _address, returnValue) => { if (error) { @@ -477,7 +481,7 @@ class Blockchain { if (execResult) { // if it's not the VM, we don't have return value. We only have the transaction, and it does not contain the return value. returnValue = (execResult && isVM) ? execResult.returnValue : txResult - const vmError = txExecution.checkVMError(execResult) + const vmError = txExecution.checkVMError(execResult, args.data.contractABI) if (vmError.error) { return cb(vmError.message) }