diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-23 04:44:48 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-23 06:27:17 +0800 |
commit | 9740199870d83dc999079883754ec512c1ff544b (patch) | |
tree | 0b46e10e53924f385d12e1e03684ab7e4c7ee43f /packages/sol-cov/src/trace.ts | |
parent | 06be580d2cbe7e3543d8c4deeb4d1c22b325e6a7 (diff) | |
download | dexon-0x-contracts-9740199870d83dc999079883754ec512c1ff544b.tar dexon-0x-contracts-9740199870d83dc999079883754ec512c1ff544b.tar.gz dexon-0x-contracts-9740199870d83dc999079883754ec512c1ff544b.tar.bz2 dexon-0x-contracts-9740199870d83dc999079883754ec512c1ff544b.tar.lz dexon-0x-contracts-9740199870d83dc999079883754ec512c1ff544b.tar.xz dexon-0x-contracts-9740199870d83dc999079883754ec512c1ff544b.tar.zst dexon-0x-contracts-9740199870d83dc999079883754ec512c1ff544b.zip |
Fix sol-cov tests
Diffstat (limited to 'packages/sol-cov/src/trace.ts')
-rw-r--r-- | packages/sol-cov/src/trace.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/sol-cov/src/trace.ts b/packages/sol-cov/src/trace.ts index feebaaab5..389bd8309 100644 --- a/packages/sol-cov/src/trace.ts +++ b/packages/sol-cov/src/trace.ts @@ -27,7 +27,9 @@ export function getTracesByContractAddress(structLogs: StructLog[], startAddress const currentAddress = _.last(callStack) as string; const jumpAddressOffset = structLog.op === OpCode.DelegateCall ? 4 : 2; const newAddress = addressUtils.padZeros( - new BigNumber(addHexPrefix(structLog.stack[structLog.stack.length - jumpAddressOffset])).toString(16), + new BigNumber(addHexPrefix(structLog.stack[structLog.stack.length - jumpAddressOffset - 1])).toString( + 16, + ), ); if (structLog === _.last(structLogs)) { throw new Error('CALL-like opcode can not be the last one'); |