Skip to content

Commit

Permalink
Merge branch 'main' into taztingo/1498-ibc-rate-limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Witkowski committed Nov 1, 2023
2 parents 53b66f4 + 8142550 commit fba96b2
Show file tree
Hide file tree
Showing 23 changed files with 20,619 additions and 521 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,26 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Features

* Add the (empty) `saffron-rc2` upgrade [#1699](https://github.com/provenance-io/provenance/issues/1699).

### Improvements

* Wrote unit tests on the keeper methods [#1699](https://github.com/provenance-io/provenance/issues/1699).
* During `FillBids`, the seller settlement fee is now calculated on the total price instead of each order individually [#1699](https://github.com/provenance-io/provenance/issues/1699).
* In the `OrderFeeCalc` query, ensure the market exists [#1699](https://github.com/provenance-io/provenance/issues/1699).

### Bug Fixes

* During `InitGenesis`, ensure LastOrderId is at least the largest order id [#1699](https://github.com/provenance-io/provenance/issues/1699).
* Properly populate the permissions lists when reading access grants from state [#1699](https://github.com/provenance-io/provenance/issues/1699).
* Fixed the paginated order queries to properly look up orders [#1699](https://github.com/provenance-io/provenance/issues/1699).

---

## [v1.17.0-rc1](https://github.com/provenance-io/provenance/releases/tag/v1.17.0-rc1) - 2023-10-18

### Features

* Create the `x/exchange` module which facilitates the buying and selling of assets [#1658](https://github.com/provenance-io/provenance/issues/1658).
Assets and funds remain in their owner's account (with a hold on them) until the order is settled (or cancelled).
Market's are created to manage order matching and define fees.
Expand Down Expand Up @@ -118,6 +138,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
- Bump `golang.org/x/net` from 0.15.0 to 0.17.0 ([#1704](https://github.com/provenance-io/provenance/pull/1704))
- Bump `bufbuild/buf-lint-action` from 1.0.3 to 1.1.0 ([#1705](https://github.com/provenance-io/provenance/pull/1705))

### Full Commit History

* https://github.com/provenance-io/provenance/compare/v1.16.0...v1.17.0-rc1

---

## [v1.16.0](https://github.com/provenance-io/provenance/releases/tag/v1.16.0) - 2023-06-23
Expand Down
1 change: 1 addition & 0 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ var upgrades = map[string]appUpgrade{
},
Added: []string{icqtypes.ModuleName, oracletypes.ModuleName, ibchookstypes.StoreKey, hold.ModuleName, exchange.ModuleName},
},
"saffron-rc2": {}, // upgrade for v1.17.0-rc2
"saffron": { // upgrade for v1.17.0,
Handler: func(ctx sdk.Context, app *App, vm module.VersionMap) (module.VersionMap, error) {
var err error
Expand Down
40 changes: 20 additions & 20 deletions x/exchange/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ func NewEventOrderCreated(order OrderI) *EventOrderCreated {
}
}

func NewEventOrderCancelled(order OrderI, cancelledBy sdk.AccAddress) *EventOrderCancelled {
func NewEventOrderCancelled(order OrderI, cancelledBy string) *EventOrderCancelled {
return &EventOrderCancelled{
OrderId: order.GetOrderID(),
CancelledBy: cancelledBy.String(),
CancelledBy: cancelledBy,
MarketId: order.GetMarketID(),
ExternalId: order.GetExternalID(),
}
Expand Down Expand Up @@ -54,79 +54,79 @@ func NewEventOrderExternalIDUpdated(order OrderI) *EventOrderExternalIDUpdated {
}
}

func NewEventMarketWithdraw(marketID uint32, amount sdk.Coins, destination, withdrawnBy sdk.AccAddress) *EventMarketWithdraw {
func NewEventMarketWithdraw(marketID uint32, amount sdk.Coins, destination sdk.AccAddress, withdrawnBy string) *EventMarketWithdraw {
return &EventMarketWithdraw{
MarketId: marketID,
Amount: amount.String(),
Destination: destination.String(),
WithdrawnBy: withdrawnBy.String(),
WithdrawnBy: withdrawnBy,
}
}

func NewEventMarketDetailsUpdated(marketID uint32, updatedBy sdk.AccAddress) *EventMarketDetailsUpdated {
func NewEventMarketDetailsUpdated(marketID uint32, updatedBy string) *EventMarketDetailsUpdated {
return &EventMarketDetailsUpdated{
MarketId: marketID,
UpdatedBy: updatedBy.String(),
UpdatedBy: updatedBy,
}
}

// NewEventMarketActiveUpdated returns a new EventMarketEnabled if isActive == true,
// or a new EventMarketDisabled if isActive == false.
func NewEventMarketActiveUpdated(marketID uint32, updatedBy sdk.AccAddress, isActive bool) proto.Message {
func NewEventMarketActiveUpdated(marketID uint32, updatedBy string, isActive bool) proto.Message {
if isActive {
return NewEventMarketEnabled(marketID, updatedBy)
}
return NewEventMarketDisabled(marketID, updatedBy)
}

func NewEventMarketEnabled(marketID uint32, updatedBy sdk.AccAddress) *EventMarketEnabled {
func NewEventMarketEnabled(marketID uint32, updatedBy string) *EventMarketEnabled {
return &EventMarketEnabled{
MarketId: marketID,
UpdatedBy: updatedBy.String(),
UpdatedBy: updatedBy,
}
}

func NewEventMarketDisabled(marketID uint32, updatedBy sdk.AccAddress) *EventMarketDisabled {
func NewEventMarketDisabled(marketID uint32, updatedBy string) *EventMarketDisabled {
return &EventMarketDisabled{
MarketId: marketID,
UpdatedBy: updatedBy.String(),
UpdatedBy: updatedBy,
}
}

// NewEventMarketUserSettleUpdated returns a new EventMarketUserSettleEnabled if isAllowed == true,
// or a new EventMarketUserSettleDisabled if isActive == false.
func NewEventMarketUserSettleUpdated(marketID uint32, updatedBy sdk.AccAddress, isAllowed bool) proto.Message {
func NewEventMarketUserSettleUpdated(marketID uint32, updatedBy string, isAllowed bool) proto.Message {
if isAllowed {
return NewEventMarketUserSettleEnabled(marketID, updatedBy)
}
return NewEventMarketUserSettleDisabled(marketID, updatedBy)
}

func NewEventMarketUserSettleEnabled(marketID uint32, updatedBy sdk.AccAddress) *EventMarketUserSettleEnabled {
func NewEventMarketUserSettleEnabled(marketID uint32, updatedBy string) *EventMarketUserSettleEnabled {
return &EventMarketUserSettleEnabled{
MarketId: marketID,
UpdatedBy: updatedBy.String(),
UpdatedBy: updatedBy,
}
}

func NewEventMarketUserSettleDisabled(marketID uint32, updatedBy sdk.AccAddress) *EventMarketUserSettleDisabled {
func NewEventMarketUserSettleDisabled(marketID uint32, updatedBy string) *EventMarketUserSettleDisabled {
return &EventMarketUserSettleDisabled{
MarketId: marketID,
UpdatedBy: updatedBy.String(),
UpdatedBy: updatedBy,
}
}

func NewEventMarketPermissionsUpdated(marketID uint32, updatedBy sdk.AccAddress) *EventMarketPermissionsUpdated {
func NewEventMarketPermissionsUpdated(marketID uint32, updatedBy string) *EventMarketPermissionsUpdated {
return &EventMarketPermissionsUpdated{
MarketId: marketID,
UpdatedBy: updatedBy.String(),
UpdatedBy: updatedBy,
}
}

func NewEventMarketReqAttrUpdated(marketID uint32, updatedBy sdk.AccAddress) *EventMarketReqAttrUpdated {
func NewEventMarketReqAttrUpdated(marketID uint32, updatedBy string) *EventMarketReqAttrUpdated {
return &EventMarketReqAttrUpdated{
MarketId: marketID,
UpdatedBy: updatedBy.String(),
UpdatedBy: updatedBy,
}
}

Expand Down
Loading

0 comments on commit fba96b2

Please sign in to comment.