-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into tyler/blo-1459-simapp-doesnt-work-with-xupgrade
- Loading branch information
Showing
13 changed files
with
386 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
cmd/constants/markets_test.go → cmd/constants/marketmaps/markets_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
package constants_test | ||
package marketmaps_test | ||
|
||
import ( | ||
"encoding/json" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
|
||
"github.com/skip-mev/slinky/cmd/constants" | ||
"github.com/skip-mev/slinky/cmd/constants/marketmaps" | ||
mmtypes "github.com/skip-mev/slinky/x/marketmap/types" | ||
) | ||
|
||
func TestMarkets(t *testing.T) { | ||
// Unmarshal the RaydiumMarketMapJSON into RaydiumMarketMap. | ||
var mm mmtypes.MarketMap | ||
require.NoError(t, json.Unmarshal([]byte(constants.RaydiumMarketMapJSON), &mm)) | ||
require.NoError(t, json.Unmarshal([]byte(marketmaps.RaydiumMarketMapJSON), &mm)) | ||
require.NoError(t, mm.ValidateBasic()) | ||
|
||
// Unmarshal the CoreMarketMapJSON into CoreMarketMap. | ||
var mm2 mmtypes.MarketMap | ||
require.NoError(t, json.Unmarshal([]byte(constants.CoreMarketMapJSON), &mm2)) | ||
require.NoError(t, json.Unmarshal([]byte(marketmaps.CoreMarketMapJSON), &mm2)) | ||
require.NoError(t, mm2.ValidateBasic()) | ||
|
||
// Unmarshal the UniswapV3BaseMarketMapJSON into UniswapV3BaseMarketMap. | ||
var mm3 mmtypes.MarketMap | ||
require.NoError(t, json.Unmarshal([]byte(constants.UniswapV3BaseMarketMapJSON), &mm3)) | ||
require.NoError(t, constants.UniswapV3BaseMarketMap.ValidateBasic()) | ||
require.NoError(t, json.Unmarshal([]byte(marketmaps.UniswapV3BaseMarketMapJSON), &mm3)) | ||
require.NoError(t, marketmaps.UniswapV3BaseMarketMap.ValidateBasic()) | ||
|
||
// Unmarshal the CoinGeckoMarketMapJSON into CoinGeckoMarketMap. | ||
var mm4 mmtypes.MarketMap | ||
require.NoError(t, json.Unmarshal([]byte(constants.CoinGeckoMarketMapJSON), &mm4)) | ||
require.NoError(t, constants.CoinGeckoMarketMap.ValidateBasic()) | ||
require.NoError(t, json.Unmarshal([]byte(marketmaps.CoinGeckoMarketMapJSON), &mm4)) | ||
require.NoError(t, marketmaps.CoinGeckoMarketMap.ValidateBasic()) | ||
|
||
// Unmarshal the CoinMarketCapMarketMapJSON into CoinMarketCapMarketMap. | ||
var mm5 mmtypes.MarketMap | ||
require.NoError(t, json.Unmarshal([]byte(constants.CoinMarketCapMarketMapJSON), &mm5)) | ||
require.NoError(t, constants.CoinMarketCapMarketMap.ValidateBasic()) | ||
require.NoError(t, json.Unmarshal([]byte(marketmaps.CoinMarketCapMarketMapJSON), &mm5)) | ||
require.NoError(t, marketmaps.CoinMarketCapMarketMap.ValidateBasic()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.