Skip to content
/ oaoie Public

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

License

Notifications You must be signed in to change notification settings

LiRiu/oaoie

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published