Skip to main content

Crate o2_deploy

Crate o2_deploy 

Source
Expand description

Contract deployment logic for the Fuel O2 exchange.

This crate extracts the core deploy workflow from the api package, making it reusable from both the API binary and the standalone o2-deploy CLI.

Structs§

DeployParams
Parameters for a deploy invocation.
ExistingRegistry
An already-deployed shared trade-account registry to reuse for prop-account registration instead of deploying a dedicated one. The registry’s implementation is UPGRADED in place (new blob, same proxy) to carry the prop configurables, so the oracle ids it was deployed with must be repeated — the fresh implementation blob embeds them again.
MarginConfig
Optional margin section of the deploy config: the prop margin pool, the prop account oracle, the price feed and the tier catalogue.
MarginIds
The margin stack’s resolved ids, echoed on the deploy output.
MarginPriceFeedConfig
The price_feed sub-section: everything about the ORACLE the pool values against, kept apart from the pool’s own settings because it is a separate contract with its own lifecycle, ownership and roles.
MarginSupportedAsset
One asset the price feed must know the decimals of. Registering the decimals is what makes an asset SUPPORTED by the feed; publishing a price for it is a separate, later act. Declaring assets here therefore lets a freshly deployed feed be configured up front, before any publisher has produced a single quote.
MarginTierConfig
One tier of the margin catalogue. Mirrors the on-chain TierParams plus the tier id and the markets (order books) it covers. line follows the config convention of u64 amounts as strings.
MarketsConfigOutput
MarketsConfigPartial
OwnershipTransferOptions
PropDeployConfig
Deployment-time settings for the prop-account system.
PropDeployment
Handles and implementation blob IDs produced by a complete deployment.

Functions§

audit_order_book_precision
Checks every pair against its precision budget, naming the first offender.
deploy
Deploy (or upgrade) the full set of O2 contracts.
deploy_prop_system
Deploy the independent prop-account system.
load_config_from_file
Load a JSON config file, returning T::default() when the path is empty.