You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checked code of web3-eth-contract/lib/commonjs/contract.js and from what I see it looks like this.config.contractDataInputFill used only to set it to this._dataInputFill and when called setConfig with contractDataInputFill it doesnt override this._dataInputFill.
Expected behavior
this code should override transaction input/data behavior
const token = new this.web3.eth.Contract(ERC20Abi);
token.setConfig({ contractDataInputFill: 'both' });
Actual behavior
Transaction sent with behavior of initial contractDataInputFill value
Steps to reproduce the behavior
this should throw exception if used in local hardhat node
const token = new this.web3.eth.Contract(ERC20Abi);
token.setConfig({ contractDataInputFill: 'both' });
token.methods.decimals().call();
Logs
this will log 'input'
const token = new this.web3.eth.Contract(ERC20Abi);
token.setConfig({ contractDataInputFill: 'both' });
console.log(token['_dataInputFill']);
Environment
"web3": "^4.2.1"
The text was updated successfully, but these errors were encountered:
Many thanks @Zahar44 for opening the issue and suggesting a workaround. This is helpful till the issue is fixed at #6555.
However, I am closing this issue in favor of keeping the discussion on #6555.
I checked code of web3-eth-contract/lib/commonjs/contract.js and from what I see it looks like this.config.contractDataInputFill used only to set it to this._dataInputFill and when called setConfig with contractDataInputFill it doesnt override this._dataInputFill.
Expected behavior
this code should override transaction input/data behavior
Actual behavior
Transaction sent with behavior of initial contractDataInputFill value
Steps to reproduce the behavior
this should throw exception if used in local hardhat node
Logs
this will log 'input'
Environment
"web3": "^4.2.1"
The text was updated successfully, but these errors were encountered: