Releases: bosonprotocol/contracts
v1.1.0
Boson Protocol Release v1.1.0
17 March 2022
https://github.com/bosonprotocol/contracts/tree/v1.1.0
The purpose of this release is to enhance the protocol with more flexible conditional commits and more flexible withdrawal pattern.
It will replace the protocol, used by the metaverse commerce application - The Portal
Functionality
It incorporates the following major changes, compared to v1.0.0.
- Gate contract is not limited to non transferable ERC1155 anymore. Now it supports conditions based on holding of ERC20, ERC721 or ERC1155 tokens. It allows checking for ownership of specific ERC721 token and enables the seller to specify a minimal balance of tokens that users need to hold in order to take the offer.
- BosonRouter methods for creating the voucherSet are modified to support new gate functionality. Interface was changed so function now accept all information about conditions in struct ConditionalCommitInfo
- Function
withdrawSingle
is added, which allows withdrawal for specific entity{ISSUER, HOLDER, POOL}
for specific voucher - Fixed the mismatch in escrow state if voucherSet was transferred when some of previously issued vouchers were not finalized yet
- Some minor changes, optimization and refactoring.
- For complete list of changes in code, refer to the bottom of these release notes
Ethereum Mainnet Contract addresses:
Contract Name | Address |
---|---|
TokenRegistry | 0xcaf39b7bcfc3aEd00D62488d3668230B7599CF05 |
VoucherSets | 0xcF6d79E65C49a93a42dd8c474b46998eea4aDEc8 |
Vouchers | 0xDE41a99562adA9Ee04d9750C99A91C1181EbD875 |
VoucherKernel | 0x19c10A47C9356eFD0E4377411Db627636Ee9E3C6 |
Cashier | 0x244154F58e9Bf6C15c3a09846eFB7bEcFe92A880 |
Boson Router | 0x0A393AEF6dbCd7e7088AcF323f9d28b093B9aB5a |
DaiTokenWrapper | 0xc762e8f2Ce9831b7278e2939dFFcD9367dE7e6C8 |
Gate | 0xb3f8AeF4D9E54a17514f40a59AdfC35758A7EC8E |
Erc1155NonTransferable (Quest NFTs for Conditional Commit) | 0xBAd188Ec8B4E168dF2a39C462A7293955EF04bf8 |
Code changes
Gate
enum TokenType {FUNGIBLE_TOKEN, NONFUNGIBLE_TOKEN, MULTI_TOKEN}
was added to keep track of the type of conditional commit token associated with the instance of the Gate contract- The
ConditionalCommitInfo
struct was added toUsingHelpers.sol
. This struct includes the new threshold member. - Voucher sets are now mapped to a
ConditionalCommitInfo
struct instead of a token Id (voucherToToken
replaced byvoucherSetToConditionalCommit
) - The
registerVoucherSetId
function was changed to accept a struct of typeConditionalCommitInfo
instead of individual conditional commit parameters. ThegateAddress
andregisterConditionalCommit
members are not used by this function. The default values can be passed in (0
address andfalse
, respectively). The struct data can be passed in as a JSON object from Typescript. See test file11_gate.ts
for examples - The
registerVoucherSetId
function now allows conditional token Id0
to be registered - The
registerVoucherSetId
function checks that the conditional token type isNONFUNGIBLE_TOKEN
if conditionOWNERSHIP
is chosen - The
check
function was modified to call either thecheckOwnership
orcheckBalance
function, depending on the condition registered for the voucher set - The
checkBalance
function now checks whether balance is>= threshold
instead of> 0
- The
getNftTokenId(_tokenIdSupply)
function was replaced by thegetConditionalCommitInfo(_tokenIdSupply)
function - The
getNonTransferableTokenContract()
function was replaced by thegetConditionalTokenContract()
function - The
LogVoucherSetRegistered
event now emits the_condition
and_threshold
parameters
BosonRouter
- All
requestCreateOrder*Conditional
functions have been modified to accept theConditionalCommitInfo
struct. This modification was necessary for technical reasons. Adding the condition and threshold parameters separately triggered a stack too deep error. The only way to mitigate the error was to reduce the number of parameters being passed into the functions. - The
finalizeConditionalOrder
internal function now passes theConditionalCommitInfo
to theGate.registerVoucherSetId
function - The
LogConditionalOrderCreated
event now also emits_condition
and_threshold
parameters
UsingHelpers
enum Entity {ISSUER, HOLDER, POOL}
is added- New struct
DepositsReleased
is introduced. I holds the information who has already withdrawn deposits and the total withdrawal amount VoucherStatus
has additional field of typeDepositsReleased
- Added field
seller
of a typeaddress
to structVoucherStatus
Cashier
- Function
withdrawSingle
is added. It allows withdrawal for specific entity for specific voucher - Function
withdraw
is refactored, but otherwise its behaviour does not change for an external caller - Introduced
distributeAndWithdraw
internal function which calculates what entity should receive and distribute funds - When withdrawing funds, issuer is no longer determined as supply holder, but rather as voucher seller (by calling
getVoucherSeller
instead of getSupplyHolder)
VoucherKernel
- New function
getTotalDepositsForVoucher
inVoucherKernel
which returns the sum of buyer and seller deposit - Function
isDepositReleased
is added toVoucherKernel
. It tells if if entity has already withdrawn the deposits for a given voucher - Function
setDepositsReleased
is changed so it properly stores the information about deposit withdrawals - When voucher is created (function
extract721
), we now set theseller
field ofvoucherStatus
. Value is thesupplyHolder
at the time of the transaction - Function
getVoucherSeller
is added. It returns the address of the seller at the time, when the buyer committed to a voucher. - In
cancelOrFault
we check now that COF was requested by voucher seller, not by current supply holder
v1.1.0-rc.2
11 March 2022
https://github.com/bosonprotocol/contracts/tree/v1.1.0-rc.2
Release notes
- implemented some optimizations suggested by the audit
- fixed a bug in
VoucherKernel.getTotalDeposit
Interfaces remain the same.
v1.1.0-rc.1
3 March 2022
https://github.com/bosonprotocol/contracts/tree/v1.1.0-rc.1
Functionality
This is a release candidate for v1.1.0 of the protocol.
It incorporates the following major changes, compared to v1.0.0.
- Gate contract is not limited to non transferable ERC1155 anymore. Now it supports conditions based on holding of ERC20, ERC721 or ERC1155 tokens. It allows checking for ownership of specific ERC721 token and enables the seller to specify a minimal balance of tokens that users need to hold in order to take the offer.
- BosonRouter methods for creating the voucherSet are modified to support new gate functionality. Interface was changed so function now accept all information about conditions in struct ConditionalCommitInfo
- Function
withdrawSingle
is added, which allows withdrawal for specific entity{ISSUER, HOLDER, POOL}
for specific voucher - FIxed the mismatch in escrow state if voucherSet was transferred when some of previously issued vouchers were not finalized yet
- Some minor changes, based on audit report
Complete list of changes will be released together with the v1.1.0 release.
Release v1.0.0
Boson Protocol Release v1.0.0
03 November 2021
https://github.com/bosonprotocol/contracts/tree/v1.0.0
The purpose of this release is to showcase the Boson Protocol running on Ethereum. The application of the protocol is powering metaverse commerce via The Portal
Functionality
- This version enables conditional commit for all payment types, namely
ETHETH
,ETHTKN
, andTKNETH
. - The protocol currently supports ETH and the $BOSON and DAI tokens.
- As part of the multiple token support, the FundLimitsOracle contract was renamed to TokenRegistry.sol. The functions that were available in FundLimitsOracle.sol contract are still available. The
setTokenWrapperAddress
andgetTokenWrapperAddress
functions were added - Metatransactions for the
ERC1155NonTransferable
contract (conditional commit token) - Updated README
- Internal optimisations
- Test code refactoring
Ethereum Mainnet Contract addresses:
TokenRegistry Contract Address : 0xA939c19121DB32A37708E19B994ff02675e012fa
VoucherSets Contract Address : 0xc7Ce90B985CbD9b6D6daab012F2622e437A7101C
Vouchers Contract Address : 0x17053D2B8a4bEA8B878a99636E25B509e081e2e3
VoucherKernel Contract Address : 0xAA10D375b2b61E99bdBA850550b71b26b1C45746
Cashier Contract Address : 0x783A2e37C1C990435DEbBf3737d3e4E029F6AAe7
BosonRouter Contract Address : 0x48093736F038935C50DC587D14Ba8C7857683293
DaiTokenWrapper Contract Address : 0x70d4De3E810084d78eB4D9df3832ce189962bDf8
Gate Contract Address : 0x691F21A5B65d76520a4E38e893c8aa28C920BBDf
Erc1155NonTransferable Contract Address : 0xBAd188Ec8B4E168dF2a39C462A7293955EF04bf8
v1.0.0-rc.3
Created on November 3rd
v1.0.0-rc.2
v1.0.0-rc.2
v1.0.0-rc.1
Boson Protocol v1.0.0-rc.1
13 October 2021
https://github.com/bosonprotocol/contracts/tree/v1.0.0-rc.1
Functionality
This is a release candidate for v1.0.0 of the protocol. It includes v0.2.0-rc.1 functionality plus:
- Conditional commit support for the
ETHETH
,ETHTKN
, andTKNETH
payment types - Metatransactions for the
ERC1155NonTransferable
contract (conditional commit token) - A change to the
Gate
contract to allow theregisterVoucherSetID
function to be called by the owner or theBosonRouter
contract - Updated README
- Internal optimisations
v0.2.0-rc.1
Boson Protocol v0.2.0-rc.1
27 September 2021
https://github.com/bosonprotocol/contracts/tree/v0.2.0-rc.1
Functionality
This is a release candidate for v0.2.0 of the protocol. It includes v0.1.0 functionality plus:
- Conditional commit for the TKNTKN payment type. The tokens currently supported are $BOSON and DAI
- Support for the DAI token.
- As part of the multiple token support, the FundLimitsOracle contract was renamed to TokenRegistry.sol. The functions that were available in FundLimitsOracle.sol contract are still available. The
setTokenWrapperAddress
andgetTokenWrapperAddress
functions were added - The event emitted when a buyer commits to a voucher was changed from LogVoucherDelivered to LogVoucherCommitted.
Release v0.1.0
Boson Protocol Release v0.1.0
13 July 2021
https://github.com/bosonprotocol/contracts/tree/v0.1.0
Functionality
- Seller can create a voucher set, which mints an ERC1155
- Seller can cancel or admit fault on a voucher set if issues arise
- Buyer can commit to purchase a voucher from a voucher set with payment and a deposit going
into Boson Protocol's escrow - Buyer can redeem his voucher
- Buyer can request a refund if he chooses not to collect the item represented by the voucher anymore
- Buyer can let the commitment expire and have funds returned
- Buyer can complain on a commitment token if issues arise
Rinkeby Testnet Contract addresses:
FundLimitsOracle Contract Address: 0x4d827187dD0df5bF02575d24E5586e765511596e
ERC1155ERC721 Contract Address: 0x654FA4C10C0F66c4D94B4AD458236A260888AB5a
VoucherKernel Contract Address: 0x82a33733c2f8696F7fd61D0874351cbb8Ea61EBc
Cashier Contract Address: 0x0bfF7B7A04C1eB19DeA63f0FF4D884914edB61E8
Boson Router Contract Address: 0x29C9361920785F4B2175Ba61c177cEdC6A99542A
$BOSON Token Contract Address: 0x1b48e27D7ABaDf2f5A5f14975Cb9D4E457dF5111