Skip to content

Commit

Permalink
update slinky => connect/v2 (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 authored Sep 25, 2024
1 parent 2754025 commit 99b7b5b
Show file tree
Hide file tree
Showing 12 changed files with 1,174 additions and 302 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG TARGETARCH
ARG GOARCH

# See https://github.com/initia-labs/movevm/releases
ENV LIBMOVEVM_VERSION=v0.4.11
ENV LIBMOVEVM_VERSION=v0.4.12

# Install necessary packages
RUN set -eux; apk add --no-cache ca-certificates build-base git cmake
Expand Down
10 changes: 5 additions & 5 deletions app/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ import (
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
ibctypes "github.com/cosmos/ibc-go/v8/modules/core/types"

l2slinky "github.com/initia-labs/OPinit/x/opchild/l2slinky"
l2connect "github.com/initia-labs/OPinit/x/opchild/l2connect"
opchildtypes "github.com/initia-labs/OPinit/x/opchild/types"
"github.com/initia-labs/initia/app/genesis_markets"
movetypes "github.com/initia-labs/initia/x/move/types"
"github.com/initia-labs/movevm/precompile"

auctiontypes "github.com/skip-mev/block-sdk/v2/x/auction/types"
slinkytypes "github.com/skip-mev/slinky/pkg/types"
marketmaptypes "github.com/skip-mev/slinky/x/marketmap/types"
oracletypes "github.com/skip-mev/slinky/x/oracle/types"
connecttypes "github.com/skip-mev/connect/v2/pkg/types"
marketmaptypes "github.com/skip-mev/connect/v2/x/marketmap/types"
oracletypes "github.com/skip-mev/connect/v2/x/oracle/types"
)

// GenesisState - The genesis state of the blockchain is represented here as a map of raw json
Expand Down Expand Up @@ -78,7 +78,7 @@ func (genState GenesisState) AddMarketData(cdc codec.JSONCodec, ac address.Codec

// Initialize all markets plus ReservedCPTimestamp
currencyPairGenesis := make([]oracletypes.CurrencyPairGenesis, len(markets)+1)
cp, err := slinkytypes.CurrencyPairFromString(l2slinky.ReservedCPTimestamp)
cp, err := connecttypes.CurrencyPairFromString(l2connect.ReservedCPTimestamp)
if err != nil {
panic(err)
}
Expand Down
12 changes: 6 additions & 6 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ import (

auctionkeeper "github.com/skip-mev/block-sdk/v2/x/auction/keeper"
auctiontypes "github.com/skip-mev/block-sdk/v2/x/auction/types"
marketmapkeeper "github.com/skip-mev/slinky/x/marketmap/keeper"
marketmaptypes "github.com/skip-mev/slinky/x/marketmap/types"
oraclekeeper "github.com/skip-mev/slinky/x/oracle/keeper"
oracletypes "github.com/skip-mev/slinky/x/oracle/types"
marketmapkeeper "github.com/skip-mev/connect/v2/x/marketmap/keeper"
marketmaptypes "github.com/skip-mev/connect/v2/x/marketmap/types"
oraclekeeper "github.com/skip-mev/connect/v2/x/oracle/keeper"
oracletypes "github.com/skip-mev/connect/v2/x/oracle/types"

"github.com/initia-labs/minimove/app/ante"

Expand Down Expand Up @@ -119,7 +119,7 @@ type AppKeepers struct {
IBCHooksKeeper *ibchookskeeper.Keeper
AuctionKeeper *auctionkeeper.Keeper // x/auction keeper used to process bids for TOB auctions
PacketForwardKeeper *packetforwardkeeper.Keeper
OracleKeeper *oraclekeeper.Keeper // x/oracle keeper used for the slinky oracle
OracleKeeper *oraclekeeper.Keeper // x/oracle keeper used for the connect oracle
MarketMapKeeper *marketmapkeeper.Keeper
ForwardingKeeper *forwardingkeeper.Keeper
RatelimitKeeper *ratelimitkeeper.Keeper
Expand Down Expand Up @@ -546,7 +546,7 @@ func NewAppKeeper(
queryWhitelist.Custom["chain_id"] = func(ctx context.Context, _ []byte) ([]byte, error) {
return []byte(sdk.UnwrapSDKContext(ctx).ChainID()), nil
}
queryWhitelist.Stargate["/slinky.oracle.v1.Query/GetPrices"] = movetypes.ProtoSet{
queryWhitelist.Stargate["/connect.oracle.v2.Query/GetPrices"] = movetypes.ProtoSet{
Request: &oracletypes.GetPricesRequest{},
Response: &oracletypes.GetPricesResponse{},
}
Expand Down
4 changes: 2 additions & 2 deletions app/keepers/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import (

// skip imports
auctiontypes "github.com/skip-mev/block-sdk/v2/x/auction/types"
marketmaptypes "github.com/skip-mev/slinky/x/marketmap/types"
oracletypes "github.com/skip-mev/slinky/x/oracle/types"
marketmaptypes "github.com/skip-mev/connect/v2/x/marketmap/types"
oracletypes "github.com/skip-mev/connect/v2/x/oracle/types"

// noble forwarding keeper
forwardingtypes "github.com/noble-assets/forwarding/v2/x/forwarding/types"
Expand Down
12 changes: 6 additions & 6 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ import (
// skip-mev modules
"github.com/skip-mev/block-sdk/v2/x/auction"
auctiontypes "github.com/skip-mev/block-sdk/v2/x/auction/types"
marketmap "github.com/skip-mev/slinky/x/marketmap"
marketmaptypes "github.com/skip-mev/slinky/x/marketmap/types"
"github.com/skip-mev/slinky/x/oracle"
oracletypes "github.com/skip-mev/slinky/x/oracle/types"
marketmap "github.com/skip-mev/connect/v2/x/marketmap"
marketmaptypes "github.com/skip-mev/connect/v2/x/marketmap/types"
"github.com/skip-mev/connect/v2/x/oracle"
oracletypes "github.com/skip-mev/connect/v2/x/oracle/types"

// noble forwarding keeper
forwarding "github.com/noble-assets/forwarding/v2/x/forwarding"
Expand All @@ -83,7 +83,7 @@ var maccPerms = map[string][]string{
auctiontypes.ModuleName: nil,
opchildtypes.ModuleName: {authtypes.Minter, authtypes.Burner},

// slinky oracle permissions
// connect oracle permissions
oracletypes.ModuleName: nil,

// this is only for testing
Expand Down Expand Up @@ -119,7 +119,7 @@ func appModules(
packetforward.NewAppModule(app.PacketForwardKeeper, nil),
ibchooks.NewAppModule(app.appCodec, *app.IBCHooksKeeper),
forwarding.NewAppModule(app.ForwardingKeeper),
// slinky modules
// connect modules
oracle.NewAppModule(app.appCodec, *app.OracleKeeper),
marketmap.NewAppModule(app.appCodec, app.MarketMapKeeper),
}
Expand Down
4 changes: 2 additions & 2 deletions client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@
"url": "./tmp-swagger-gen/indexer/pair/v1/query.swagger.json"
},
{
"url": "./tmp-swagger-gen/slinky/oracle/v1/query.swagger.json"
"url": "./tmp-swagger-gen/connect/oracle/v2/query.swagger.json"
},
{
"url": "./tmp-swagger-gen/slinky/marketmap/v1/query.swagger.json",
"url": "./tmp-swagger-gen/connect/marketmap/v2/query.swagger.json",
"operationIds": {
"rename": {
"Params": "MarketMapParams"
Expand Down
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading

0 comments on commit 99b7b5b

Please sign in to comment.