Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eagr/sol-repl
Solidity REPL
https://github.com/eagr/sol-repl
ethereum repl solidity
Last synced: about 2 months ago
JSON representation
Solidity REPL
- Host: GitHub
- URL: https://github.com/eagr/sol-repl
- Owner: eagr
- License: mit
- Created: 2022-04-07T14:20:37.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-05-07T15:20:31.000Z (over 2 years ago)
- Last Synced: 2024-04-29T00:06:04.077Z (8 months ago)
- Topics: ethereum, repl, solidity
- Language: JavaScript
- Homepage:
- Size: 347 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-solidity - eagr/sol-repl - Lightweight, feature-rich REPL for instant feedback. (Tools)
- awesome-solidity - eagr/sol-repl - Lightweight, feature-rich REPL for instant feedback. (Tools)
- awesome-solidity - eagr/sol-repl - Lightweight, feature-rich REPL for instant feedback. (Tools)
README
# sol-repl
a REPL to provide instant feedback for Solidity snippets
[Any bug reports or feature requests](https://github.com/eagr/sol-repl/issues/new) are appreciated.
## Features
* language
* [x] constant
* [x] contract
* [x] enum
* [x] function
* [x] import
* [x] interface
* [x] library
* [x] struct
* [x] type
* REPL
* [x] Node-like REPL interactions
* [x] cursor/delete shortcuts
* [x] history traversing
* [x] history filtering
* [x] `.session` print formatted Solidity source
* [ ] `.editor` editor mode## Install
```sh
npm i -g sol-repl
```## Usage
```sh
$ sol
Welcome to Solidity v0.8.13!
Type ".help" for more information.
> .help
.exit Exit the REPL
.help Print this message
.session Print current session
> enum Abc { a, b, c }
> type(Abc).max
2
> Abc c = Abc.c
2
> contract C {}
> msg.sender
0x4B6F0b9546487B1a184ADc43e0b17299cCdf8648
```## Shortcuts
**cursor**
* Alt+Left Cursor to previous word start
* Alt+Right Cursor to next word end
* Fn+Left Cursor to line start
* Fn+Right Cursor to line end**delete**
* Alt+Del Delete to previous word bound from cursor
* Ctrl+W Alias of Alt+Del
* Ctrl+U Delete to line start from cursor**interrupt**
* Ctrl+C Clear line; signal an exit
* Ctrl+D Immediately terminate REPL## License
[MIT](./LICENSE)