The dispute resolver entity MUST be created before any dispute resolver actions can be performed.
Dispute resolvers decide the dispute outcome when the buyer and seller cannot do it mutually. The dispute resolver is a complex role with admin, assistant and treasury. Initially, all roles must be the same Ethereum address; however, the admin can later change them to other addresses.
Dispute resolvers decide in which tokens they are willing to accept the fee and what the amount is.
Dispute resolvers can set a list of allowed sellers, i.e. the seller ID for which they are willing to do the dispute resolution.
IBosonAccountHandler bosonProtocol = IBosonAccountHandler(_bosonProtocolAddress);
BosonTypes.DisputeResolver memory disputeResolver = BosonTypes.DisputeResolver({
id: 1, // existing dispute resolver ID
escalationResponsePeriod: 1209600, // 2 weeks in seconds
assistant: newAssistantAddress,
admin: newAdminAddress,
clerk: address(0), // deprecated, always zero
treasury: payable(newTreasuryAddress),
metadataUri: "https://ipfs.io/ipfs/updated-dispute-resolver-metadata",
active: true // active flag from storage will be used
});
bosonProtocol.updateDisputeResolver(disputeResolver);
// For admin/assistant updates, new addresses must opt in:
bosonProtocol.optInToDisputeResolverUpdate(disputeResolverId, fieldsToUpdate);