Skip to content

Commit b2d3891

Browse files
committed
deps: bump orbiter module
1 parent 2a58001 commit b2d3891

9 files changed

Lines changed: 39 additions & 134 deletions

File tree

api/generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ buf export buf.build/noble-assets/florin:v2.0.0 --output api/proto
1515
buf export buf.build/noble-assets/forwarding:v2.0.3 --output api/proto
1616
buf export buf.build/noble-assets/globalfee:v1.0.1 --output api/proto
1717
buf export buf.build/noble-assets/halo:v2.0.1 --output api/proto
18-
buf export buf.build/noble-assets/orbiter:v1.0.0 --output api/proto
18+
buf export buf.build/noble-assets/orbiter:v2.0.0-rc.1 --output api/proto
1919
buf export buf.build/noble-assets/rate-limiting:v8.0.0 --output api/proto
2020
buf export buf.build/noble-assets/swap:v1.0.2 --output api/proto
2121
buf export buf.build/noble-assets/wormhole:v1.0.0 --output api/proto

app.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ import (
7272
_ "github.com/noble-assets/forwarding/v2"
7373
"github.com/noble-assets/globalfee"
7474
_ "github.com/noble-assets/halo/v2"
75-
_ "github.com/noble-assets/orbiter"
75+
_ "github.com/noble-assets/orbiter/v2"
7676
_ "github.com/noble-assets/wormhole"
7777
_ "github.com/ondoprotocol/usdy-noble/v2"
7878
_ "swap.noble.xyz"
@@ -126,7 +126,7 @@ import (
126126
authoritykeeper "github.com/noble-assets/authority/keeper"
127127
forwardingkeeper "github.com/noble-assets/forwarding/v2/keeper"
128128
globalfeekeeper "github.com/noble-assets/globalfee/keeper"
129-
orbiterkeeper "github.com/noble-assets/orbiter/keeper"
129+
orbiterkeeper "github.com/noble-assets/orbiter/v2/keeper"
130130
wormholekeeper "github.com/noble-assets/wormhole/keeper"
131131
swapkeeper "swap.noble.xyz/keeper"
132132
)

e2e/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ require (
208208
github.com/multiformats/go-varint v0.0.7 // indirect
209209
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
210210
github.com/ncruces/go-strftime v0.1.9 // indirect
211-
github.com/noble-assets/orbiter v1.0.0 // indirect
212211
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect
213212
github.com/oklog/run v1.1.0 // indirect
214213
github.com/opencontainers/go-digest v1.0.0 // indirect

go.mod

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
cosmossdk.io/depinject v1.2.1
1010
cosmossdk.io/errors v1.0.2
1111
cosmossdk.io/log v1.4.1
12-
cosmossdk.io/math v1.5.1
12+
cosmossdk.io/math v1.5.3
1313
cosmossdk.io/store v1.1.1
1414
cosmossdk.io/tools/confix v0.1.2
1515
cosmossdk.io/x/evidence v0.1.1
@@ -33,7 +33,7 @@ require (
3333
github.com/noble-assets/forwarding/v2 v2.0.3
3434
github.com/noble-assets/globalfee v1.0.1
3535
github.com/noble-assets/halo/v2 v2.0.1
36-
github.com/noble-assets/orbiter v1.0.0
36+
github.com/noble-assets/orbiter/v2 v2.0.0-rc.1
3737
github.com/noble-assets/wormhole v1.0.0
3838
github.com/ondoprotocol/usdy-noble/v2 v2.0.0
3939
github.com/spf13/cast v1.8.0
@@ -110,7 +110,6 @@ require (
110110
github.com/ckaznocha/intrange v0.2.0 // indirect
111111
github.com/cncf/xds/go v0.0.0-20250326154945-ae57f3c0d45f // indirect
112112
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
113-
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
114113
github.com/cockroachdb/errors v1.12.0 // indirect
115114
github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
116115
github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 // indirect
@@ -159,6 +158,7 @@ require (
159158
github.com/go-logfmt/logfmt v0.6.0 // indirect
160159
github.com/go-logr/logr v1.4.3 // indirect
161160
github.com/go-logr/stdr v1.2.2 // indirect
161+
github.com/go-playground/universal-translator v0.18.0 // indirect
162162
github.com/go-toolsmith/astcast v1.1.0 // indirect
163163
github.com/go-toolsmith/astcopy v1.1.0 // indirect
164164
github.com/go-toolsmith/astequal v1.2.0 // indirect
@@ -189,6 +189,7 @@ require (
189189
github.com/google/flatbuffers v1.12.1 // indirect
190190
github.com/google/go-cmp v0.7.0 // indirect
191191
github.com/google/orderedcode v0.0.1 // indirect
192+
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
192193
github.com/google/s2a-go v0.1.9 // indirect
193194
github.com/google/uuid v1.6.0 // indirect
194195
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
@@ -242,6 +243,7 @@ require (
242243
github.com/lasiar/canonicalheader v1.1.1 // indirect
243244
github.com/ldez/gomoddirectives v0.2.4 // indirect
244245
github.com/ldez/tagliatelle v0.5.0 // indirect
246+
github.com/leodido/go-urn v1.2.1 // indirect
245247
github.com/leonklingele/grouper v1.1.2 // indirect
246248
github.com/lib/pq v1.10.9 // indirect
247249
github.com/linxGnu/grocksdb v1.8.14 // indirect

go.sum

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ cosmossdk.io/errors v1.0.2 h1:wcYiJz08HThbWxd/L4jObeLaLySopyyuUFB5w4AGpCo=
216216
cosmossdk.io/errors v1.0.2/go.mod h1:0rjgiHkftRYPj//3DrD6y8hcm40HcPv/dR4R/4efr0k=
217217
cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM=
218218
cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU=
219-
cosmossdk.io/math v1.5.1 h1:c6zo52nBRlqOeSIIQrn/zbxwcNwhaLjTMRn6e4vD7uc=
220-
cosmossdk.io/math v1.5.1/go.mod h1:ToembcWID/wR94cucsMD+2gq6xrlBBOfWcGwC7ZdwZA=
219+
cosmossdk.io/math v1.5.3 h1:WH6tu6Z3AUCeHbeOSHg2mt9rnoiUWVWaQ2t6Gkll96U=
220+
cosmossdk.io/math v1.5.3/go.mod h1:uqcZv7vexnhMFJF+6zh9EWdm/+Ylyln34IvPnBauPCQ=
221221
cosmossdk.io/schema v1.1.0 h1:mmpuz3dzouCoyjjcMcA/xHBEmMChN+EHh8EHxHRHhzE=
222222
cosmossdk.io/schema v1.1.0/go.mod h1:Gb7pqO+tpR+jLW5qDcNOSv0KtppYs7881kfzakguhhI=
223223
cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y=
@@ -440,8 +440,6 @@ github.com/cncf/xds/go v0.0.0-20250326154945-ae57f3c0d45f h1:C5bqEmzEPLsHm9Mv73l
440440
github.com/cncf/xds/go v0.0.0-20250326154945-ae57f3c0d45f/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8=
441441
github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E=
442442
github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw=
443-
github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg=
444-
github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc=
445443
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
446444
github.com/cockroachdb/datadriven v1.0.3-0.20230801171734-e384cf455877 h1:1MLK4YpFtIEo3ZtMA5C795Wtv5VuUnrXX7mQG+aHg6o=
447445
github.com/cockroachdb/datadriven v1.0.3-0.20230801171734-e384cf455877/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU=
@@ -632,10 +630,12 @@ github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ4
632630
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
633631
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
634632
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
635-
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
636633
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
637-
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
634+
github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU=
635+
github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
638636
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
637+
github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho=
638+
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
639639
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
640640
github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ=
641641
github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
@@ -807,8 +807,8 @@ github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLe
807807
github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
808808
github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
809809
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
810-
github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA=
811-
github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
810+
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg=
811+
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
812812
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
813813
github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0=
814814
github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM=
@@ -1023,8 +1023,9 @@ github.com/ldez/gomoddirectives v0.2.4 h1:j3YjBIjEBbqZ0NKtBNzr8rtMHTOrLPeiwTkfUJ
10231023
github.com/ldez/gomoddirectives v0.2.4/go.mod h1:oWu9i62VcQDYp9EQ0ONTfqLNh+mDLWWDO+SO0qSQw5g=
10241024
github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo=
10251025
github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4=
1026-
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
10271026
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
1027+
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
1028+
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
10281029
github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY=
10291030
github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA=
10301031
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
@@ -1133,8 +1134,8 @@ github.com/noble-assets/halo/v2 v2.0.1 h1:nHAhTnq5dPJGelcLnKzMviXtk9x0DfMnRPv+CP
11331134
github.com/noble-assets/halo/v2 v2.0.1/go.mod h1:DY4GCfZ/7S3IEjoJBCCh7HRTxirPBOLMVwkT0N6n3bA=
11341135
github.com/noble-assets/ibc-apps/middleware/packet-forward-middleware/v8 v8.2.0-noble h1:nxz3n15ChWqK/PvRYg0sGpfsrsIM1uqK4z/I/6CvSbc=
11351136
github.com/noble-assets/ibc-apps/middleware/packet-forward-middleware/v8 v8.2.0-noble/go.mod h1:O5H9Ic3Pe6cmJn1eqlj5N48sLb8WQ1VWmDP4/11g/4E=
1136-
github.com/noble-assets/orbiter v1.0.0 h1:6XDPnh1gzdWkyHBFK/XLKRgFwLhO9R0MV+MqOhVx29s=
1137-
github.com/noble-assets/orbiter v1.0.0/go.mod h1:ZGNfqNXp9ORDRyeg2CIroFCB6jU1vn88pDJkTL67vCY=
1137+
github.com/noble-assets/orbiter/v2 v2.0.0-rc.1 h1:Adq9PX8JBLR5KKRDFnqVBYV4gPeqSxErfCYcziBPHAc=
1138+
github.com/noble-assets/orbiter/v2 v2.0.0-rc.1/go.mod h1:9Ys1x5gMEDvrKAKIWE0RVW5VMejATuHIgCbF80WanNI=
11381139
github.com/noble-assets/wormhole v1.0.0 h1:c3otKgRv6Am4IoB/Vob2ziom02Ptpzv8R1/OtM2gxxI=
11391140
github.com/noble-assets/wormhole v1.0.0/go.mod h1:s7T9FC+bxHwlLED8pmXumdqwhr56CGJqTdhhcIj4A/Q=
11401141
github.com/nunnatsa/ginkgolinter v0.16.2 h1:8iLqHIZvN4fTLDC0Ke9tbSZVcyVHoBs0HIbnVSxfHJk=

legacy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import (
4747
tmclient "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
4848
authoritytypes "github.com/noble-assets/authority/types"
4949
"github.com/noble-assets/forwarding/v2"
50-
orbiter "github.com/noble-assets/orbiter/entrypoint"
50+
orbiter "github.com/noble-assets/orbiter/v2/entrypoint"
5151
"github.com/noble-assets/wormhole"
5252
wormholetypes "github.com/noble-assets/wormhole/types"
5353
)

orbiter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package noble
1818

1919
import (
20-
orbiter "github.com/noble-assets/orbiter"
20+
orbiter "github.com/noble-assets/orbiter/v2"
2121
)
2222

2323
func (app *App) RegisterOrbiterControllers() {

upgrade/store.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ import (
2020
storetypes "cosmossdk.io/store/types"
2121
upgradetypes "cosmossdk.io/x/upgrade/types"
2222
"github.com/cosmos/cosmos-sdk/baseapp"
23-
orbitertypes "github.com/noble-assets/orbiter/types/core"
2423
)
2524

2625
func CreateStoreLoader(upgradeHeight int64) baseapp.StoreLoader {
2726
storeUpgrades := storetypes.StoreUpgrades{
2827
Added: []string{
2928
// Noble Modules
30-
orbitertypes.ModuleName,
3129
},
3230
}
3331

upgrade/upgrade.go

Lines changed: 17 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,15 @@ package upgrade
1818

1919
import (
2020
"context"
21-
"encoding/json"
2221
"errors"
2322

2423
"cosmossdk.io/core/address"
2524
"cosmossdk.io/log"
2625
upgradetypes "cosmossdk.io/x/upgrade/types"
27-
dollarkeeper "dollar.noble.xyz/v2/keeper"
2826
"github.com/cosmos/cosmos-sdk/codec"
2927
sdk "github.com/cosmos/cosmos-sdk/types"
3028
"github.com/cosmos/cosmos-sdk/types/module"
31-
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
32-
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
33-
clientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper"
34-
authoritykeeper "github.com/noble-assets/authority/keeper"
35-
"github.com/noble-assets/orbiter"
36-
orbitertypes "github.com/noble-assets/orbiter/types"
37-
orbitercore "github.com/noble-assets/orbiter/types/core"
29+
oriterkeeper "github.com/noble-assets/orbiter/v2/keeper"
3830
)
3931

4032
func CreateUpgradeHandler(
@@ -43,130 +35,43 @@ func CreateUpgradeHandler(
4335
cdc codec.Codec,
4436
logger log.Logger,
4537
addressCodec address.Codec,
46-
authorityKeeper *authoritykeeper.Keeper,
47-
bankKeeper bankkeeper.Keeper,
48-
clientKeeper clientkeeper.Keeper,
49-
dollarKeeper *dollarkeeper.Keeper,
38+
orbiterKeeper *oriterkeeper.Keeper,
5039
) upgradetypes.UpgradeHandler {
5140
return func(ctx context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
52-
sdkCtx := sdk.UnwrapSDKContext(ctx)
53-
54-
vm[orbitercore.ModuleName] = orbiter.AppModule{}.ConsensusVersion()
55-
if module, ok := mm.Modules[orbitercore.ModuleName].(module.HasGenesis); ok {
56-
module.InitGenesis(sdkCtx, cdc, orbiterCustomGen(cdc))
57-
}
5841

5942
vm, err := mm.RunMigrations(ctx, cfg, vm)
6043
if err != nil {
6144
return vm, err
6245
}
6346

64-
err = claimDistributionFunds(ctx, logger, addressCodec, authorityKeeper, bankKeeper)
65-
if err != nil {
66-
return vm, err
67-
}
68-
69-
err = updateVaultsState(ctx, addressCodec, authorityKeeper, dollarKeeper)
47+
sdkCtx := sdk.UnwrapSDKContext(ctx)
48+
cachedCtx, writeCache := sdkCtx.CacheContext()
49+
err = updateOrbiterStats(cachedCtx, *orbiterKeeper)
7050
if err != nil {
7151
return vm, err
7252
}
73-
74-
// The IBC light clients for both the router_9600-1 and shido_9008-1
75-
// chains have expired on Noble's mainnet. In IBC-Go v8.7.0, the
76-
// MsgRecoverClient message does not support the LegacyAminoJSON
77-
// signing mode, preventing recovery via the Noble Maintenance
78-
// Multisig. As a result, the client must be manually recovered as part
79-
// of this software upgrade.
80-
err = clientKeeper.RecoverClient(sdkCtx, "07-tendermint-136", "07-tendermint-192")
81-
if err != nil {
82-
logger.Error("unable to recover router_9600-1 light client", "err", err)
83-
}
84-
err = clientKeeper.RecoverClient(sdkCtx, "07-tendermint-106", "07-tendermint-186")
85-
if err != nil {
86-
logger.Error("unable to recover shido_9008-1 light client", "err", err)
87-
}
53+
writeCache()
8854

8955
logger.Info(UpgradeASCII)
9056

9157
return vm, nil
9258
}
9359
}
9460

95-
// orbiterCustomGen overrides the default module genesis to pause the Hyperlane forwarding.
96-
func orbiterCustomGen(cdc codec.Codec) json.RawMessage {
97-
gen := orbitertypes.DefaultGenesisState()
98-
gen.ForwarderGenesis.PausedProtocolIds = append(gen.ForwarderGenesis.PausedProtocolIds, orbitercore.PROTOCOL_HYPERLANE)
99-
100-
return cdc.MustMarshalJSON(gen)
101-
}
102-
103-
// claimDistributionFunds transfers all transaction fees accrued by Noble prior
104-
// to the v8 Helium upgrade (November 2024) to the x/authority owner. The funds
105-
// are currently stuck as the x/distribution module was removed and replaced by
106-
// the x/authority module without a proper migration of funds.
107-
func claimDistributionFunds(ctx context.Context, logger log.Logger, addressCodec address.Codec, authorityKeeper *authoritykeeper.Keeper, bankKeeper bankkeeper.Keeper) error {
108-
// NOTE: We hardcode the x/distribution module name to avoid an import.
109-
address := authtypes.NewModuleAddress("distribution")
110-
balance := bankKeeper.GetAllBalances(ctx, address)
111-
if balance.IsZero() {
112-
// We return early in the case that there are no claimable funds.
113-
return nil
114-
}
115-
116-
authority, err := authorityKeeper.Owner.Get(ctx)
117-
if err != nil {
118-
return errors.New("unable to get underlying authority address from state")
119-
}
120-
authorityBz, err := addressCodec.StringToBytes(authority)
121-
if err != nil {
122-
return errors.New("unable to decode underlying authority address")
123-
}
124-
125-
err = bankKeeper.SendCoins(ctx, address, authorityBz, balance)
126-
if err != nil {
127-
return errors.New("unable to transfer stuck distribution funds")
61+
func updateOrbiterStats(ctx context.Context, orbiterKeeper oriterkeeper.Keeper) error {
62+
dispatcher := orbiterKeeper.Dispatcher()
63+
if dispatcher == nil {
64+
return errors.New("received nil orbiter dispatcher component")
12865
}
66+
amounts := dispatcher.GetAllDispatchedAmounts(ctx)
67+
//
68+
// counts := dispatcher.GetAllDispatchedCounts(ctx)
69+
//
70+
for _, entry := range amounts {
71+
dispatcher.RemoveDispatchedAmount(ctx context.Context, sourceID *core.CrossChainID, destID *core.CrossChainID, denom string)
12972

130-
logger.Info("claimed stuck distribution module funds", "amount", balance.String())
131-
132-
return nil
133-
}
134-
135-
// updateVaultsState sets state variables around Vaults Season One and Season
136-
// Two. We do this so that we can remove these values from the app.yaml file,
137-
// allowing us to ship one binary for both mainnet and testnet.
138-
func updateVaultsState(ctx context.Context, addressCodec address.Codec, authorityKeeper *authoritykeeper.Keeper, dollarKeeper *dollarkeeper.Keeper) error {
139-
switch sdk.UnwrapSDKContext(ctx).ChainID() {
140-
case TestnetChainID:
141-
err := dollarKeeper.VaultsSeasonOneEnded.Set(ctx, true)
142-
if err != nil {
143-
return errors.New("unable to mark vaults season one as ended")
144-
}
73+
err := dispatcher.SetDispatchedAmount(ctx, sourceID *core.CrossChainID, destID *core.CrossChainID, denom string, amountDispatched dispatcher.AmountDispatched)
14574

146-
authority, err := authorityKeeper.Owner.Get(ctx)
147-
if err != nil {
148-
return errors.New("unable to get underlying authority address from state")
149-
}
150-
authorityBz, err := addressCodec.StringToBytes(authority)
151-
if err != nil {
152-
return errors.New("unable to decode underlying authority address")
153-
}
154-
err = dollarKeeper.VaultsSeasonTwoYieldCollector.Set(ctx, authorityBz)
155-
if err != nil {
156-
return errors.New("unable to set vaults season two yield collector")
157-
}
158-
case MainnetChainID:
159-
// NOTE: Vaults Season One has already been marked as ended on mainnet
160-
// via the v10.1 Ember upgrade, so we safely skip that update here.
161-
162-
yieldCollector, err := addressCodec.StringToBytes("noble17m7dleu26hgwk842hrvfmh8mvrtp7p68k4zq8l")
163-
if err != nil {
164-
return errors.New("unable to decode vaults season two yield collector")
165-
}
166-
err = dollarKeeper.VaultsSeasonTwoYieldCollector.Set(ctx, yieldCollector)
167-
if err != nil {
168-
return errors.New("unable to set vaults season two yield collector")
169-
}
17075
}
17176

17277
return nil

0 commit comments

Comments
 (0)