This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iz sry 4 tis lame commit, probs more to come
- use contract schema for truffle contracts - implement more allocation logic for truffle contracts
this supports `bytes` and `string` whos slot location is at only keccak(offset)
…o truffle-decoder
…to truffle-decoder
Also fix array/set mismatch
- Define generic `activate` method for switching repl contexts
- Convert decoder-native mappings into JS Map objects - Detect uint/int types and represent mapping with BN keys instead of JS-normal string keys
(data.current.identifiers.decoded selector)
Strip mapping metadata from decoder output in debugger
This has been hammer-tested significantly. There are outstanding problems with decoding, mostly in the form of unsupported data types, or broken data types. At this point, none of the issues are regressions, but it's unclear whether the underlying brokenness is the same. Merging now before it gets any bigger. |
@seesemichaelj thank you for getting these new packages going. exciting days ahead as they mature! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@seesemichaelj's notes:
This PR is currently a WIP, and more details will be added later. However, in the meantime, the gist is below:
truffle-debugger
@gnidan addendum:
Besides truffle-decoder and truffle-decode-utils, mostly the work herein affects the debugger by way of making decode an
async
operation.The debugger now uses a semaphore to track outstanding decode requests and requires that it resolves before
data.current.identifiers.*
selectors are available for use. Notably, this adds a newsession.variables()
method as the canonical means to get the current scope of variables.This also includes a poor excuse for a translation later between the decoder and the debugger, in order exclusively [for now] to convert mappings coming back from the decoder into JS
Map
objects.Since the decoder returns BNs, and since @seesemichaelj makes a compelling argument against
number
s, the debugger no longer cleans BNs, and instead we inject a custom inspect method for BNs for use in the debugger repl context.Continuous Integration now contains a script for bootstrap instead of the inline invocation. This is to account for the decoder and decode utils requiring a
tsc
build.The decoder in its current form includes a draft for tests in the form of a Truffle project. Much of the decoder logic is covered by the existing decoding integration tests. The decode utils don't have tests right now.