Skip to content

Releases: bosonprotocol/contracts

v1.1.0

17 Mar 10:11
430d0b0
Compare
Choose a tag to compare

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 to UsingHelpers.sol. This struct includes the new threshold member.
  • Voucher sets are now mapped to a ConditionalCommitInfo struct instead of a token Id (voucherToToken replaced by voucherSetToConditionalCommit)
  • The registerVoucherSetId function was changed to accept a struct of type ConditionalCommitInfo instead of individual conditional commit parameters. The gateAddress and registerConditionalCommit members are not used by this function. The default values can be passed in (0 address and false, respectively). The struct data can be passed in as a JSON object from Typescript. See test file 11_gate.ts for examples
  • The registerVoucherSetId function now allows conditional token Id 0 to be registered
  • The registerVoucherSetId function checks that the conditional token type is NONFUNGIBLE_TOKEN if condition OWNERSHIP is chosen
  • The check function was modified to call either the checkOwnership or checkBalance 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 the getConditionalCommitInfo(_tokenIdSupply) function
  • The getNonTransferableTokenContract() function was replaced by the getConditionalTokenContract() function
  • The LogVoucherSetRegistered event now emits the _condition and _threshold parameters

BosonRouter

  • All requestCreateOrder*Conditional functions have been modified to accept the ConditionalCommitInfo 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 the ConditionalCommitInfo to the Gate.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 type DepositsReleased
  • Added field seller of a type address to struct VoucherStatus

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 in VoucherKernel which returns the sum of buyer and seller deposit
  • Function isDepositReleased is added to VoucherKernel. 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 the seller field of voucherStatus. Value is the supplyHolder 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 Mar 14:04
cbe0b8f
Compare
Choose a tag to compare
v1.1.0-rc.2 Pre-release
Pre-release

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

03 Mar 11:27
d79e017
Compare
Choose a tag to compare
v1.1.0-rc.1 Pre-release
Pre-release

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

04 Nov 12:21
cf676f2
Compare
Choose a tag to compare

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, and TKNETH.
  • 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 and getTokenWrapperAddress 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

03 Nov 19:32
000b9e9
Compare
Choose a tag to compare
v1.0.0-rc.3 Pre-release
Pre-release

Created on November 3rd

v1.0.0-rc.2

02 Nov 21:46
3b52db3
Compare
Choose a tag to compare
v1.0.0-rc.2 Pre-release
Pre-release
v1.0.0-rc.2

v1.0.0-rc.1

13 Oct 13:05
5d17584
Compare
Choose a tag to compare
v1.0.0-rc.1 Pre-release
Pre-release

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, and TKNETH payment types
  • Metatransactions for the ERC1155NonTransferable contract (conditional commit token)
  • A change to the Gate contract to allow the registerVoucherSetID function to be called by the owner or the BosonRouter contract
  • Updated README
  • Internal optimisations

v0.2.0-rc.1

27 Sep 12:42
817b681
Compare
Choose a tag to compare
v0.2.0-rc.1 Pre-release
Pre-release

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 and getTokenWrapperAddress functions were added
  • The event emitted when a buyer commits to a voucher was changed from LogVoucherDelivered to LogVoucherCommitted.

Release v0.1.0

13 Jul 12:18
be0ca9f
Compare
Choose a tag to compare

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