Skip to content

Commit

Permalink
feat: Theoros v1.0 (#86)
Browse files Browse the repository at this point in the history
* dev(better_theoros): init

* dev(better_theoros): pt1

* dev(better_theoros):

* dev(better_theoros):

* dev(better_theoros): Hyperlane service

* dev(better_theoros):

* dev(better_theoros):

* dev(better_theoros):

* dev(better_theoros): comms

* dev(better_theoros): better

* dev(better_theoros): logs

* dev(better_theoros): added todo

* dev(better_theoros):

* dev(better_theoros): updated README

* dev(better_theoros): Removed default active chain in websocket

* dev(better_theoros): better comment

* dev(better_theoros): last nitpick 💀

* dev(better_theoros): Simpler struct

* dev(better_theoros): used same terminology between structs

* dev(better_theoros): Added TODO for calldata

* dev(better_theoros): smol perf update

* dev(better_theoros): reading improvements

* fix: strum EnumString

* dev(better_theoros): Fixed EnumString deserialisation

* dev(better_theoros): Works with N signatures

* dev(better_theoros):

* dev(better_theoros): better opti

* dev(better_theoros): last commit - assert that the checkpoint is the same

* dev(better_theoros): Removed unused dependencies

* dev(better_theoros):

* dev(better_theoros): 🔨 optimizations

* dev(better_theoros): 🔨 nitpicking optis

* dev(better_theoros): supports N datafeeds + returns N calldata

!

* dev(better_theoros): Updated openapi specs

* dev(better_theoros): Send error to ws client

* dev(better_theoros): ✅ Websocket finished

* dev(better_theoros): Fixed loop

* dev(better_theoros): Fixed js script to update EVM feeds

* dev(better_theoros): Theoros SDK

* dev(better_theoros): updated README for SDk

* dev(better_theoros):

* dev(better_theoros): Better example + README

* dev(better_theoros): ✅ theoros SDK

* dev(better_theoros): Updated SDK Readme

* dev(better_theoros): 🔨 Fixed & Tested SDK

* dev(better_theoros): Fixed example

* dev(better_theoros): Prevent overflows in indexer

* fix: nit picks

* Update tsconfig.json

* dev(better_theoros): Fixes from review
"
r

* dev(better_theoros): Lint

* dev(better_theoros): docs

* dev(better_theoros): Use DashMap / DashSet where applicable

* fix: remove box

* dev(better_theoros): Removed useless Result

---------

Co-authored-by: 0xevolve <[email protected]>
  • Loading branch information
akhercha and EvolveArt authored Nov 3, 2024
1 parent d5c8e9e commit 732af6c
Show file tree
Hide file tree
Showing 66 changed files with 1,406 additions and 10,220 deletions.
46 changes: 22 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
# Pragma
# Pragma V2

[![GitHub Actions][gha-badge]][gha] [![codecov](https://codecov.io/gh/astraly-labs/pragma-monorepo/branch/main/graph/badge.svg?)](https://codecov.io/gh/astraly-labs/pragma-monorepo) [![Foundry][foundry-badge]][foundry] [![License: MIT][license-badge]][license]
[![GitHub Actions][gha-badge]][gha] [![Foundry][foundry-badge]][foundry] [![License: MIT][license-badge]][license]

[gha]: https://github.com/astraly-labs/pragma-monorepo/actions
[gha-badge]: https://github.com/PaulRBerg/prb-math/actions/workflows/ci.yml/badge.svg
[codecov-badge]: https://img.shields.io/codecov/c/github/astraly-labs/pragma-monorepo
[foundry]: https://getfoundry.sh/
[foundry-badge]: https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg
[license]: https://www.apache.org/licenses/LICENSE-2.0
[license-badge]: https://img.shields.io/badge/License-Apache-blue.svg
[license]: https://opensource.org/license/mit
[license-badge]: https://img.shields.io/badge/License-MIT-blue.svg

## Rust

<a href="./rust/pragma-cli/">Pragma CLI</a>

CLI used to interact with the Pragma protocol.

- Register yourself as a data provider
- Schedule new data feeds
- Connect pragma to your protocol

<a href="./rust/theoros/">Theoros</a>

Request the API to construct the calldata necessary for cross-chain updates.
Expand All @@ -28,6 +20,16 @@ Request the API to construct the calldata necessary for cross-chain updates.
- Retrieves the signatures of the Hyperlane Validators
- Constructs the calldata for data feeds requested through HTTP/WebSocket

## Cairo

<a href="./cairo/oracle">Pragma Oracle</a>

Core Contacts of the Pragma Oracle.

<a href="./cairo/dispatcher">Pragma Dispatcher</a>

Wrapper around the Pragma Oracle that allows us to dispatch feed updates through Hyperlane.

## Solidity

<a href="./solidity/">Solidity SDK</a>
Expand All @@ -37,22 +39,18 @@ Solidity contracts & libraries.
- Set of contracts used to store data relayed from Pragma chain using Hyperlane.
- SDK that can be used by EVM protocols looking to integrate Pragma.

## Local Development
## Typescript

### Foundry
<a href="./typescript/theoros-sdk/">Theoros SDK</a>

First ensure you have Foundry installed on your machine.
A SDK used to query data from Theoros in a simple way.

Run the following to install `foundryup`:
- Fetch the latest calldata using either REST or Websocket endpoints.

```bash
curl -L https://foundry.paradigm.xyz | bash
```
<a href="./typescript/pragma-deployer/">Pragma Deployer</a>

Then run `foundryup` to install `forge`, `cast`, `anvil` and `chisel`.
The main scripts used to deploy all our contracts (Cairo, Solidity, ...) are located there.

```bash
foundryup
```
<a href="./typescript/pragma-scripts/">Pragma Scripts</a>

Check out the [Foundry Book](https://book.getfoundry.sh/getting-started/installation) for more information.
Utils scripts that we use to make some actions on-chain.
4 changes: 0 additions & 4 deletions monorepo.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
"name": "theoros",
"path": "rust/theoros",
},
{
"name": "pragma-cli",
"path": "rust/pragma-cli",
},
{
"name": "pragma-utils",
"path": "rust/pragma-utils",
Expand Down
Loading

0 comments on commit 732af6c

Please sign in to comment.