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: integrate swaps #449

Merged
merged 6 commits into from
Jan 29, 2025
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
1 change: 1 addition & 0 deletions .changelog/unreleased/features/449-integrate-swap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Integrate our custom Swap module, that enables the exchange of tokens issued on Noble. ([#449](https://github.com/noble-assets/noble/pull/449))
4 changes: 4 additions & 0 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import (
_ "github.com/noble-assets/halo/v2"
_ "github.com/noble-assets/wormhole"
_ "github.com/ondoprotocol/usdy-noble/v2"
_ "swap.noble.xyz"

// Cosmos Modules
evidencekeeper "cosmossdk.io/x/evidence/keeper"
Expand Down Expand Up @@ -101,6 +102,7 @@ import (
forwardingkeeper "github.com/noble-assets/forwarding/v2/keeper"
globalfeekeeper "github.com/noble-assets/globalfee/keeper"
wormholekeeper "github.com/noble-assets/wormhole/keeper"
swapkeeper "swap.noble.xyz/keeper"
)

var DefaultNodeHome string
Expand Down Expand Up @@ -153,6 +155,7 @@ type App struct {
DollarKeeper *dollarkeeper.Keeper
ForwardingKeeper *forwardingkeeper.Keeper
GlobalFeeKeeper *globalfeekeeper.Keeper
SwapKeeper *swapkeeper.Keeper
WormholeKeeper *wormholekeeper.Keeper
}

Expand Down Expand Up @@ -231,6 +234,7 @@ func NewApp(
&app.DollarKeeper,
&app.ForwardingKeeper,
&app.GlobalFeeKeeper,
&app.SwapKeeper,
&app.WormholeKeeper,
); err != nil {
return nil, err
Expand Down
11 changes: 9 additions & 2 deletions app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ modules:
"@type": cosmos.app.runtime.v1alpha1.Module
app_name: Noble
pre_blockers: [ upgrade ]
begin_blockers: [ capability, authority, slashing, evidence, staking, ibc, authz ]
begin_blockers: [ capability, authority, slashing, evidence, staking, ibc, authz, swap ]
end_blockers: [ crisis, staking, feegrant, forwarding ]
init_genesis: [ capability, transfer, auth, bank, staking, slashing, crisis, fiat-tokenfactory, globalfee, genutil, ibc, interchainaccounts, packetfowardmiddleware, evidence, authz, feegrant, params, upgrade, vesting, cctp, forwarding, aura, halo, florin, authority, wormhole, dollar ]
init_genesis: [ capability, transfer, auth, bank, staking, slashing, crisis, fiat-tokenfactory, globalfee, genutil, ibc, interchainaccounts, packetfowardmiddleware, evidence, authz, feegrant, params, upgrade, vesting, cctp, forwarding, aura, halo, florin, authority, wormhole, dollar, swap ]
override_store_keys:
- module_name: auth
kv_store_key: acc
Expand Down Expand Up @@ -129,6 +129,13 @@ modules:
config:
"@type": noble.globalfee.module.v1.Module
authority: authority # Utilize our custom x/authority module.
- name: swap
config:
"@type": noble.swap.module.v1.Module
authority: authority # Utilize our custom x/authority module.
base_denom: uusdn
stableswap:
unbonding_block_delta: 30
- name: wormhole
config:
"@type": wormhole.module.v1.Module
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ require (
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
mvdan.cc/gofumpt v0.7.0
swap.noble.xyz v1.0.0-alpha.1
)

require (
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1433,8 +1433,8 @@ go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0
go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8=
go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0=
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
Expand Down Expand Up @@ -2133,3 +2133,5 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
swap.noble.xyz v1.0.0-alpha.1 h1:Ccjo9fqlmBoVslM7/EFNiG75MMRBPlLKPHDaTtN3RKg=
swap.noble.xyz v1.0.0-alpha.1/go.mod h1:QQzrClLCg0Fr+XIlc/ZcAXr5qqB2m5klg+rbtoE9rxo=
Loading
Loading