Skip to content

Commit

Permalink
doc: Code.Run() example in README (#6)
Browse files Browse the repository at this point in the history
Also adds EVM execution to the list of features
  • Loading branch information
aschlosberg authored Feb 29, 2024
1 parent aa08c2b commit 6e670da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ bytecode unchanged.
- [x] Compiler-state assertions (e.g. expected stack depth)
- [ ] Automatic stack permutation
- [ ] Standalone compiler
- [x] In-process EVM execution
- [ ] Interactive debugger

### Documentation
Expand Down Expand Up @@ -60,7 +61,9 @@ code := Code{
Fn(RETURN, PUSH(32-len(hello)), PUSH(len(hello))),
}

byteCode, err := code.Compile()
bytecode, err := code.Compile()
// or
result, err := code.Run(nil /*callData*/)
```

### Other examples
Expand Down

0 comments on commit 6e670da

Please sign in to comment.