https://github.com/keep-starknet-strange/satoru-keeper
Satoru keeper service 🦀.
https://github.com/keep-starknet-strange/satoru-keeper
Last synced: 6 months ago
JSON representation
Satoru keeper service 🦀.
- Host: GitHub
- URL: https://github.com/keep-starknet-strange/satoru-keeper
- Owner: keep-starknet-strange
- License: mit
- Created: 2023-09-21T15:49:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-25T09:50:19.000Z (10 months ago)
- Last Synced: 2024-07-25T15:24:14.870Z (10 months ago)
- Language: Rust
- Size: 3.46 MB
- Stars: 12
- Watchers: 5
- Forks: 6
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: docs/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: docs/SECURITY.md
Awesome Lists containing this project
README
# Satoru keeper service 🦀
## 📝 Description
The keeper is an offchain service for Satoru protocol. It is responsible for:
- Watching the user initiated actions and execute them onchain, following the 2-steps process mechanism of GMX v2.
## 📦 Installation
### 📋 Prerequisites
- [Rust](https://www.rust-lang.org/tools/install)
### 🛠️ Build
```bash
cargo build --release
```## Usage
```bash
RUST_LOG=info cargo run
```### Configuration
The keeper is configured using environment variables.
| Name | Description |
| --------------------------------------- | -------------------------------------------------------- |
| `KEEPER_RPC_URL` | The RPC URL of the Starket node. |
| `KEEPER_SIGNER_PRIVATE_KEY` | The private key controlling the keeper account contract. |
| `KEEPER_ACCOUNT_ADDRESS` | The address of the account contract of the keeper. |
| `KEEPER_SATORU_EXCHANGE_ROUTER_ADDRESS` | The address of the Satoru exchange router contract. |## As library
```rust
#[tokio::main]
async fn main() {
let config = KeeperConfigBuilder::default()
.rpc_url("https://127.0.0.1:5050")
.signer_private_key("0x...")
.account_address("0x...")
.build()?;
let keeper = Keeper::new(config).await.unwrap();// Then you can use the keeper to execute actions.
// keeper.execute_deposit(...);
}
```## 📄 License
This project is licensed under the MIT license.
See [LICENSE](LICENSE) for more information.
Happy coding! 🎉
## 📚 Resources
Here are some resources to help you get started:
- [Satoru Book](https://keep-starknet-strange.github.io/satoru/)
- [Starknet Book](https://book.starknet.io/)
- GMX v2 resources
- [GMX Synthetics](https://github.com/gmx-io/gmx-synthetics)
- [Trading on v2](https://docs.gmx.io/docs/trading/v2)
- [Contracts for v2](https://docs.gmx.io/docs/api/contracts-v2/)
- [Liquidity on v2](https://docs.gmx.io/docs/providing-liquidity/v2)
- Some DeFi offchain services example implementations
- [swaps-offchain-infra](https://github.com/mycelium-ethereum/swaps-offchain-infra)
- [swaps-liquidator](https://github.com/mycelium-ethereum/swaps-liquidator)## 🫶 Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Abdel @ StarkWare
💻
akhercha
💻
zarboq
💻
bacharif
💻
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!