Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Register & configure fees · Boson Protocol
Skip to content

Register & configure fees

A DR is registered with createDisputeResolver. After registration, configure the supported chains × tokens × fees and (optionally) a seller allowlist.

SDK
const tx = await sdk.createDisputeResolver({
  escalationResponsePeriodInMS: 7 * 24 * 60 * 60 * 1000,  // ms, like every other duration in the SDK
  assistant: wallet.address,
  admin: wallet.address,
  treasury: wallet.address,
  metadataUri: "ipfs://Qm…", // terms of service, contact, etc.
  fees: [
    { tokenAddress: USDC_ADDRESS, tokenName: "USDC", feeAmount: "0" },
    { tokenAddress: ethers.constants.AddressZero, tokenName: "ETH", feeAmount: "0" },
  ],
  sellerAllowList: [],  // empty = any seller may use this DR
})

The protocol now sets the clerk and active fields automatically (no longer takes them as input).

After creation, fees and allowlist can also be modified later:

  • sdk.addFeesToDisputeResolver(drId, [{ tokenAddress, tokenName, feeAmount }])
  • sdk.addSellersToAllowList(drId, [sellerIds]) (or omit and accept any seller)

Common gotchas

  • escalationResponsePeriodInMS is in milliseconds, like other SDK duration fields.
  • You must supply at least one fee at creation. Add more later via addFeesToDisputeResolver.
  • Fees are per-token. Each chain × token combo must be added.
  • You can't retroactively change fees on existing offers. Offers cache the DR fee at creation.

Next