https://github.com/scroll-tech/trace-dumper
https://github.com/scroll-tech/trace-dumper
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/scroll-tech/trace-dumper
- Owner: scroll-tech
- License: mit
- Created: 2022-11-21T01:39:40.000Z (about 3 years ago)
- Default Branch: dev
- Last Pushed: 2024-08-29T09:31:39.000Z (over 1 year ago)
- Last Synced: 2024-12-13T01:11:46.772Z (about 1 year ago)
- Language: Solidity
- Size: 476 KB
- Stars: 43
- Watchers: 16
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# trace-dumper
A very simple tool, it can deploy contract and call contract api and get trace store into file just in one cmd.
## upgrade dependence
1. upgrade go mod
```
go get -v github.com/scroll-tech/go-ethereum@staging // change `staging` to a specific tag/branch here
go mod tidy
```
2. manaully edit `scrolltech/l2geth`'s tag in `docker/l2geth/Dockerfile` to the corresponding version
For example, `scrolltech/l2geth:prealpha-v3.1`
## make and start l2geth docker
create environment (**need to keep it running**)
```
make docker
docker run -it -p 8545:8545 -p 8546:8546 --rm trace-dumper/l2geth:latest
```
## dump traces
```
# build trace_dumper
make trace_dumper
# --help show detail about flags.
./bin/trace_dumper --help
# without `-wrap` get the origin result from sdk.
./bin/trace_dumper -dump erc20 # options: erc20, native, nft, greeter, sushi, dao, uniswapv2, multi_uniswapv2
# `-wrap` add json rpc wrap, in order to get the same struct when called by postman.
./bin/trace_dumper -dump erc20 -wrap
```
## show trace list
```
ls -l ./tracedata/erc20_*.json
```