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.
MarginInitialPrice
One initial price to publish on the feed before tiers are published (publish_tier_version prices every non-collateral tier asset). bid/ask are u128 decimal strings scaled 1e18 per whole unit.
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§

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.