MADE
Internals
Crate path, key types, adjacent protocols for MADE.
MADE (Multi-Agentic Decentralized Economics) lives in protocols/made-lib. This page covers where to find the implementation, the key Rust types, and how it composes with adjacent protocols.
Source
| Path | Contains |
|---|---|
protocols/made-lib/src/lib.rs | ProtocolModule impl, operation dispatch |
protocols/made-lib/src/protocol.rs | core protocol logic |
protocols/made-lib/src/types.rs | request/response types (derive schemars::JsonSchema) |
protocols/made-lib/tests/ | unit + integration tests |
schemas/made/v1/ | published JSON Schemas |
ProtocolModule contract
impl ProtocolModule for MadeProtocol {
fn protocol_name(&self) -> &'static str { "MADE" }
fn version(&self) -> &'static str { "v1.0.0" }
fn operations(&self) -> Vec<&'static str> {
vec![
"asset_definition_publish",
"economic_contract_create",
"economic_contract_settle",
"auction_message",
"market_operation_message",
]
}
async fn invoke(&self, op: &str, payload: Value, ctx: &InvokeContext)
-> Result<Response, ProtocolError>
{
match op {
"asset_definition_publish" => self.asset_definition_publish(payload, ctx).await,
"economic_contract_create" => self.economic_contract_create(payload, ctx).await,
"economic_contract_settle" => self.economic_contract_settle(payload, ctx).await,
"auction_message" => self.auction_message(payload, ctx).await,
"market_operation_message" => self.market_operation_message(payload, ctx).await,
_ => Err(ProtocolError::UnknownOperation(op.into())),
}
}
}Adjacent
| Relation | Members |
|---|---|
| Consults | — |
| Records to | MAX · MOTET · MOMENT |
| Subject to | MAXIM · MOAT (cross-org) · MOOT (disputes) |
| Settled with | MEAL · MANA · MADE |
Status
Implemented · production-grade.
Tests
cargo test -p made-lib --all-featuresSee also
ProtocolModuletrait — the contract- Engine pipeline — the 8 stages
- Plugins — author your own