fix linting

pull/5778/head
yann300 1 week ago committed by Aniket
parent 7043174d62
commit 50ff0f12d6
  1. 50
      libs/remix-debug/test/decoder/stateTests/revert-state-sub-call.ts

@ -81,43 +81,43 @@ function testRevertStateSubCall (st, privateKey, contractAddress, output, compil
stateDecoder.decodeState(stateVarsMyContract, storageViewerMyContract).then((result) => { stateDecoder.decodeState(stateVarsMyContract, storageViewerMyContract).then((result) => {
const contractAddressOtherContract = result['myCall'].value const contractAddressOtherContract = result['myCall'].value
const storageViewerOtherContract1 = new StorageViewer({ const storageViewerOtherContract1 = new StorageViewer({
stepIndex: 300, stepIndex: 300,
tx: tx, tx: tx,
address: contractAddressOtherContract address: contractAddressOtherContract
}, new StorageResolver({ web3 }), traceManager) }, new StorageResolver({ web3 }), traceManager)
const storageViewerOtherContract2 = new StorageViewer({ const storageViewerOtherContract2 = new StorageViewer({
stepIndex: 550, stepIndex: 550,
tx: tx, tx: tx,
address: contractAddressOtherContract address: contractAddressOtherContract
}, new StorageResolver({ web3 }), traceManager) }, new StorageResolver({ web3 }), traceManager)
const storageViewerOtherContract3 = new StorageViewer({ const storageViewerOtherContract3 = new StorageViewer({
stepIndex: 556, stepIndex: 556,
tx: tx, tx: tx,
address: contractAddressOtherContract address: contractAddressOtherContract
}, new StorageResolver({ web3 }), traceManager) }, new StorageResolver({ web3 }), traceManager)
const stateVars = stateDecoder.extractStateVariables('OtherContract', output.sources) const stateVars = stateDecoder.extractStateVariables('OtherContract', output.sources)
stateDecoder.decodeState(stateVars, storageViewerOtherContract1).then((result) => { stateDecoder.decodeState(stateVars, storageViewerOtherContract1).then((result) => {
// value should be set // value should be set
st.equal(result['p'].value, '234') st.equal(result['p'].value, '234')
stateDecoder.decodeState(stateVars, storageViewerOtherContract2).then((result) => { stateDecoder.decodeState(stateVars, storageViewerOtherContract2).then((result) => {
// in the other sub call, the value is reverted // in the other sub call, the value is reverted
st.equal(result['p'].value, '0') st.equal(result['p'].value, '0')
stateDecoder.decodeState(stateVars, storageViewerOtherContract3).then((result) => { stateDecoder.decodeState(stateVars, storageViewerOtherContract3).then((result) => {
// and reset back to 234 // and reset back to 234
st.equal(result['p'].value, '234') st.equal(result['p'].value, '234')
cb() cb()
}, (reason) => { }, (reason) => {
console.log('fail') console.log('fail')
st.end(reason) st.end(reason)
})
}) })
}, (reason) => {
console.log('fail')
st.end(reason)
}) })
}, (reason) => {
console.log('fail')
st.end(reason)
})
}) })
}, (reason) => { }, (reason) => {
console.log('fail') console.log('fail')

Loading…
Cancel
Save