Skip to main content

A python SDK for the Rubicon Protocol

Project description

rubi

rubi is a python SDK for the Rubicon Protocol and has a variety of functionality for interacting with the protocol. Documentation related to rubi and its functionality can be found here.

Design Goals

The underlying goal of the design of rubi is to provide developers with a seamless integration experience when interacting with the Rubicon. The SDK is built with the goal of enabling efficient and reliable communication with Rubicon's smart contracts, empowering developers to effortlessly access and utilize Rubicon's features in their Python applications.

Examples

Examples of using the rubi sdk can be found here.

Directory Structure

├── docs
│   ├── examples
│   │   ├── example.py
│   ├── ...
├── network_config
│   ├── abis
│   │   ├── ERC20.json
│   │   ├── market.json
│   │   ├── ...
│   ├── optimism
│   │   ├── network.yaml
│   ├── ...
│   ├── README.md
├── rubi
│   ├── contracts
│   ├── data
│   ├── network
│   ├── rubicon_types
│   ├── client.py
│   ├── __init__.py
├── tests
│   ├── ...
├── poetry.lock
├── pyproject.toml
└──...

The codebase follows the structure detailed above with:

  • docs: all the sources for documentation along with some examples.
  • network_config: configuration and abis for the different networks. For more details see the README.md.
  • rubi: the python sources root. The main entrypoint for most users will be the client.py.
  • tests: test coverage of the repository.

Decisions and Considerations

- Writing to the chain

Throughout the codebase we offer the user the option to pass in a nonce argument or derive it from chain state if none is provided (via the get_transaction_count function). Aspirationally, we want to support a python based nonce manager that can be used to manage nonces for the user. Until then, this optional parameter is meant to enable the user to manage nonces themselves. When a user does not provide a nonce, we derive it from chain state accordingly. In this case, we also wait for the transaction to be confirmed before continuing. If the transaction fails, an exception is raised and the program is exited. The user can override this behavior by managing nonces themselves.

SDK Disclaimer

This codebase is in Alpha and could contain bugs or change significantly between versions. Contributing through Issues or Pull Requests is welcome!

Protocol Disclaimer

Please refer to this for information on the risks associated to the Rubicon Protocol.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rubi-3.0.0.tar.gz (47.2 kB view details)

Uploaded Source

Built Distribution

rubi-3.0.0-py3-none-any.whl (58.3 kB view details)

Uploaded Python 3

File details

Details for the file rubi-3.0.0.tar.gz.

File metadata

  • Download URL: rubi-3.0.0.tar.gz
  • Upload date:
  • Size: 47.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for rubi-3.0.0.tar.gz
Algorithm Hash digest
SHA256 f2b4785452b7640234ffdee7f766a0a2a1e3727a06a5c178ac11bb1436390cd4
MD5 ea2ae1a0bdff69a01dda254f2b16e58d
BLAKE2b-256 f9216e0bcaad8175493a7ce57e48916099f685089f5e640fc50413c778c7b8f2

See more details on using hashes here.

File details

Details for the file rubi-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: rubi-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 58.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for rubi-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02d07239b35d8bf683eaa602a5473dabb6fc1bc3623e5b553c66276b988b3573
MD5 651e6fa0dc298047490a3a0f5d86b7a3
BLAKE2b-256 68b931d321a9c562ba4b6d800aaf2047b3c3752cf8bf7aa91a13522b7012df8a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page