Skip to content

Latest commit

 

History

History
60 lines (37 loc) · 2.63 KB

README.md

File metadata and controls

60 lines (37 loc) · 2.63 KB

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