Coder Social home page Coder Social logo

naturalchain's Introduction

NaturalChain: An AI Toolkit for Blockchain

logo

Description

NaturalChain is an AI toolkit that brings the power of Large Language Models (LLMs) like ChatGPT to the blockchain. NaturalChain aims to revolutionize blockchain interaction by allowing users to utilize natural language commands to perform complex tasks.

NaturalChain was originally developed for the ETHGlobal Lisbon 2023 hackathon by the team at Cenit Finance along with Jesús Ligero.

Features

NaturalChain extends LangChain. It uncludes tools that allow an AI agent to:

  • Utilize the full JSON-RPC API from an EVM-compatible chain.
  • Sign transactions
  • Write and deploy smart contracts
  • Query from APIs (The Graph, CoinMarketCap, etc.)

By default it uses ChatGPT 3.5, but you can hook it up to any LLM you wish.

Prerequisites

This project uses Python 3.9, Poetry, and just.

Installation

Project installation:

git clone https://github.com/miguel-bm/naturalchain.git

cd naturalchain

poetry install

npm i @openzeppelin/[email protected]

poetry run python -c "import solcx; solcx.install_solc('0.8.19')"

poetry shell

Usage

In order to run the CLI interface:

naturalchain --help

In order to run the chat interface weapp

just run

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Acknowledgments

Special thanks to the ETHGlobal Lisbon Hackathon and its sponsors.

Example prompts:

  • Deploy Smart contracts

    • Create a nft smart contract with a preminted nft to the deployer address on sepolia network
    • Create a nft smart contract based on dnd on Sepolia
    • Deploy an nft contract on Sepolia, ask any questions about the process
    • Create an erc20 dnd oriented onSepolia, ask any questions about the process
      • Send a transaction to interact with this erc20 contract 0x7484e7449Ca8b3c9807E191b9A7E75319daa1Af4 to transfer 25 tokens to this address 0xf904C9Be6884263606BC9C41fb17b16D4c692C02 on Sepolia
  • Querying subgraph

    • Can you provide me the top 10 pairs of uniswap?
    • Can you provide me the top 5 uniswap pairs that have DAI on it?
    • Show top pairs of balancer
    • Can you provide me the top 5 paris of uniswap and provide the reserved of USD of each one?
  • Leverage the full JSON-rpc

    • Send 0.01 ether to this address 0xf904C9Be6884263606BC9C41fb17b16D4c692C02 on Sepolia
    • Get the account information of this address 0x2a3DD3EB832aF982ec71669E178424b10Dca2EDe on mainnet

naturalchain's People

Contributors

miguel-bm avatar invocamanman avatar acalvogarcia avatar carlosbort avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.