Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Solidity / contracts · Boson Protocol
Skip to content

Solidity / contracts

The boson-protocol-contracts repo holds the on-chain protocol: an EIP-2535 Diamond proxy aggregating 21 handler facets.

You'd integrate at this layer if:

  • You're composing Boson into another on-chain protocol.
  • You want a custom orchestration that doesn't exist in the SDK or MCP.
  • You're writing a custom dispute resolver or fee mutualizer.

For 95 % of integrations, the Core SDK or MCP is the right entry point.

Get the addresses

The repo ships JSON address files per network at addresses/{chainId}-{name}-{env}.json. The new docs site auto-generates a table — see Networks & addresses → Contract addresses.

Get the ABIs

pnpm add @bosonprotocol/common @bosonprotocol/ethers-sdk

@bosonprotocol/common ships the merged Diamond ABI; @bosonprotocol/ethers-sdk ships TypeChain factories.

Call from Solidity

interface IBosonOfferHandler {
    function createOffer(
        BosonTypes.Offer calldata _offer,
        BosonTypes.OfferDates calldata _dates,
        BosonTypes.OfferDurations calldata _durations,
        uint256 _disputeResolverId,
        uint256 _agentId,
        uint256 _feeLimit
    ) external;
}
 
contract MyProtocol {
    IBosonOfferHandler immutable diamond;
 
    constructor(address _diamond) {
        diamond = IBosonOfferHandler(_diamond);
    }
 
    function listMyThing(/* … */) external {
        diamond.createOffer(/* … */);
    }
}

The Diamond exposes all 21 facets' functions at the same address. Cast it to whichever interface you need.

Reference

Next