Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Payment gateway #85

Merged
merged 10 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
<a name="unreleased"></a>
## [Unreleased]


<a name="v0.1.8"></a>
## [v0.1.8](https://github.com/SAONetwork/sao-consensus/compare/testnet-v0.1.7...v0.1.8) (2023-09-08)

### Features
- store the mapping of account and key did ([#73](https://github.com/SAONetwork/sao-consensus/issues/73))
- list shard by sp ([#75](https://github.com/SAONetwork/sao-consensus/issues/75))
- create public model ([#71](https://github.com/SAONetwork/sao-consensus/issues/71))
- beta release ([#67](https://github.com/SAONetwork/sao-consensus/issues/67))
- add builtin did to support read public data ([#65](https://github.com/SAONetwork/sao-consensus/issues/65))

* add offline trigger height to node params ([#81](https://github.com/SAONetwork/sao-consensus/issues/81)) *#81*
* store the mapping of account and key did ([#73](https://github.com/SAONetwork/sao-consensus/issues/73)) *#73*
* list shard by sp ([#75](https://github.com/SAONetwork/sao-consensus/issues/75)) *#75*
* create public model ([#71](https://github.com/SAONetwork/sao-consensus/issues/71)) *#71*
* beta release ([#67](https://github.com/SAONetwork/sao-consensus/issues/67)) *#67*
* add builtin did to support read public data ([#65](https://github.com/SAONetwork/sao-consensus/issues/65)) *#65*

### Bug Fixes
- cancel unhandled timed out order, fix order creator ([#80](https://github.com/SAONetwork/sao-consensus/issues/80))
- fix shard status ([#69](https://github.com/SAONetwork/sao-consensus/issues/69))
- timeout, migrate, renew and complete ([#66](https://github.com/SAONetwork/sao-consensus/issues/66))

* cancel unhandled timed out order, fix order creator ([#80](https://github.com/SAONetwork/sao-consensus/issues/80)) *#80*
* fix shard status ([#69](https://github.com/SAONetwork/sao-consensus/issues/69)) *#69*
* timeout, migrate, renew and complete ([#66](https://github.com/SAONetwork/sao-consensus/issues/66)) *#66*

### Code Refactoring
- super node logic ([#76](https://github.com/SAONetwork/sao-consensus/issues/76))
- change metadata and order to completed state when one shard in the order is completed ([#64](https://github.com/SAONetwork/sao-consensus/issues/64))

* super node logic ([#76](https://github.com/SAONetwork/sao-consensus/issues/76)) *#76*
* change metadata and order to completed state when one shard in the order is completed ([#64](https://github.com/SAONetwork/sao-consensus/issues/64)) *#64*


<a name="testnet-v0.1.7"></a>
Expand Down
10 changes: 9 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ package app

import (
"fmt"
v018 "github.com/SaoNetwork/sao/app/upgrades/v0_1_8"
"io"
"net/http"
"os"
"path/filepath"

v018 "github.com/SaoNetwork/sao/app/upgrades/v0_1_8"
v019 "github.com/SaoNetwork/sao/app/upgrades/v0_1_9"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
Expand Down Expand Up @@ -543,6 +545,7 @@ func New(
keys[didmoduletypes.MemStoreKey],
app.GetSubspace(didmoduletypes.ModuleName),
app.AccountKeeper,
app.BankKeeper,
)
didModule := didmodule.NewAppModule(appCodec, app.DidKeeper, app.AccountKeeper, app.BankKeeper)

Expand Down Expand Up @@ -856,6 +859,11 @@ func (app *App) setupUpgradeHandlers() {
v018.CreateUpgradeHandler(app.mm, app.configurator, app.NodeKeeper),
)

app.UpgradeKeeper.SetUpgradeHandler(
v019.UpgradeName,
v019.CreateUpgradeHandler(app.mm, app.configurator),
)

upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
if err != nil {
panic(fmt.Errorf("failed to read upgrade info from disk: %w", err))
Expand Down
6 changes: 6 additions & 0 deletions app/upgrades/v0_1_9/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package v019

const (
UpgradeName = "v0.1.9"
UpgradeInfo = "upgrade to v0.1.9"
)
19 changes: 19 additions & 0 deletions app/upgrades/v0_1_9/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package v019

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
logger := ctx.Logger().With("upgrade", UpgradeName)

logger.Debug("running module migrations ...")
return mm.RunMigrations(ctx, configurator, vm)
}
}
Loading
Loading