https://github.com/pumpkinseed/libdisevm
EVM bytecode disassembler
https://github.com/pumpkinseed/libdisevm
blockchain disassembler evm smart-contracts
Last synced: 7 months ago
JSON representation
EVM bytecode disassembler
- Host: GitHub
- URL: https://github.com/pumpkinseed/libdisevm
- Owner: PumpkinSeed
- License: mit
- Created: 2024-10-23T11:57:14.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-23T17:33:41.000Z (about 1 year ago)
- Last Synced: 2025-04-14T13:15:51.468Z (7 months ago)
- Topics: blockchain, disassembler, evm, smart-contracts
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# libdisevm
EVM bytecode disassembler
### Installation
```shell
go get github.com/PumpkinSeed/libdisevm
```
### Usage
```go
package main
import (
"fmt"
"github.com/PumpkinSeed/libdisevm"
)
func main() {
bytecode := "..."
opcodes, err := libdisevm.Disassemble(bytecode)
if err != nil {
panic(err)
}
formatter := libdisevm.NewFormatter(opcodes)
fmt.Println(formatter.SingleLine())
// Output: PUSH1 0x42 PUSH1 0x00 MSTORE PUSH1 0x20 PUSH1 0x00 RETURN
fmt.Println(formatter.MultiLine())
// Output:
// PUSH1 0x42
// PUSH1 0x00
// MSTORE
// PUSH1 0x20
// PUSH1 0x00
// RETURN
}
```