Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tsukipond8531/tracevm
Track the values and addresses of slots (storage variables in Solidity) inside the Ethereum contract, as well as tracking logs (Solidity events).
https://github.com/tsukipond8531/tracevm
education ethereum evm golang solidity symbolic-execution vyper
Last synced: 29 days ago
JSON representation
Track the values and addresses of slots (storage variables in Solidity) inside the Ethereum contract, as well as tracking logs (Solidity events).
- Host: GitHub
- URL: https://github.com/tsukipond8531/tracevm
- Owner: tsukipond8531
- License: other
- Created: 2024-05-27T11:56:26.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-27T12:14:55.000Z (8 months ago)
- Last Synced: 2024-11-05T10:15:21.292Z (3 months ago)
- Topics: education, ethereum, evm, golang, solidity, symbolic-execution, vyper
- Language: Go
- Homepage:
- Size: 30.2 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# TracEVM
This tool is used to track the values and addresses of slots (storage variables in Solidity) inside the Ethereum contract, as well as tracking logs (Solidity events).
- Partial symbolic execution provides the complete data on how a specific variable or slot address was calculated
- Suitable for learning about Solidity internals
- Written in Go and Python## Building
Python and Flask are required to run the web view.
```bash
pip3 install Flask
```Additionally, [Geth prerequisites](https://geth.ethereum.org/docs/getting-started/installing-geth#build-from-source) are required to compile Geth.
Finally, it is possible to build TracEVM.
```bash
./build.py
```## Running
To open webview on address [127.0.0.1:4334](http://127.0.0.1:4334) run the following command.
```bash
./run.py conf.json
```TracEVM will be running!
![](images/webview.png)
## Connecting with Remix
It is expected to have Remix installed.
Choose External HTTP Provider
![](images/remix1.png)
Connect by default address.
![](images/remix2.png)
## Usage example
Let's imagine we have such contract.
![](images/sample1.png)
Let's deploy the contract and see the output.
![](images/sample2.png)
We see that:
- event type is final_slot, which means that this slot was written at the end of transaction (not reverted).
- further we see slot offsets (constant - initial slot, mapping - solidity keccak mapping magic, offset - offset from last value)
- short slot formula, which shows all cryptographic operations which were performed with slotAlso there is a full formula, which computes all needed data from initial initcode (or calldata).
![](images/sample3.png)
## Found bug?
Please open an [issue](https://github.com/ioterw/tracevm/issues) and supply solidity code that produced unexpected behaviour.