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§
- Deploy
Params - Parameters for a deploy invocation.
- Existing
Registry - 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.
- Margin
Config - Optional
marginsection of the deploy config: the prop margin pool, the prop account oracle, the price feed and the tier catalogue. - Margin
Ids - The margin stack’s resolved ids, echoed on the deploy output.
- Margin
Initial Price - One initial price to publish on the feed before tiers are published
(
publish_tier_versionprices every non-collateral tier asset).bid/askare u128 decimal strings scaled 1e18 per whole unit. - Margin
Tier Config - One tier of the margin catalogue. Mirrors the on-chain
TierParamsplus the tier id and the markets (order books) it covers.linefollows the config convention of u64 amounts as strings. - Markets
Config Output - Markets
Config Partial - Ownership
Transfer Options - Prop
Deploy Config - Deployment-time settings for the prop-account system.
- Prop
Deployment - 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.