Skip to main content

IBosonOrchestrationHandler

View Source: contracts/interfaces/handlers/IBosonOrchestrationHandler.sol

↗ Extends: IBosonAccountEvents, IBosonGroupEvents, IBosonOfferEvents, IBosonTwinEvents, IBosonBundleEvents

IBosonOrchestrationHandler

Combines creation of multiple entities (accounts, offers, groups, twins, bundles) in a single transaction
The ERC-165 identifier for this interface is: 0x7e216084

Functions

raiseAndEscalateDispute

Raises a dispute and immediately escalates it.
Caller must send (or for ERC20, approve the transfer of) the
buyer escalation deposit percentage of the offer price, which
will be added to the pot for resolution.
Emits a DisputeRaised and a DisputeEscalated event if successful.
Reverts if:
- The disputes region of protocol is paused
- The orchestration region of protocol is paused
- Caller is not the buyer for the given exchange id
- Exchange does not exist
- Exchange is not in a Redeemed state
- Dispute period has elapsed already
- Dispute resolver is not specified (absolute zero offer)
- Offer price is in native token and caller does not send enough
- Offer price is in some ERC20 token and caller also sends native currency
- If contract at token address does not support ERC20 function transferFrom
- If calling transferFrom on token fails for some reason (e.g. protocol is not approved to transfer)
- Received ERC20 token amount differs from the expected value

function raiseAndEscalateDispute(uint256 _exchangeId) 
external
payable

Arguments

NameTypeDescription
_exchangeIduint256the id of the associated exchange

createSellerAndOffer

Creates a seller (with optional auth token) and an offer in a single transaction.
Limitation of the method:
If chosen dispute resolver has seller allow list, this method will not succeed, since seller that will be created
cannot be on that list. To avoid the failure you can
- Choose a dispute resolver without seller allow list
- Make an absolute zero offer without and dispute resolver specified
- First create a seller {AccountHandler.createSeller}, make sure that dispute resolver adds seller to its allow list
and then continue with the offer creation
Emits a SellerCreated and an OfferCreated event if successful.
Reverts if:
- The sellers region of protocol is paused
- The offers region of protocol is paused
- The orchestration region of protocol is paused
- Caller is not the supplied admin or does not own supplied auth token
- Caller is not the supplied assistant
- Supplied clerk is not a zero address
- Admin address is zero address and AuthTokenType == None
- AuthTokenType is not unique to this seller
- Seller salt is not unique
- Clone creation fails
- In seller struct:
- Address values are zero address
- Addresses are not unique to this seller
- Seller is not active (if active == false)
- In offer struct:
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit

function createSellerAndOffer(struct BosonTypes.Seller _seller,
struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
struct BosonTypes.AuthToken _authToken,
struct BosonTypes.VoucherInitValues _voucherInitValues,
uint256 _agentId)
external

Arguments

NameTypeDescription
_sellerBosonTypes.Sellerthe fully populated seller struct
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_authTokenBosonTypes.AuthTokenoptional AuthToken struct that specifies an AuthToken type and tokenId that the seller can use to do admin functions
_voucherInitValuesBosonTypes.VoucherInitValuesthe fully populated BosonTypes.VoucherInitValues struct
_agentIduint256the id of agent

createSellerAndPremintedOffer

Creates a seller (with optional auth token), an offer and reserve range for preminting in a single transaction.
Limitation of the method:
If chosen dispute resolver has seller allow list, this method will not succeed, since seller that will be created
cannot be on that list. To avoid the failure you can
- Choose a dispute resolver without seller allow list
- Make an absolute zero offer without and dispute resolver specified
- First create a seller {AccountHandler.createSeller}, make sure that dispute resolver adds seller to its allow list
and then continue with the offer creation
Emits a SellerCreated, an OfferCreated and a RangeReserved event if successful.
Reverts if:
- The sellers region of protocol is paused
- The offers region of protocol is paused
- The orchestration region of protocol is paused
- The exchanges region of protocol is paused
- Caller is not the supplied assistant
- Caller is not the supplied admin or does not own supplied auth token
- Supplied clerk is not a zero address
- Admin address is zero address and AuthTokenType == None
- AuthTokenType is not unique to this seller
- Reserved range length is zero
- Reserved range length is greater than quantity available
- Reserved range length is greater than maximum allowed range length
- Seller salt is not unique
- Clone creation fails
- In seller struct:
- Address values are zero address
- Addresses are not unique to this seller
- Seller is not active (if active == false)
- In offer struct:
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit
- _to is not the BosonVoucher contract address or the BosonVoucher contract ownerNo reentrancy guard here since already implemented by called functions. If added here, they would clash.

function createSellerAndPremintedOffer(struct BosonTypes.Seller _seller,
struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
uint256 _reservedRangeLength,
address _to,
struct BosonTypes.AuthToken _authToken,
struct BosonTypes.VoucherInitValues _voucherInitValues,
uint256 _agentId)
external

Arguments

NameTypeDescription
_sellerBosonTypes.Sellerthe fully populated seller struct
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_reservedRangeLengthuint256the amount of tokens to be reserved for preminting
_toaddressthe address to send the pre-minted vouchers to (contract address or contract owner)
_authTokenBosonTypes.AuthTokenoptional AuthToken struct that specifies an AuthToken type and tokenId that the seller can use to do admin functions
_voucherInitValuesBosonTypes.VoucherInitValuesthe fully populated BosonTypes.VoucherInitValues struct
_agentIduint256the id of agent

createOfferWithCondition

Takes an offer and a condition, creates an offer, then creates a group with that offer and the given condition.
Emits an OfferCreated and a GroupCreated event if successful.
Reverts if:
- The offers region of protocol is paused
- The groups region of protocol is paused
- The orchestration region of protocol is paused
- In offer struct:
- Caller is not an assistant
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- Condition includes invalid combination of parameters
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit

function createOfferWithCondition(struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
struct BosonTypes.Condition _condition,
uint256 _agentId)
external

Arguments

NameTypeDescription
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_conditionBosonTypes.Conditionthe fully populated condition struct
_agentIduint256the id of agent

createPremintedOfferWithCondition

Takes an offer, range for preminting and a condition, creates an offer, then creates a group with that offer and the given condition and then reservers range for preminting.
Emits an OfferCreated, a GroupCreated and a RangeReserved event if successful.
Reverts if:
- The offers region of protocol is paused
- The groups region of protocol is paused
- The exchanges region of protocol is paused
- The orchestration region of protocol is paused
- Reserved range length is zero
- Reserved range length is greater than quantity available
- Reserved range length is greater than maximum allowed range length
- In offer struct:
- Caller is not an assistant
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- Condition includes invalid combination of parameters
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit
- _to is not the BosonVoucher contract address or the BosonVoucher contract ownerNo reentrancy guard here since already implemented by called functions. If added here, they would clash.

function createPremintedOfferWithCondition(struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
uint256 _reservedRangeLength,
address _to,
struct BosonTypes.Condition _condition,
uint256 _agentId)
external

Arguments

NameTypeDescription
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_reservedRangeLengthuint256the amount of tokens to be reserved for preminting
_toaddressthe address to send the pre-minted vouchers to (contract address or contract owner)
_conditionBosonTypes.Conditionthe fully populated condition struct
_agentIduint256the id of agent

createOfferAddToGroup

Takes an offer and group ID, creates an offer and adds it to the existing group with given id.
Emits an OfferCreated and a GroupUpdated event if successful.
Reverts if:
- The offers region of protocol is paused
- The groups region of protocol is paused
- The orchestration region of protocol is paused
- In offer struct:
- Caller is not an assistant
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- When adding to the group if:
- Group does not exists
- Caller is not the assistant of the group
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit

function createOfferAddToGroup(struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
uint256 _groupId,
uint256 _agentId)
external

Arguments

NameTypeDescription
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_groupIduint256id of the group, to which offer will be added
_agentIduint256the id of agent

createPremintedOfferAddToGroup

Takes an offer, a range for preminting and group ID, creates an offer and adds it to the existing group with given id and reserves the range for preminting.
Emits an OfferCreated, a GroupUpdated and a RangeReserved event if successful.
Reverts if:
- The offers region of protocol is paused
- The groups region of protocol is paused
- The exchanges region of protocol is paused
- The orchestration region of protocol is paused
- Reserved range length is zero
- Reserved range length is greater than quantity available
- Reserved range length is greater than maximum allowed range length
- In offer struct:
- Caller is not an assistant
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- When adding to the group if:
- Group does not exists
- Caller is not the assistant of the group
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit
- _to is not the BosonVoucher contract address or the BosonVoucher contract ownerNo reentrancy guard here since already implemented by called functions. If added here, they would clash.

function createPremintedOfferAddToGroup(struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
uint256 _reservedRangeLength,
address _to,
uint256 _groupId,
uint256 _agentId)
external

Arguments

NameTypeDescription
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_reservedRangeLengthuint256the amount of tokens to be reserved for preminting
_toaddressthe address to send the pre-minted vouchers to (contract address or contract owner)
_groupIduint256id of the group, to which offer will be added
_agentIduint256the id of agent

createOfferAndTwinWithBundle

Takes an offer and a twin, creates an offer, creates a twin, then creates a bundle with that offer and the given twin.
Emits an OfferCreated, a TwinCreated and a BundleCreated event if successful.
Reverts if:
- The offers region of protocol is paused
- The twins region of protocol is paused
- The bundles region of protocol is paused
- The orchestration region of protocol is paused
- In offer struct:
- Caller is not an assistant
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- When creating twin if
- Not approved to transfer the seller's token
- SupplyAvailable is zero
- Twin is NonFungibleToken and amount was set
- Twin is NonFungibleToken and end of range would overflow
- Twin is NonFungibleToken with unlimited supply and starting token id is too high
- Twin is NonFungibleToken and range is already being used in another twin of the seller
- Twin is FungibleToken or MultiToken and amount was not set
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit

function createOfferAndTwinWithBundle(struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
struct BosonTypes.Twin _twin,
uint256 _agentId)
external

Arguments

NameTypeDescription
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_twinBosonTypes.Twinthe fully populated twin struct
_agentIduint256the id of agent

createPremintedOfferAndTwinWithBundle

Takes an offer, a range for preminting and a twin, creates an offer, creates a twin, then creates a bundle with that offer and the given twin and reserves the range for preminting.
Emits an OfferCreated, a TwinCreated and a BundleCreated and a RangeReserved event if successful.
Reverts if:
- The offers region of protocol is paused
- The twins region of protocol is paused
- The bundles region of protocol is paused
- The exchanges region of protocol is paused
- The orchestration region of protocol is paused
- Reserved range length is zero
- Reserved range length is greater than quantity available
- Reserved range length is greater than maximum allowed range length
- In offer struct:
- Caller is not an assistant
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- When creating twin if
- Not approved to transfer the seller's token
- SupplyAvailable is zero
- Twin is NonFungibleToken and amount was set
- Twin is NonFungibleToken and end of range would overflow
- Twin is NonFungibleToken with unlimited supply and starting token id is too high
- Twin is NonFungibleToken and range is already being used in another twin of the seller
- Twin is FungibleToken or MultiToken and amount was not set
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit
- _to is not the BosonVoucher contract address or the BosonVoucher contract ownerNo reentrancy guard here since already implemented by called functions. If added here, they would clash.

function createPremintedOfferAndTwinWithBundle(struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
uint256 _reservedRangeLength,
address _to,
struct BosonTypes.Twin _twin,
uint256 _agentId)
external

Arguments

NameTypeDescription
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_reservedRangeLengthuint256the amount of tokens to be reserved for preminting
_toaddressthe address to send the pre-minted vouchers to (contract address or contract owner)
_twinBosonTypes.Twinthe fully populated twin struct
_agentIduint256the id of agent

createOfferWithConditionAndTwinAndBundle

Takes an offer, a condition and a twin, creates an offer, then creates a group with that offer and the given condition.
It then creates a twin, then creates a bundle with that offer and the given twin.
Emits an OfferCreated, a GroupCreated, a TwinCreated and a BundleCreated event if successful.
Reverts if:
- The offers region of protocol is paused
- The groups region of protocol is paused
- The twins region of protocol is paused
- The bundles region of protocol is paused
- The orchestration region of protocol is paused
- In offer struct:
- Caller is not an assistant
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- Condition includes invalid combination of parameters
- When creating twin if
- Not approved to transfer the seller's token
- SupplyAvailable is zero
- Twin is NonFungibleToken and amount was set
- Twin is NonFungibleToken and end of range would overflow
- Twin is NonFungibleToken with unlimited supply and starting token id is too high
- Twin is NonFungibleToken and range is already being used in another twin of the seller
- Twin is FungibleToken or MultiToken and amount was not set
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit

function createOfferWithConditionAndTwinAndBundle(struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
struct BosonTypes.Condition _condition,
struct BosonTypes.Twin _twin,
uint256 _agentId)
external

Arguments

NameTypeDescription
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_conditionBosonTypes.Conditionthe fully populated condition struct
_twinBosonTypes.Twinthe fully populated twin struct
_agentIduint256the id of agent

createPremintedOfferWithConditionAndTwinAndBundle

Takes an offer, a range for preminting, a condition and a twin, creates an offer, then creates a group with that offer and the given condition.
It then creates a twin, then creates a bundle with that offer and the given twin and reserves the range for preminting.
Emits an OfferCreated, a GroupCreated, a TwinCreated, a BundleCreated and a RangeReserved event if successful.
Reverts if:
- The offers region of protocol is paused
- The groups region of protocol is paused
- The twins region of protocol is paused
- The bundles region of protocol is paused
- The exchanges region of protocol is paused
- The orchestration region of protocol is paused
- Reserved range length is zero
- Reserved range length is greater than quantity available
- Reserved range length is greater than maximum allowed range length
- In offer struct:
- Caller is not an assistant
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- Condition includes invalid combination of parameters
- When creating twin if
- Not approved to transfer the seller's token
- SupplyAvailable is zero
- Twin is NonFungibleToken and amount was set
- Twin is NonFungibleToken and end of range would overflow
- Twin is NonFungibleToken with unlimited supply and starting token id is too high
- Twin is NonFungibleToken and range is already being used in another twin of the seller
- Twin is FungibleToken or MultiToken and amount was not set
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit
- _to is not the BosonVoucher contract address or the BosonVoucher contract ownerNo reentrancy guard here since already implemented by called functions. If added here, they would clash.

function createPremintedOfferWithConditionAndTwinAndBundle(struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
uint256 _reservedRangeLength,
address _to,
struct BosonTypes.Condition _condition,
struct BosonTypes.Twin _twin,
uint256 _agentId)
external

Arguments

NameTypeDescription
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_reservedRangeLengthuint256the amount of tokens to be reserved for preminting
_toaddressthe address to send the pre-minted vouchers to (contract address or contract owner)
_conditionBosonTypes.Conditionthe fully populated condition struct
_twinBosonTypes.Twinthe fully populated twin struct
_agentIduint256the id of agent

createSellerAndOfferWithCondition

Takes a seller, an offer, a condition and an optional auth token. Creates a seller, creates an offer,
then creates a group with that offer and the given condition.
Limitation of the method:
If chosen dispute resolver has seller allow list, this method will not succeed, since seller that will be created
cannot be on that list. To avoid the failure you can
- Choose a dispute resolver without seller allow list
- Make an absolute zero offer without and dispute resolver specified
- First create a seller {AccountHandler.createSeller}, make sure that dispute resolver adds seller to its allow list
and then continue with the offer creation
Emits a SellerCreated, an OfferCreated and a GroupCreated event if successful.
Reverts if:
- The sellers region of protocol is paused
- The offers region of protocol is paused
- The groups region of protocol is paused
- The orchestration region of protocol is paused
- Caller is not the supplied admin or does not own supplied auth token
- Caller is not the supplied assistant
- Supplied clerk is not a zero address
- Admin address is zero address and AuthTokenType == None
- AuthTokenType is not unique to this seller
- Seller salt is not unique
- Clone creation fails
- In seller struct:
- Address values are zero address
- Addresses are not unique to this seller
- Seller is not active (if active == false)
- In offer struct:
- Caller is not an assistant
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- Condition includes invalid combination of parameters
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit

function createSellerAndOfferWithCondition(struct BosonTypes.Seller _seller,
struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
struct BosonTypes.Condition _condition,
struct BosonTypes.AuthToken _authToken,
struct BosonTypes.VoucherInitValues _voucherInitValues,
uint256 _agentId)
external

Arguments

NameTypeDescription
_sellerBosonTypes.Sellerthe fully populated seller struct
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_conditionBosonTypes.Conditionthe fully populated condition struct
_authTokenBosonTypes.AuthTokenoptional AuthToken struct that specifies an AuthToken type and tokenId that the seller can use to do admin functions
_voucherInitValuesBosonTypes.VoucherInitValuesthe fully populated BosonTypes.VoucherInitValues struct
_agentIduint256the id of agent

createSellerAndPremintedOfferWithCondition

Takes a seller, an offer, a range for preminting, a condition and an optional auth token. Creates a seller, creates an offer,
then creates a group with that offer and the given condition and reserves the range for preminting.
Limitation of the method:
If chosen dispute resolver has seller allow list, this method will not succeed, since seller that will be created
cannot be on that list. To avoid the failure you can
- Choose a dispute resolver without seller allow list
- Make an absolute zero offer without and dispute resolver specified
- First create a seller {AccountHandler.createSeller}, make sure that dispute resolver adds seller to its allow list
and then continue with the offer creation
Emits a SellerCreated, an OfferCreated, a GroupCreated and a RangeReserved event if successful.
Reverts if:
- The sellers region of protocol is paused
- The offers region of protocol is paused
- The groups region of protocol is paused
- The exchanges region of protocol is paused
- The orchestration region of protocol is paused
- Caller is not the supplied assistant
- Caller is not the supplied admin or does not own supplied auth token
- Supplied clerk is not a zero address
- Admin address is zero address and AuthTokenType == None
- AuthTokenType is not unique to this seller
- Reserved range length is zero
- Reserved range length is greater than quantity available
- Reserved range length is greater than maximum allowed range length
- Seller salt is not unique
- Clone creation fails
- In seller struct:
- Address values are zero address
- Addresses are not unique to this seller
- Seller is not active (if active == false)
- In offer struct:
- Caller is not an assistant
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- Condition includes invalid combination of parameters
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit
- _to is not the BosonVoucher contract address or the BosonVoucher contract ownerNo reentrancy guard here since already implemented by called functions. If added here, they would clash.

function createSellerAndPremintedOfferWithCondition(struct BosonTypes.Seller _seller,
struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
uint256 _reservedRangeLength,
address _to,
struct BosonTypes.Condition _condition,
struct BosonTypes.AuthToken _authToken,
struct BosonTypes.VoucherInitValues _voucherInitValues,
uint256 _agentId)
external

Arguments

NameTypeDescription
_sellerBosonTypes.Sellerthe fully populated seller struct
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_reservedRangeLengthuint256the amount of tokens to be reserved for preminting
_toaddressthe address to send the pre-minted vouchers to (contract address or contract owner)
_conditionBosonTypes.Conditionthe fully populated condition struct
_authTokenBosonTypes.AuthTokenoptional AuthToken struct that specifies an AuthToken type and tokenId that the seller can use to do admin functions
_voucherInitValuesBosonTypes.VoucherInitValuesthe fully populated BosonTypes.VoucherInitValues struct
_agentIduint256the id of agent

createSellerAndOfferAndTwinWithBundle

Takes a seller, an offer, a twin, and an optional auth token. Creates a seller, creates an offer, creates a twin,
then creates a bundle with that offer and the given twin.
Limitation of the method:
If chosen dispute resolver has seller allow list, this method will not succeed, since seller that will be created
cannot be on that list. To avoid the failure you can
- Choose a dispute resolver without seller allow list
- Make an absolute zero offer without and dispute resolver specified
- First create a seller {AccountHandler.createSeller}, make sure that dispute resolver adds seller to its allow list
and then continue with the offer creation
Emits a SellerCreated, an OfferCreated, a TwinCreated and a BundleCreated event if successful.
Reverts if:
- The sellers region of protocol is paused
- The offers region of protocol is paused
- The twins region of protocol is paused
- The bundles region of protocol is paused
- The orchestration region of protocol is paused
- Caller is not the supplied admin or does not own supplied auth token
- Caller is not the supplied assistant
- Supplied clerk is not a zero address
- Admin address is zero address and AuthTokenType == None
- AuthTokenType is not unique to this seller
- Seller salt is not unique
- Clone creation fails
- In seller struct:
- Address values are zero address
- Addresses are not unique to this seller
- Seller is not active (if active == false)
- In offer struct:
- Caller is not an assistant
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- When creating twin if
- Not approved to transfer the seller's token
- SupplyAvailable is zero
- Twin is NonFungibleToken and amount was set
- Twin is NonFungibleToken and end of range would overflow
- Twin is NonFungibleToken with unlimited supply and starting token id is too high
- Twin is NonFungibleToken and range is already being used in another twin of the seller
- Twin is FungibleToken or MultiToken and amount was not set
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit

function createSellerAndOfferAndTwinWithBundle(struct BosonTypes.Seller _seller,
struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
struct BosonTypes.Twin _twin,
struct BosonTypes.AuthToken _authToken,
struct BosonTypes.VoucherInitValues _voucherInitValues,
uint256 _agentId)
external

Arguments

NameTypeDescription
_sellerBosonTypes.Sellerthe fully populated seller struct
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_twinBosonTypes.Twinthe fully populated twin struct
_authTokenBosonTypes.AuthTokenoptional AuthToken struct that specifies an AuthToken type and tokenId that the seller can use to do admin functions
_voucherInitValuesBosonTypes.VoucherInitValuesthe fully populated BosonTypes.VoucherInitValues struct
_agentIduint256the id of agent

createSellerAndPremintedOfferAndTwinWithBundle

Takes a seller, an offer, a range for preminting, a twin, and an optional auth token. Creates a seller, creates an offer, creates a twin,
then creates a bundle with that offer and the given twin and reserves the range for preminting.
Limitation of the method:
If chosen dispute resolver has seller allow list, this method will not succeed, since seller that will be created
cannot be on that list. To avoid the failure you can
- Choose a dispute resolver without seller allow list
- Make an absolute zero offer without and dispute resolver specified
- First create a seller {AccountHandler.createSeller}, make sure that dispute resolver adds seller to its allow list
and then continue with the offer creation
Emits a SellerCreated, an OfferCreated, a TwinCreated, a BundleCreated and a RangeReserved event if successful.
Reverts if:
- The sellers region of protocol is paused
- The offers region of protocol is paused
- The twins region of protocol is paused
- The bundles region of protocol is paused
- The exchanges region of protocol is paused
- The orchestration region of protocol is paused
- Caller is not the supplied assistant
- Caller is not the supplied admin or does not own supplied auth token
- Supplied clerk is not a zero address
- Admin address is zero address and AuthTokenType == None
- AuthTokenType is not unique to this seller
- Reserved range length is zero
- Reserved range length is greater than quantity available
- Reserved range length is greater than maximum allowed range length
- Seller salt is not unique
- Clone creation fails
- In seller struct:
- Address values are zero address
- Addresses are not unique to this seller
- Seller is not active (if active == false)
- In offer struct:
- Caller is not an assistant
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- When creating twin if
- Not approved to transfer the seller's token
- SupplyAvailable is zero
- Twin is NonFungibleToken and amount was set
- Twin is NonFungibleToken and end of range would overflow
- Twin is NonFungibleToken with unlimited supply and starting token id is too high
- Twin is NonFungibleToken and range is already being used in another twin of the seller
- Twin is FungibleToken or MultiToken and amount was not set
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit
- _to is not the BosonVoucher contract address or the BosonVoucher contract ownerNo reentrancy guard here since already implemented by called functions. If added here, they would clash.

function createSellerAndPremintedOfferAndTwinWithBundle(struct BosonTypes.Seller _seller,
struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
uint256 _reservedRangeLength,
address _to,
struct BosonTypes.Twin _twin,
struct BosonTypes.AuthToken _authToken,
struct BosonTypes.VoucherInitValues _voucherInitValues,
uint256 _agentId)
external

Arguments

NameTypeDescription
_sellerBosonTypes.Sellerthe fully populated seller struct
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_reservedRangeLengthuint256the amount of tokens to be reserved for preminting
_toaddressthe address to send the pre-minted vouchers to (contract address or contract owner)
_twinBosonTypes.Twinthe fully populated twin struct
_authTokenBosonTypes.AuthTokenoptional AuthToken struct that specifies an AuthToken type and tokenId that the seller can use to do admin functions
_voucherInitValuesBosonTypes.VoucherInitValuesthe fully populated BosonTypes.VoucherInitValues struct
_agentIduint256the id of agent

createSellerAndOfferWithConditionAndTwinAndBundle

Takes a seller, an offer, a condition and a twin, and an optional auth token. Creates a seller an offer,
then creates a group with that offer and the given condition. It then creates a twin and a bundle with that offer and the given twin.
Limitation of the method:
If chosen dispute resolver has seller allow list, this method will not succeed, since seller that will be created
cannot be on that list. To avoid the failure you can
- Choose a dispute resolver without seller allow list
- Make an absolute zero offer without and dispute resolver specified
- First create a seller {AccountHandler.createSeller}, make sure that dispute resolver adds seller to its allow list
and then continue with the offer creation
Emits an SellerCreated, OfferCreated, a GroupCreated, a TwinCreated and a BundleCreated event if successful.
Reverts if:
- The sellers region of protocol is paused
- The offers region of protocol is paused
- The groups region of protocol is paused
- The twins region of protocol is paused
- The bundles region of protocol is paused
- The orchestration region of protocol is paused
- Caller is not the supplied admin or does not own supplied auth token
- Caller is not the supplied assistant
- Supplied clerk is not a zero address
- Admin address is zero address and AuthTokenType == None
- AuthTokenType is not unique to this seller
- Seller salt is not unique
- Clone creation fails
- In seller struct:
- Address values are zero address
- Addresses are not unique to this seller
- Seller is not active (if active == false)
- In offer struct:
- Caller is not an assistant
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- Condition includes invalid combination of parameters
- When creating twin if
- Not approved to transfer the seller's token
- SupplyAvailable is zero
- Twin is NonFungibleToken and amount was set
- Twin is NonFungibleToken and end of range would overflow
- Twin is NonFungibleToken with unlimited supply and starting token id is too high
- Twin is NonFungibleToken and range is already being used in another twin of the seller
- Twin is FungibleToken or MultiToken and amount was not set
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit

function createSellerAndOfferWithConditionAndTwinAndBundle(struct BosonTypes.Seller _seller,
struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
struct BosonTypes.Condition _condition,
struct BosonTypes.Twin _twin,
struct BosonTypes.AuthToken _authToken,
struct BosonTypes.VoucherInitValues _voucherInitValues,
uint256 _agentId)
external

Arguments

NameTypeDescription
_sellerBosonTypes.Sellerthe fully populated seller struct
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_conditionBosonTypes.Conditionthe fully populated condition struct
_twinBosonTypes.Twinthe fully populated twin struct
_authTokenBosonTypes.AuthTokenoptional AuthToken struct that specifies an AuthToken type and tokenId that the seller can use to do admin functions
_voucherInitValuesBosonTypes.VoucherInitValuesthe fully populated BosonTypes.VoucherInitValues struct
_agentIduint256the id of agent

createSellerAndPremintedOfferWithConditionAndTwinAndBundle

Takes a seller, an offer, a range for preminting, a condition and a twin, and an optional auth token. Creates a seller an offer,
then creates a group with that offer and the given condition. It then creates a twin and a bundle with that offer and the given twin
and reserves a range for preminting.
Limitation of the method:
If chosen dispute resolver has seller allow list, this method will not succeed, since seller that will be created
cannot be on that list. To avoid the failure you can
- Choose a dispute resolver without seller allow list
- Make an absolute zero offer without and dispute resolver specified
- First create a seller {AccountHandler.createSeller}, make sure that dispute resolver adds seller to its allow list
and then continue with the offer creation
Emits an SellerCreated, OfferCreated, a GroupCreated, a TwinCreated, a BundleCreated and a RangeReserved event if successful.
Reverts if:
- The sellers region of protocol is paused
- The offers region of protocol is paused
- The groups region of protocol is paused
- The twins region of protocol is paused
- The bundles region of protocol is paused
- The exchanges region of protocol is paused
- The orchestration region of protocol is paused
- Caller is not the supplied assistant
- Caller is not the supplied admin or does not own supplied auth token
- Supplied clerk is not a zero address
- Admin address is zero address and AuthTokenType == None
- AuthTokenType is not unique to this seller
- Reserved range length is zero
- Reserved range length is greater than quantity available
- Reserved range length is greater than maximum allowed range length
- Seller salt is not unique
- Clone creation fails
- In seller struct:
- Address values are zero address
- Addresses are not unique to this seller
- Seller is not active (if active == false)
- In offer struct:
- Caller is not an assistant
- Valid from date is greater than valid until date
- Valid until date is not in the future
- Both voucher expiration date and voucher expiration period are defined
- Neither voucher expiration date nor voucher expiration period are defined
- Voucher redeemable period is fixed, but it ends before it starts
- Voucher redeemable period is fixed, but it ends before offer expires
- Dispute period is less than minimum dispute period
- Resolution period is not between the minimum and the maximum resolution period
- Voided is set to true
- Available quantity is set to zero
- Dispute resolver wallet is not registered, except for absolute zero offers with unspecified dispute resolver
- Dispute resolver is not active, except for absolute zero offers with unspecified dispute resolver
- Seller is not on dispute resolver's seller allow list
- Dispute resolver does not accept fees in the exchange token
- Buyer cancel penalty is greater than price
- Collection does not exist
- Condition includes invalid combination of parameters
- When creating twin if
- Not approved to transfer the seller's token
- SupplyAvailable is zero
- Twin is NonFungibleToken and amount was set
- Twin is NonFungibleToken and end of range would overflow
- Twin is NonFungibleToken with unlimited supply and starting token id is too high
- Twin is NonFungibleToken and range is already being used in another twin of the seller
- Twin is FungibleToken or MultiToken and amount was not set
- When agent id is non zero:
- If Agent does not exist
- If the sum of agent fee amount and protocol fee amount is greater than the offer fee limit
- _to is not the BosonVoucher contract address or the BosonVoucher contract ownerNo reentrancy guard here since already implemented by called functions. If added here, they would clash.

function createSellerAndPremintedOfferWithConditionAndTwinAndBundle(struct BosonTypes.Seller _seller,
struct BosonTypes.Offer _offer,
struct BosonTypes.OfferDates _offerDates,
struct BosonTypes.OfferDurations _offerDurations,
uint256 _disputeResolverId,
uint256 _reservedRangeLength,
address _to,
struct BosonTypes.Condition _condition,
struct BosonTypes.Twin _twin,
struct BosonTypes.AuthToken _authToken,
struct BosonTypes.VoucherInitValues _voucherInitValues,
uint256 _agentId)
external

Arguments

NameTypeDescription
_sellerBosonTypes.Sellerthe fully populated seller struct
_offerBosonTypes.Offerthe fully populated struct with offer id set to 0x0 and voided set to false
_offerDatesBosonTypes.OfferDatesthe fully populated offer dates struct
_offerDurationsBosonTypes.OfferDurationsthe fully populated offer durations struct
_disputeResolverIduint256the id of chosen dispute resolver (can be 0)
_reservedRangeLengthuint256the amount of tokens to be reserved for preminting
_toaddressthe address to send the pre-minted vouchers to (contract address or contract owner)
_conditionBosonTypes.Conditionthe fully populated condition struct
_twinBosonTypes.Twinthe fully populated twin struct
_authTokenBosonTypes.AuthTokenoptional AuthToken struct that specifies an AuthToken type and tokenId that the seller can use to do admin functions
_voucherInitValuesBosonTypes.VoucherInitValuesthe fully populated BosonTypes.VoucherInitValues struct
_agentIduint256the id of agent