Skip to main content

BosonTypes

View Source: contracts/domain/BosonTypes.sol

BosonTypes

Enums and structs used by the Boson Protocol contract ecosystem.

Enums

PausableRegion

enum PausableRegion {
Offers,
Twins,
Bundles,
Groups,
Sellers,
Buyers,
DisputeResolvers,
Agents,
Exchanges,
Disputes,
Funds,
Orchestration,
MetaTransaction
}

EvaluationMethod

enum EvaluationMethod {
None,
Threshold,
SpecificToken
}

GatingType

enum GatingType {
PerAddress,
PerTokenId
}

ExchangeState

enum ExchangeState {
Committed,
Revoked,
Canceled,
Redeemed,
Completed,
Disputed
}

DisputeState

enum DisputeState {
Resolving,
Retracted,
Resolved,
Escalated,
Decided,
Refused
}

TokenType

enum TokenType {
FungibleToken,
NonFungibleToken,
MultiToken
}

MetaTxInputType

enum MetaTxInputType {
Generic,
CommitToOffer,
Exchange,
Funds,
CommitToConditionalOffer,
ResolveDispute
}

AuthTokenType

enum AuthTokenType {
None,
Custom,
Lens,
ENS
}

SellerUpdateFields

enum SellerUpdateFields {
Admin,
Assistant,
Clerk,
AuthToken
}

DisputeResolverUpdateFields

enum DisputeResolverUpdateFields {
Admin,
Assistant,
Clerk
}

Structs

AuthToken

struct AuthToken {
uint256 tokenId,
BosonTypes.AuthTokenType tokenType
}

Seller

struct Seller {
uint256 id,
address assistant,
address admin,
address clerk,
address payable treasury,
bool active,
string metadataUri
}

Buyer

struct Buyer {
uint256 id,
address payable wallet,
bool active
}

DisputeResolver

struct DisputeResolver {
uint256 id,
uint256 escalationResponsePeriod,
address assistant,
address admin,
address clerk,
address payable treasury,
string metadataUri,
bool active
}

DisputeResolverFee

struct DisputeResolverFee {
address tokenAddress,
string tokenName,
uint256 feeAmount
}

Agent

struct Agent {
uint256 id,
uint256 feePercentage,
address payable wallet,
bool active
}

DisputeResolutionTerms

struct DisputeResolutionTerms {
uint256 disputeResolverId,
uint256 escalationResponsePeriod,
uint256 feeAmount,
uint256 buyerEscalationDeposit
}

Offer

struct Offer {
uint256 id,
uint256 sellerId,
uint256 price,
uint256 sellerDeposit,
uint256 buyerCancelPenalty,
uint256 quantityAvailable,
address exchangeToken,
string metadataUri,
string metadataHash,
bool voided,
uint256 collectionIndex
}

OfferDates

struct OfferDates {
uint256 validFrom,
uint256 validUntil,
uint256 voucherRedeemableFrom,
uint256 voucherRedeemableUntil
}

OfferDurations

struct OfferDurations {
uint256 disputePeriod,
uint256 voucherValid,
uint256 resolutionPeriod
}

Group

struct Group {
uint256 id,
uint256 sellerId,
uint256[] offerIds
}

Condition

struct Condition {
BosonTypes.EvaluationMethod method,
BosonTypes.TokenType tokenType,
address tokenAddress,
BosonTypes.GatingType gating,
uint256 minTokenId,
uint256 threshold,
uint256 maxCommits,
uint256 maxTokenId
}

Exchange

struct Exchange {
uint256 id,
uint256 offerId,
uint256 buyerId,
uint256 finalizedDate,
BosonTypes.ExchangeState state
}

Voucher

struct Voucher {
uint256 committedDate,
uint256 validUntilDate,
uint256 redeemedDate,
bool expired
}

Dispute

struct Dispute {
uint256 exchangeId,
uint256 buyerPercent,
BosonTypes.DisputeState state
}

DisputeDates

struct DisputeDates {
uint256 disputed,
uint256 escalated,
uint256 finalized,
uint256 timeout
}

Receipt

struct Receipt {
uint256 exchangeId,
uint256 offerId,
uint256 buyerId,
uint256 sellerId,
uint256 price,
uint256 sellerDeposit,
uint256 buyerCancelPenalty,
BosonTypes.OfferFees offerFees,
uint256 agentId,
address exchangeToken,
uint256 finalizedDate,
BosonTypes.Condition condition,
uint256 committedDate,
uint256 redeemedDate,
bool voucherExpired,
uint256 disputeResolverId,
uint256 disputedDate,
uint256 escalatedDate,
BosonTypes.DisputeState disputeState,
BosonTypes.TwinReceipt[] twinReceipts
}

TokenRange

struct TokenRange {
uint256 start,
uint256 end,
uint256 twinId
}

Twin

struct Twin {
uint256 id,
uint256 sellerId,
uint256 amount,
uint256 supplyAvailable,
uint256 tokenId,
address tokenAddress,
BosonTypes.TokenType tokenType
}

TwinReceipt

struct TwinReceipt {
uint256 twinId,
uint256 tokenId,
uint256 amount,
address tokenAddress,
BosonTypes.TokenType tokenType
}

Bundle

struct Bundle {
uint256 id,
uint256 sellerId,
uint256[] offerIds,
uint256[] twinIds
}

Funds

struct Funds {
address tokenAddress,
string tokenName,
uint256 availableAmount
}

MetaTransaction

struct MetaTransaction {
uint256 nonce,
address from,
address contractAddress,
string functionName,
bytes functionSignature
}

HashInfo

struct HashInfo {
bytes32 typeHash,
function (bytes) pure returns (bytes32) hashFunction
}

OfferFees

struct OfferFees {
uint256 protocolFee,
uint256 agentFee
}

VoucherInitValues

struct VoucherInitValues {
string contractURI,
uint256 royaltyPercentage,
bytes32 collectionSalt
}

Collection

struct Collection {
address collectionAddress,
string externalId
}