@@ -10,8 +10,9 @@ it('should apply state overrides on previously deployed contract', async () => {
1010 let callGetDeployer = deployed . contract . methods . getDeployer ( ) . encodeABI ( )
1111
1212 const initValue = 1337
13- let result = await web3 . eth . call ( { to : contractAddress , data : callRetrieve } , 'latest' )
14- assert . equal ( result , initValue )
13+ const raw = await web3 . eth . call ( { to : contractAddress , data : callRetrieve } , 'latest' )
14+ const decoded = web3 . eth . abi . decodeParameter ( 'uint256' , raw )
15+ assert . strictEqual ( Number ( decoded ) , initValue )
1516
1617 // check that `eth_call` can handle `stateDiff` state overrides
1718 // override only the first storage slot
@@ -188,8 +189,9 @@ it('should apply state overrides on non-existent contract', async () => {
188189 let callGetDeployer = deployed . contract . methods . getDeployer ( ) . encodeABI ( )
189190
190191 const initValue = 1337
191- let result = await web3 . eth . call ( { to : deployed . receipt . contractAddress , data : callRetrieve } , 'latest' )
192- assert . equal ( result , initValue )
192+ const raw = await web3 . eth . call ( { to : deployed . receipt . contractAddress , data : callRetrieve } , 'latest' )
193+ const decoded = web3 . eth . abi . decodeParameter ( 'uint256' , raw )
194+ assert . strictEqual ( Number ( decoded ) , initValue )
193195
194196 // check that `eth_call` can handle `stateDiff` state overrides
195197 // override only the first storage slot
0 commit comments