This repository has been archived by the owner on Oct 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 07d9e88
Showing
58 changed files
with
4,329 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
################################################################ | ||
# Secrets | ||
################################################################ | ||
|
||
WALLET_PRIVATE_KEY = <YOUR-WALLET-PRIVATE-KEY> | ||
HELIUS_API_KEY = <YOUR-HELIUS-API-KEY> | ||
|
||
################################################################ | ||
# System Configuration | ||
################################################################ | ||
|
||
# Options are 'debug', 'info', 'error' | ||
LOG_LEVEL = info | ||
|
||
SOLANA_NETWORK = mainnet | ||
SOLANA_RPC_HTTPS = https://api.mainnet-beta.solana.com/ | ||
TX_EXPLORER = https://solscan.io/tx/ | ||
URANI_ORDERBOOK_HTTPS_URL= http://127.0.0.1:8000/ | ||
URANI_ORDERBOOK_WS_URL = <URANI_ORDERBOOK_WS_ENDPOINT> | ||
URANI_BATCHES_HTTP_ENDPOINT = 'batches' | ||
URANI_SOLUTION_HTTP_ENDPOINT = 'solutions' | ||
URANI_BATCHES_SUB_TOPIC = 'batches' | ||
URANI_SOLUTIONS_SUB_TOPIC = 'solutions' | ||
|
||
################################################################ | ||
# Mulder Configuration | ||
################################################################ | ||
|
||
MULDER_UPDATE_SECONDS = 1 | ||
MULDER_MAX_INSTANCES = 10 | ||
# Options are 'HTTP' 'ASYNC_HTTP' or 'WS' or 'PUBSUB' | ||
MULDER_TYPE_OF_CONNECTION = 'HTTP' | ||
|
||
################################################################ | ||
# Internal | ||
################################################################ | ||
|
||
LOGO_FILE = ./.internal/logo.txt | ||
SPACER_FILE = ./.internal/spacer.txt | ||
WEBSOCKET_DELAY = 2 | ||
WEBSOCKET_TIMEOUT = 10 | ||
RATE_LIMIT_MAX_RETRIES = 5 | ||
RATE_LIMIT_DELAY = 10 | ||
SWAP_RETRIES = 5 | ||
SWAP_SLEEP_TIME = 10 | ||
COMPUTER_UNIT_PRICE = 280000 # ~$0.04 | ||
ACCEPTABLE_SLIPPAGE = 50 | ||
|
||
################################################################ | ||
# Liquidity Providers Endpoints | ||
################################################################ | ||
|
||
JUPITER_HTTPS = https://quote-api.jup.ag/v6/ | ||
ZETA_HTTPS = https://www.zeta.markets/ | ||
RAYDIUM_HTTPS = https://raydium.io/ | ||
PHOENIX_HTTPS = https://www.phoenix.trade/ | ||
ORCA_HTTPS = https://orca.so/ | ||
METEORA_HTTPS = https://meteora.ag/ | ||
LIFINITY_HTTPS = https://lifinity.io/ | ||
DRIFT_HTTPS = https://drift.trade | ||
ARCANA_HTTPS = https://arcana.markets/ | ||
|
||
JUPITER_SWAP_ENDPOINT = swap | ||
ZETA_SWAP_ENDPOINT = swap | ||
RAYDIUM_SWAP_ENDPOINT = swap | ||
PHOENIX_SWAP_ENDPOINT = swap | ||
ORCA_SWAP_ENDPOINT = swap | ||
METEORA_SWAP_ENDPOINT = swap | ||
LIFINITY_SWAP_ENDPOINT = swap | ||
DRIFT_SWAP_ENDPOINT = swap | ||
ARCANA_SWAP_ENDPOINT = swap | ||
|
||
JUPITER_QUOTE_ENDPOINT = quote | ||
ZETA_QUOTE_ENDPOINT = quote | ||
RAYDIUM_QUOTE_ENDPOINT = quote | ||
PHOENIX_QUOTE_ENDPOINT = quote | ||
ORCA_QUOTE_ENDPOINT = quote | ||
METEORA_QUOTE_ENDPOINT = quote | ||
LIFINITY_QUOTE_ENDPOINT = quote | ||
DRIFT_QUOTE_ENDPOINT = quote | ||
ARCANA_QUOTE_ENDPOINT = quote | ||
|
||
################################################################ | ||
# Oracle and other Endpoints | ||
################################################################ | ||
|
||
HELIUS_RPC_HTTPS = https://mainnet.helius-rpc.com/ | ||
DEXSCREENER_HTTPS = https://api.dexscreener.com/latest/dex/tokens/ | ||
BINANCE_HTTPS = https://www.binance.com/api/v3/ticker/price?symbol= | ||
|
||
################################################################ | ||
# SYSTEM IDS (you don't need to change these values) | ||
################################################################ | ||
|
||
TOKEN_PROGRAM_ID = TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA | ||
|
||
################################################################ | ||
# AMM MINTS (you don't need to change these values) | ||
################################################################ | ||
|
||
RAYDIUM_PROGRAM_AMM_SOL_USTD = 7XawhbbxtsRcQA8KTkHT9f9nc6d69UwqCDh6U5EEbEmX | ||
|
||
################################################################ | ||
# TOKENS MINTS (you don't need to change these values) | ||
################################################################ | ||
SOL_MINT = So11111111111111111111111111111111111111112 | ||
SOL_DECIMALS = 9 | ||
|
||
USDC_MINT = EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v | ||
USDC_DECIMAL = 6 | ||
|
||
USDT_MINT = Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB | ||
USDT_DECIMAL = 6 | ||
|
||
JUP_MINT = JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN | ||
JUP_DECIMAL = | ||
|
||
JITO_MINT = J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn | ||
JITO_DECIMAL = 9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Project-specific | ||
TODO.md | ||
development/src | ||
production/src | ||
|
||
.secrets | ||
__pycache__/ | ||
dist/ | ||
poetry.lock | ||
.env | ||
|
||
# Logs | ||
src/protocol_server/server.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
# 🛹 Contributing to Urani's Projects | ||
|
||
<br> | ||
|
||
Thank you for your interest in contributing to our projects! Your contributions are essential for making our projects better and more efficient. We welcome and appreciate every form of contribution. | ||
|
||
<br> | ||
|
||
## Code of Conduct | ||
|
||
Urani is committed to fostering a welcoming community. As such, we have adopted a Code of Conduct that we expect project participants to adhere to. Please read the Code of Conduct at the bottom of this document. | ||
|
||
<br> | ||
|
||
|
||
|
||
## License | ||
|
||
This project is distributed under the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0). By contributing to our projects, you agree that your contributions will be licensed under the same license. | ||
|
||
<br> | ||
|
||
## How to Contribute | ||
|
||
There are many ways to contribute to our projects, from writing code, reporting bugs, suggesting enhancements, and more: | ||
|
||
<br> | ||
|
||
### Reporting Bugs | ||
|
||
Before creating bug reports, please check the issue tracker to avoid duplicating existing issues. When filing a bug report, please provide as much relevant information as possible to help us reproduce the issue. This might include: | ||
|
||
- Your operating system | ||
- Steps to reproduce the bug | ||
- Expected and actual behavior | ||
- Any relevant logs or error messages | ||
|
||
<br> | ||
|
||
### Suggesting Enhancements | ||
|
||
Feature requests are welcome. Before submitting an enhancement suggestion, please check if it's already been proposed. When suggesting enhancements, include as much detail as possible and consider the scope and objectives of our projects. | ||
|
||
<br> | ||
|
||
### Code Contributions | ||
|
||
Not sure where to start? Look for issues tagged with `good-first-issue` or `help-wanted`: | ||
|
||
- `good-first-issue` are tasks that should only require a few lines of code and minimal system understanding. | ||
- `help-wanted` are more involved tasks needing a deeper understanding of the system. | ||
|
||
<br> | ||
|
||
### Pull Request Process | ||
|
||
1. Fork the repository and create your branch from `main`. | ||
2. Add or update tests as necessary according to your changes. | ||
3. Ensure all tests pass. | ||
4. Update the `README.md `with details of changes to the interface or significant functionality. | ||
5. Submit your pull request with a comprehensive description of changes. | ||
|
||
<br> | ||
|
||
## Setting Up Your Development Environment | ||
|
||
Please refer to the `README.md` file for instructions on setting up your development environment to start working on our projects. | ||
|
||
<br> | ||
|
||
## Pull Requests | ||
|
||
We actively welcome your pull requests. If you've added code, please ensure it adheres to our project's coding style. Include unit tests for any new functionality and ensure that all tests pass. | ||
|
||
<br> | ||
|
||
## Additional Guidelines | ||
|
||
- Write commit messages that clearly outline what has been accomplished in the commit. | ||
- Document new code based on the project's standard. | ||
- Ensure your code is clean and well-commented. | ||
|
||
Thank you for contributing to Urani's projects, where your efforts help shine a light on open-source development! | ||
|
||
<br> | ||
|
||
--- | ||
|
||
# Code of Conduct at Urani | ||
|
||
<br> | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. | ||
|
||
<br> | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or electronic address, without explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a professional setting | ||
|
||
|
||
<br> | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
<br> | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. | ||
|
||
<br> | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting [Mia](https://github.com/mia-stein). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. | ||
|
||
<br> | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Lighthouse Contributing File](https://github.com/Jac0xb/lighthouse). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
|
||
88 88 8b,dPPYba, ,adPPYYba, 8b,dPPYba, 88 | ||
88 88 88P' "Y8 "" `Y8 88P' `"8a 88 | ||
88 88 88 ,adPPPPP88 88 88 88 | ||
"8a, ,a88 88 88, ,88 88 88 88 | ||
`"YbbdP'Y8 88 `"8bbdP"Y8 88 88 88 | ||
|
||
|
||
._ _ | _| _ ._ ._ _ _ _. _ _ ._ _|_ | ||
| | | |_| | (_| (/_ | | | | (/_ \/ (_| (_| (/_ | | |_ | ||
_| | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Urani Inc. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.PHONY: clean | ||
clean: | ||
@find . -iname '*.py[co]' -delete | ||
@find . -iname '__pycache__' -delete | ||
@rm -rf '.pytest_cache' | ||
@rm -rf dist/ | ||
@rm -rf build/ | ||
@rm -rf *.egg-info | ||
@rm -rf .tox | ||
@rm -rf venv/lib/python*/site-packages/*.egg | ||
|
||
.PHONY: install_deps | ||
install_deps: | ||
python -m pip install poetry | ||
poetry install | ||
|
||
.PHONY: install | ||
install: | ||
poetry build | ||
poetry install | ||
|
||
.PHONY: lint | ||
lint: | ||
poetry run tox -e lint | ||
|
||
.PHONY: test | ||
test: | ||
poetry run pytest -v |
Oops, something went wrong.