Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pumpkinseed/libdisevm
EVM bytecode disassembler
https://github.com/pumpkinseed/libdisevm
blockchain disassembler evm smart-contracts
Last synced: about 2 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 (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-23T17:33:41.000Z (4 months ago)
- Last Synced: 2024-12-24T08:43:32.925Z (about 2 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 mainimport (
"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 RETURNfmt.Println(formatter.MultiLine())
// Output:
// PUSH1 0x42
// PUSH1 0x00
// MSTORE
// PUSH1 0x20
// PUSH1 0x00
// RETURN
}
```