Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paulrberg/solplate
Simple utility for generating boilerplate Solidity contracts
https://github.com/paulrberg/solplate
boilerplate ethereum rust solidity
Last synced: 25 days ago
JSON representation
Simple utility for generating boilerplate Solidity contracts
- Host: GitHub
- URL: https://github.com/paulrberg/solplate
- Owner: PaulRBerg
- License: mit
- Created: 2023-02-15T14:41:27.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-16T13:07:46.000Z (over 1 year ago)
- Last Synced: 2024-10-03T12:40:15.705Z (about 1 month ago)
- Topics: boilerplate, ethereum, rust, solidity
- Language: Rust
- Homepage:
- Size: 178 KB
- Stars: 32
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Solplate [![Github Actions][gha-badge]][gha] [![License: MIT][license-badge]][license]
[gha]: https://github.com/PaulRBerg/solplate/actions
[gha-badge]: https://github.com/PaulRBerg/solplate/actions/workflows/ci.yml/badge.svg
[license]: https://opensource.org/licenses/MIT
[license-badge]: https://img.shields.io/badge/License-MIT-blue.svgSimple utility for generating boilerplate Solidity contracts.
## Demo
![Demo](./demo.gif)
## Build
You need to have Rust and Cargo installed on your machine. See the installation guide
[here](https://doc.rust-lang.org/cargo/getting-started/installation.html).Then, clone this repo and install the CLI globally, like this:
```sh
cargo install --path .
```## Usage
With no arguments (defaults to the latest Solidity version):
```sh
$ solplate
```With a Solidity version passed as the first and only argument:
```sh
$ solplate "0.6.2"
```To save the output to a Solidity file:
```sh
$ solplate "0.6.2" > src/Contract.sol
```### With VSCode
You can add Solplate as a task in your global [`tasks.json`](https://stackoverflow.com/q/41046494/3873510) file:
```json
{
"version": "2.0.0",
"tasks": [
{
"label": "Generate Solidity Boilerplate",
"type": "shell",
"command": "solplate ${input:version}",
"presentation": {
"reveal": "never"
}
}
],
"inputs": [
{
"id": "version",
"default": "0.8.19",
"description": "Solidity version",
"type": "promptString"
}
]
}
```To speed up your workflow, you can add a key bind for the task in `keybindings.json`, e.g.
```json
[
{
"key": "CMD+k b",
"command": "workbench.action.tasks.runTask",
"args": "Generate Solidity Boilerplate"
}
]
```## License
This project is licensed under MIT.