AI-Boosted Solidity REPL

Overview

ChiselGPT: AI-Boosted Solidity REPL

Chisel-GPT is an extension for Chisel allowing natural language requests. The natural language requests are converted into Chisel/Solidity commands and they are executed within the Chisel environment.

Still a work in progress, responses may not always be accurate.

Examples

Commands can be requested by prefixing your request with !chat, for example:

!chat create a contract that uses assembly to bit shift numbers

!chat create a simple poc for a liquidity pool

!chat deal me 100 ETH

Usage

First clone the repository

Then in order to send requests to OpenAI for natural language to Solidity/Chisel commands, it requires an api key.

To set this on a MAC or Linux do:

export OPENAI_API_KEY=...

Now run the tool with:

cargo run

TODO

Feel free to submit PR's or issues

  • Include previous messages and responses in the openai request
  • Modify !help, to include the custom command; !chat
  • If '##START##' is found but '##END##' isn't, query for the remaining code
  • Remove .unwrap() calls, update error handling to be more coherent
  • Update parsing logic to not require a command delineator (to reduce the chance of ChatGPT sending bad responses)
  • Improve the prompt
You might also like...
A Foundry plugin that enables you to plot charts within solidity.

🖌️ solplot A Foundry plugin that enables you to plot charts within solidity. Installation First, make sure that you have Rust installed. Then install

A tool to optimize your Solidity function signatures.

sigop A CLI tool to optimize your Solidity function signatures. I wanted to create this after seeing transmissions11's comment about this optimization

A Solidity static analyzer to identify contract vulnerabilities and gas efficiencies.

solstat A Solidity static analyzer to identify contract vulnerabilities and gas efficiencies. .------. .------. .------. .------. .------. .------. .-

Rust bindings for Solidity's AST and visitors

solc-ast solc-ast provides rust bindings for the solidity AST and visitors. The visitors were built to be 1-1 compatible with the visitors from solc.

A simple, fast, and easy to use Solidity test generator based on the Branching Tree Technique.

bulloak A simple, fast, and easy to use Solidity test generator based on the Branching Tree Technique. Installing cargo install bulloak Usage Basic Us

Solidity Function Selector Miner (AVX2 + Multithreaded)

Function Selector Miner Simple and fast Solidity function selector miner (CPU based). Uses AVX2 instructions and multithreading to compute hashes in p

An automated CLI tool that optimizes gas usage in Solidity smart contracts, focusing on storage and function call efficiency.

Solidity-Gas-Optimizoor An high performance automated CLI tool that optimizes gas usage in Solidity smart contracts, focusing on storage and function

Comments
  • Unsure how to provide the environment variable

    Unsure how to provide the environment variable

    Hello, I don't know much about Rust, and I seem unable to provide my OpenAI API key as the environment variable. Could you give me a step-by-step guide or link me to relevant materials? Thank you.

    opened by martiam 2
  • Installation failed: no matching package named `chisel` found

    Installation failed: no matching package named `chisel` found

    Hi, I've cloned the repo, and run cargo run, but I get the following issue: error: no matching package named chisel found location searched: https://github.com/foundry-rs/foundry.git#388c3c0a required by package ChiselGPT v0.1.0 (/Users/--/Chisel-GPT)

    But when I run just chisel, I get the classical chisel environnement on terminal.

    Maybe I've done something wrong on my side? Thanks a lot for your amazing work!

    opened by clement-ux 4
Owner
null
A simple, fast, and easy to use Solidity test generator based on the Branching Tree Technique.

bulloak A simple, fast, and easy to use Solidity test generator based on the Branching Tree Technique. Installing cargo install bulloak Usage Basic Us

Alexander González 38 Aug 7, 2023
REPL for the Rust programming language

Rusti A REPL for the Rust programming language. The rusti project is deprecated. It is not recommended for regular use. Dependencies On Unix systems,

Murarth 1.3k Dec 20, 2022
Simple calculator REPL, similar to bc(1), with syntax highlighting and persistent history

eva simple calculator REPL, similar to bc(1), with syntax highlighting and persistent history installation Homebrew $ brew install eva crates.io $ car

Akshay 632 Jan 4, 2023
repl / scripting language / namespaced command line aliases

Adana Toy project with the following goals in mind: Making something concrete with rust Learning more about parser combinator Use the minimum amount o

Nordine Bittich 10 Aug 28, 2022
Brainfu*k interpreter and REPL written in Rust🦀

brainfuck interpreter: a simple brainfuck interpreter and REPL writen in rust ?? Read this in other languages. AR Arabic-العربية Features Run brainfuc

Anas Elgarhy 7 Feb 1, 2023
Finds matching solidity function signatures for a given 4 byte signature hash and arguments.

Finds matching solidity function signatures for a given 4 byte signature hash and arguments. Useful for finding collisions or 0x00000000 gas saving methods (though there are better techniques for saving gas on calldata)

null 73 Dec 22, 2022
Solidity-Compiler Version Manager

Solidity Compiler Version Manager

Rohit Narurkar 114 Jan 2, 2023
Rust <=> Solidity

POC harness for writing Solidity tests in Rust using ethers-rs. Usage Run forge tests forge test Run rust tests forge build cargo test Notes The usag

wolflo 9 Jul 22, 2022
Generates Solidity code to verify EIP-712 style signatures

eip712 Generates Solidity code to verify EIP-712 style signatures. Usage First, create an abstract contract implementing the functionality you want: /

Sam Wilson 11 Dec 22, 2022
evm2near compiles Solidity contracts into NEAR WebAssembly contracts.

EVM → NEAR evm2near is a project for compiling EVM bytecode into wasm bytecode, with the particular goal of having that wasm artifact be executable on

Aurora 125 Dec 3, 2022