GithubHelp home page GithubHelp logo

liriu / oaoie Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 0.0 90 KB

The Onchain AI Oracle Intents Engine (IE): A Basic Text-to-tx Simulator Contract based on OAO.

License: GNU Affero General Public License v3.0

Solidity 92.82% JavaScript 7.18%

oaoie's Introduction

Onchain AI Oracle Intents Engine (OAOIE): A Basic Text-to-tx Simulator Contract based on ie and OAO.

Overview

Users describe the transaction they want in natural language, and OAOIE translates it into specific format and completes the corresponding contract call.

With the help of opML, the entire intent will be parsed and executed onchain.

  1. User Intent => "I want to send liriu 1 eth token".
  2. opML LlaMA2 Intent Solving => "send liriu 1 ETH".
  3. OAOIE Onchain Call => "address(liriu).transfer(1 ether)".

1) Send

Example intents:

  • I want to send 1 ETH to vitalik
  • send vitalik 1 ETH
  • send 1 ETH to/for vitalik

aliases: transfer, give

2) Swap

Example intents:

  • I want to swap 20 ETH for 10 BTC
  • swap 20 ETH for 10 BTC

Dev Guide

Quick Start

git clone https://github.com/LiRiu/oaoie.git
cd oaoie && npm install
cp .env.example .env && vim .env # PRIVATE_KEY is required.
npm run test -- "I want to send liriu 1 eth token"

Build

Run: curl -L https://foundry.paradigm.xyz | bash && source ~/.bashrc && foundryup

Build the foundry project with forge build. Run tests with forge test. Measure gas with forge snapshot. Format with forge fmt.

Note: Tests currently run on a fork of mainnet to check ENS properly.

Disclaimer

These smart contracts and testing suite are being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of anything provided herein or through related user interfaces. This repository and related code have not been audited and as such there can be no assurance anything will work as intended, and users may experience delays, failures, errors, omissions, loss of transmitted information or loss of funds. The creators are not liable for any of the foregoing. Users should proceed with caution and use at their own risk.

License

See LICENSE for more details.

Thanks

oaoie's People

Contributors

fewwwww avatar liriu avatar z0r0z avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.