{"_id":"@0yi0/remix-debug","_rev":"2-43a5fe2b27fe94196e1e21f576a2d8cf","name":"@0yi0/remix-debug","dist-tags":{"latest":"0.2.14-0.0.1"},"versions":{"0.2.14":{"name":"@0yi0/remix-debug","version":"0.2.14","description":"Ethereum IDE and tools for the web","contributors":[{"name":"Yann Levreau","email":"yann@ethdev.com"},{"name":"Liana Husikyan","email":"liana@ethdev.com"}],"main":"./index.js","dependencies":{"babel-eslint":"^7.1.1","babel-plugin-transform-object-assign":"^6.22.0","babel-preset-es2015":"^6.24.0","babelify":"^7.3.0","ethereumjs-util":"^4.5.0","ethereumjs-vm":"2.4.0","fast-async":"^6.1.2","notify-error":"^1.2.0","npm-run-all":"^4.1.2","remix-lib":"0.3.13","solc":"^0.5.0"},"devDependencies":{"standard":"^7.0.1","standard-reporter":"^1.0.5","tape":"^4.6.0"},"scripts":{"build":"mkdirp build; browserify index.js > build/app.js","lint":"standard | notify-error","test":"standard && tape ./test/tests.js","linkjsvmlib":"cd node_modules/ethereumjs-vm && rm -rf dist && ln -s ~/ethereumjs-vm/dist dist","postinstall":"cd node_modules/solc && wget --no-check-certificate -O soljson.js https://github.com/CyberMiles/lity/releases/download/v1.2.7/lity-v1.2.7-js"},"repository":{"type":"git","url":"git+https://github.com/ethereum/remix.git"},"author":{"name":"cpp-ethereum team"},"license":"MIT","bugs":{"url":"https://github.com/ethereum/remix/issues"},"homepage":"https://github.com/ethereum/remix#readme","standard":{"ignore":["node_modules/*","build/*","test/resources/*"],"parser":"babel-eslint"},"browserify":{"transform":[["babelify",{"plugins":[["fast-async",{"runtimePatten":null,"compiler":{"promises":true,"es7":true,"noRuntime":true,"wrapAwait":true}}],"transform-object-assign"]}],["babelify",{"presets":["es2015"]}]]},"_id":"@0yi0/remix-debug@0.2.14","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-KeKcRJ5br1e9PBlxFEDBSBTffPJlZMWj39X2fQQ55PbWXTVN3ZZgjxAgk08NSf6D3MOMQcEM8QDv/Gqwdn349A==","shasum":"abf742fbbde51356e6965cd44336a8d79075090e","tarball":"https://registry.npmjs.org/@0yi0/remix-debug/-/remix-debug-0.2.14.tgz","fileCount":57,"unpackedSize":210675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdY5LQCRA9TVsSAnZWagAAT3sP/1keSEiyugoLl9cjD0y2\nfb7ODPkLIMTOZwIxgdfWtQVTorlsgIGYihxjEbfhe+IOdGM4y+bQKjUWSdmZ\nnhgM2Syp+V+lpdgEHfLwJAt1Mlvftcnj+07vEMW3ge6JPNSiGmj2LKv9+leU\n5MTmljaFyWHmjRVRfF+oDQCIpRTNLsnDh8/flEuXDaKmM74f6zL+AKvn+pmd\nix+alBJWlbo1NW85ecX4BvvTN/wBVI9xzLzO7g9uLr33Sok9/VHxMaSMmXjR\niIUL4C4BGU7DpOz0du4d0PsTpD4dLAXb1zVqUAnumBFnCVluIfi4KAkHZqpC\nAJpm0T9pyldcsUuX1M+x1VKFBpzEHvfBAwwJmbcDSxawoFXduFTWgiarOBXG\nF0TkXBFmTzHX5ipuu3ruuPHnEtZPVrMUSVko4xZAm7gwR3eCFjllP0HgXVaI\nCUmWR5PdHX0hVWagwkd5cr0RXgJslIMJ7zMxsxOHGXQjNDv++a8QxrxJ9gTY\nxLY664oovRtmnmdGFiRo/Cwrz4jjVAUwyT5nxw6oHQD2y66hokWTgBi6Fbho\nsV3qSKEQNtk9BWI8Uo40gnGXKQQevg128YhqwAHPXaAwFZ15zHcjs+6NRYpw\nYBtDE3zCgM/5eMrXqd27dqnHoNMb8rXq7NnVdZXaKyjafzHXII87eJ12U5VD\nf+wi\r\n=A6k2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1iyVGwK6ZIfgOlXp/orTpxZILXEI6R1XS0hibDqDiXgIhAJFifRmV2DDIyNap+9uvn/vHB01z17raz8a5B+1lbiRI"}]},"maintainers":[{"name":"0yi0","email":"yi@secondstate.io"}],"_npmUser":{"name":"0yi0","email":"yi@secondstate.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remix-debug_0.2.14_1566806736069_0.6705698235610573"},"_hasShrinkwrap":false},"0.2.14-0.0.1":{"name":"@0yi0/remix-debug","version":"0.2.14-0.0.1","description":"Ethereum IDE and tools for the web","contributors":[{"name":"Yann Levreau","email":"yann@ethdev.com"},{"name":"Liana Husikyan","email":"liana@ethdev.com"}],"main":"./index.js","dependencies":{"babel-eslint":"^7.1.1","babel-plugin-transform-object-assign":"^6.22.0","babel-preset-es2015":"^6.24.0","babelify":"^7.3.0","ethereumjs-util":"^4.5.0","ethereumjs-vm":"2.4.0","fast-async":"^6.1.2","notify-error":"^1.2.0","npm-run-all":"^4.1.2","remix-lib":"0.3.13","solc":"^0.5.0"},"devDependencies":{"standard":"^7.0.1","standard-reporter":"^1.0.5","tape":"^4.6.0"},"scripts":{"build":"mkdirp build; browserify index.js > build/app.js","lint":"standard | notify-error","test":"standard && tape ./test/tests.js","linkjsvmlib":"cd node_modules/ethereumjs-vm && rm -rf dist && ln -s ~/ethereumjs-vm/dist dist","setup:solc":"cd node_modules/solc && wget --no-check-certificate -O soljson.js https://github.com/CyberMiles/lity/releases/download/v1.2.7/lity-v1.2.7-js"},"repository":{"type":"git","url":"git+https://github.com/ethereum/remix.git"},"author":{"name":"cpp-ethereum team"},"license":"MIT","bugs":{"url":"https://github.com/ethereum/remix/issues"},"homepage":"https://github.com/ethereum/remix#readme","standard":{"ignore":["node_modules/*","build/*","test/resources/*"],"parser":"babel-eslint"},"browserify":{"transform":[["babelify",{"plugins":[["fast-async",{"runtimePatten":null,"compiler":{"promises":true,"es7":true,"noRuntime":true,"wrapAwait":true}}],"transform-object-assign"]}],["babelify",{"presets":["es2015"]}]]},"_id":"@0yi0/remix-debug@0.2.14-0.0.1","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-m4F7wlJ8dalvwQK42k7enN9IxCjMBYi5QBDouP//gxcl/zkskx2zdf8cON+EIz4+Otdv+v2bHVfLmbS6BzjyQQ==","shasum":"9b8533a4eef8759c29b3499644f0dbbd67f9ae1d","tarball":"https://registry.npmjs.org/@0yi0/remix-debug/-/remix-debug-0.2.14-0.0.1.tgz","fileCount":57,"unpackedSize":210680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZN7iCRA9TVsSAnZWagAABd8P/ieLN+7Lm0DOIZjZhvpe\nLsrrkxZW9Q+oCbW/5TFXHQUrW6+79UTGRdbeN1jgg0agQXp3ZGOsR3HliJYy\nf5M5X0pe4VCQ5kUz8BCmLCi97Ooe47MXpxiao55Qtv7OFp60b3C5wUWmeqwi\nD+bqtLZzh8+kIW+ZzxYt5+ayYNOKKZHNdt14IGuExxUM3dLBLWm97HfkgKz3\nczOAti1jud2NS3gmkSMEgldeDawBbgxh7o28eg8e1SOxh3+ltzEUogozFhsv\noa8amBlXbi1mxd8uuMXS9F9B/z5+0OvF9QrbQ3ke42T6f4r6R64DXcZmXLPO\ngNfQ4DgBTmhrv9v9BMLyOQ2ecoS8UJKmRapLdH1ojEky07u94000F5EvEtXW\nh8kkXytLh01YGqdQWi5XhDRLY/fmi8hKE3cuHwxNARfaA9JU3W4CrunFaw4O\n/e0r8t7OGFmm329YqHkIhSCkeY2VhifGYyj+TRzHztBmQptaog8zmB83i2hC\neSNdgpumCbvnQjfcuGuDawDqOCk76y6Zn8usssczw/+zmajJxiFqm8Y9SZcP\n47nMSoZqFsddLt3YFwWD9401QWTVDSK+ZuwDgVPCxcPkJtfagYos9REXdPLO\nlbvJBQ5uSCb5TlpE2I6qlvRuzw2sZ5D2ysiET3qRxWoOyA4kJ8J7wO4SyaIR\n/WlA\r\n=aP2j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTf4tvklZKj7o4BOsgfE3SIfW4b315s+Xzsf2icRPZBAIgTXWm8gvBLnlVhaHZ2fdCzY9FYQHQj7xsDqq/QB+aLxM="}]},"maintainers":[{"name":"0yi0","email":"yi@secondstate.io"}],"_npmUser":{"name":"0yi0","email":"yi@secondstate.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/remix-debug_0.2.14-0.0.1_1566891746256_0.4830239352258643"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-26T08:05:35.845Z","0.2.14":"2019-08-26T08:05:36.245Z","modified":"2022-04-04T10:29:45.731Z","0.2.14-0.0.1":"2019-08-27T07:42:26.412Z"},"maintainers":[{"name":"0yi0","email":"yi@secondstate.io"}],"description":"Ethereum IDE and tools for the web","homepage":"https://github.com/ethereum/remix#readme","repository":{"type":"git","url":"git+https://github.com/ethereum/remix.git"},"contributors":[{"name":"Yann Levreau","email":"yann@ethdev.com"},{"name":"Liana Husikyan","email":"liana@ethdev.com"}],"author":{"name":"cpp-ethereum team"},"bugs":{"url":"https://github.com/ethereum/remix/issues"},"license":"MIT","readme":"# `remix-debug`\n\nremix-debug wrap other remix-* libraries and can be used to debug Ethereum transactions.\n\n+ [Installation](#installation)\n+ [Development](#development)\n\n## Installation\n\n\n```bash\nnpm install remix-debug\n```\n\n## Development\n\n```javascript\nvar Debugger = require('remix-debug').EthDebugger\nvar BreakpointManager = require('remix-debug').BreakpointManager\n\nvar debugger = new Debugger({\n  compilationResult: () => {\n    return compilationResult // that helps resolving source location\n  }\n})\n\ndebugger.addProvider(web3, 'web3')\ndebugger.switchProvider('web3')\n\nvar breakPointManager = new remixCore.code.BreakpointManager(this.debugger, (sourceLocation) => {\n    // return offsetToLineColumn\n})\ndebugger.setBreakpointManager(breakPointManager)\nbreakPointManager.add({fileName, row})\nbreakPointManager.add({fileName, row})\n\ndebugger.debug(<tx_hash>)\n\n// this.traceManager.getCurrentCalledAddressAt\n\ndebugger.event.register('newTraceLoaded', () => {\n  // start doing basic stuff like retrieving step details\n  debugger.traceManager.getCallStackAt(34, (error, callstack) => {})\n})\n\ndebugger.callTree.register('callTreeReady', () => {\n  // start doing more complex stuff like resolvng local variables\n  breakPointManager.jumpNextBreakpoint(true)\n  \n  var storageView = debugger.storageViewAt(38, <contract address>, \n  storageView.storageSlot(0, (error, storage) => {})\n  storageView.storageRange(error, storage) => {}) // retrieve 0 => 1000 slots\n\n  debugger.extractStateAt(23, (error, state) => {\n    debugger.decodeStateAt(23, state, (error, decodedState) => {})\n  })\n  \n  debugger.sourceLocationFromVMTraceIndex(<contract address>, 23, (error, location) => {\n    debugger.decodeLocalsAt(23, location, (error, decodedlocals) => {})\n  })\n  \n  debugger.extractLocalsAt(23, (null, locals) => {})\n  \n})\n```\n\n## Library\n\nProvides:\n\n```javascript\n{\n    code: {\n        CodeManager: CodeManager,\n        BreakpointManager: BreakpointManager\n    },\n    storage: {\n        StorageViewer: StorageViewer,\n        StorageResolver: StorageResolver\n    },\n    trace: {\n        TraceManager: TraceManager\n    }\n}\n```\n      \n\nTraceManager is a convenient way to access a VM Trace and resolve some value from it.\n\n`TraceManager()` :\n\n`function resolveTrace(stepIndex, tx)`\n\n`function init(stepIndex, tx)`\n\n`function inRange(stepIndex, tx)`\n\n`function isLoaded(stepIndex, tx)`\n\n`function getLength(stepIndex, tx)`\n\n`function accumulateStorageChanges(stepIndex, tx)`\n\n`function getAddresses(stepIndex, tx)`\n\n`function getCallDataAt(stepIndex, tx)`\n\n`function getCallStackAt(stepIndex, tx)`\n\n`function getStackAt(stepIndex, tx)`\n\n`function getLastCallChangeSince(stepIndex, tx)`\n\n`function getCurrentCalledAddressAt(stepIndex, tx)`\n\n`function getContractCreationCode(stepIndex, tx)`\n\n`function getMemoryAt(stepIndex, tx)`\n\n`function getCurrentPC(stepIndex, tx)`\n\n`function getReturnValue(stepIndex, tx)`\n\n`function getCurrentStep(stepIndex, tx)`\n\n`function getMemExpand(stepIndex, tx)`\n\n`function getStepCost(stepIndex, tx)`\n\n`function getRemainingGas(stepIndex, tx)`\n\n`function getStepCost(stepIndex, tx)`\n\n`function isCreationStep(stepIndex, tx)`\n\n`function findStepOverBack(stepIndex, tx)`\n\n`function findStepOverForward(stepIndex, tx)`\n\n`function findStepOverBack(stepIndex, tx)`\n\n`function findNextCall(stepIndex, tx)`\n\n`function findStepOut(stepIndex, tx)`\n\n`function checkRequestedStep(stepIndex, tx)`\n\n`function waterfall(stepIndex, tx)`\n\n\n- - - -\n\n`CodeManager(_traceManager)` :\n\n`function getCode(stepIndex, tx)` :\nResolve the code of the given @arg stepIndex and trigger appropriate event\n\n`function resolveStep(address, cb)` :\nRetrieve the code located at the given @arg address\n\n`function getFunctionFromStep(stepIndex, sourceMap, ast)` :\nRetrieve the called function for the current vm step\n\n`function getInstructionIndex(address, step, callback)` :\nRetrieve the instruction index of the given @arg step\n\n`function getFunctionFromPC(address, pc, sourceMap, ast)` :\nRetrieve the called function for the given @arg pc and @arg address\n\n- - - -\n\n`BreakpointManager(_ethdebugger, _locationToRowConverter)` :\n\n`function jumpNextBreakpoint(defaultToLimit)` :\nstart looking for the next breakpoint\n\n`function jumpPreviousBreakpoint(defaultToLimit)` :\nstart looking for the previous breakpoint\n\n`function jump(direction, defaultToLimit)` :\nstart looking for the previous or next breakpoint\n\n`function hasBreakpointAtLine((fileIndex, line)` :\ncheck the given pair fileIndex/line against registered breakpoints\n\n`function hasBreakpoint()` :\nreturn true if current manager has breakpoint\n\n`function add(sourceLocation)` :\nadd a new breakpoint to the manager\n\n`function remove(sourceLocation)` :\nremove a breakpoint from the manager\n\n- - - -\n\n`StorageViewer(_context, _storageResolver, _traceManager)` :\n\n`function storageRange(defaultToLimit)` :\nreturn the storage for the current context (address and vm trace index)\n\n`function storageSlot(defaultToLimit)` :\nreturn a slot value for the current context (address and vm trace index)\n\n`function isComplete(direction, defaultToLimit)` :\nreturn True if the storage at @arg address is complete\n\n`function initialMappingsLocation((fileIndex, line)` :\nreturn all the possible mappings locations for the current context (cached) do not return state changes during the current transaction\n\n`function mappingsLocation()` :\nreturn all the possible mappings locations for the current context (cached) and current mapping slot. returns state changes during the current transaction\n\n`function extractMappingsLocationChanges(sourceLocation)` :\nretrieve mapping location changes from the storage changes.\n\n- - - -\n\n`StorageResolver()` :\n\n`function storageRange(tx, stepIndex, address, callback)` :\nreturn the storage for the current context (address and vm trace index)\n\n`function initialPreimagesMappings(tx, stepIndex, address, callback)` :\nreturn a slot value for the current context (address and vm trace index)\n\n`function storageSlot(slot, tx, stepIndex, address, callback)` :\nreturn True if the storage at @arg address is complete\n\n`function isComplete(address)` :\nreturn all the possible mappings locations for the current context (cached) do not return state changes during the current transaction\n\n","readmeFilename":"README.md"}