diff --git a/.changelog/unreleased/improvements/389-module-path.md b/.changelog/v6.0.0/improvements/389-module-path.md similarity index 100% rename from .changelog/unreleased/improvements/389-module-path.md rename to .changelog/v6.0.0/improvements/389-module-path.md diff --git a/.changelog/v6.0.0/summary.md b/.changelog/v6.0.0/summary.md new file mode 100644 index 00000000..ae285c2b --- /dev/null +++ b/.changelog/v6.0.0/summary.md @@ -0,0 +1,11 @@ +*Aug 27, 2024* + +This is the Xenon major release of Noble. It introduces a new `x/halo` module +that enables the native issuance of [Hashnote's US Yield Coin (**USYC**)][usyc] +asset. USYC is an on-chain representation of Hashnote's Short Duration Yield +Fund, primarily investing in U.S. Treasury Bills and engaging in reverse repo +activities. + +Other notable changes are documented below. + +[usyc]: https://usyc.hashnote.com diff --git a/CHANGELOG.md b/CHANGELOG.md index f09c1f5a..587bfd7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # CHANGELOG +## v6.0.0 + +*Aug 27, 2024* + +This is the Xenon major release of Noble. It introduces a new `x/halo` module +that enables the native issuance of [Hashnote's US Yield Coin (**USYC**)][usyc] +asset. USYC is an on-chain representation of Hashnote's Short Duration Yield +Fund, primarily investing in U.S. Treasury Bills and engaging in reverse repo +activities. + +Other notable changes are documented below. + +[usyc]: https://usyc.hashnote.com + +### IMPROVEMENTS + +- Update module path for v6 release line. ([#389](https://github.com/noble-assets/noble/pull/389)) + ## v5.0.0 *Jul 5, 2024* diff --git a/app/app.go b/app/app.go index 1f58df73..f43e816c 100644 --- a/app/app.go +++ b/app/app.go @@ -355,6 +355,8 @@ func New( "uusdc", app.AccountKeeper, nil, + nil, + interfaceRegistry, ) app.BankKeeper = bankkeeper.NewBaseKeeper( @@ -506,6 +508,7 @@ func New( app.BankKeeper, ) + app.HaloKeeper.SetFTFKeeper(app.FiatTokenFactoryKeeper) fiattokenfactorymodule := fiattokenfactorymodule.NewAppModule(appCodec, app.FiatTokenFactoryKeeper, app.AccountKeeper, app.BankKeeper) app.CCTPKeeper = cctpkeeper.NewKeeper( @@ -665,6 +668,7 @@ func New( distrtypes.ModuleName, slashingtypes.ModuleName, crisistypes.ModuleName, + fiattokenfactorymoduletypes.ModuleName, genutiltypes.ModuleName, ibchost.ModuleName, icatypes.ModuleName, @@ -676,7 +680,6 @@ func New( upgradetypes.ModuleName, vestingtypes.ModuleName, tokenfactorymoduletypes.ModuleName, - fiattokenfactorymoduletypes.ModuleName, globalfee.ModuleName, cctptypes.ModuleName, forwardingtypes.ModuleName, diff --git a/app/upgrades/.gitkeep b/app/upgrades/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/app/upgrades/xenon/upgrade.go b/app/upgrades/xenon/upgrade.go index ed33ac63..b6f7f761 100644 --- a/app/upgrades/xenon/upgrade.go +++ b/app/upgrades/xenon/upgrade.go @@ -29,9 +29,9 @@ func CreateUpgradeHandler( haloKeeper.SetAggregatorOwner(ctx, "noble1u0nahk4wltsp89tpce4cyayd63a69dhpkfq9wq") haloKeeper.SetEntitlementsOwner(ctx, "noble1u0nahk4wltsp89tpce4cyayd63a69dhpkfq9wq") case MainnetChainID: - haloKeeper.SetOwner(ctx, "") // TODO - haloKeeper.SetAggregatorOwner(ctx, "") // TODO - haloKeeper.SetEntitlementsOwner(ctx, "") // TODO + haloKeeper.SetOwner(ctx, "noble184afdqq8x575e4m4khm0e52p4duxe6lxaxju3f") + haloKeeper.SetAggregatorOwner(ctx, "noble184afdqq8x575e4m4khm0e52p4duxe6lxaxju3f") + haloKeeper.SetEntitlementsOwner(ctx, "noble184afdqq8x575e4m4khm0e52p4duxe6lxaxju3f") default: return vm, fmt.Errorf("%s upgrade not allowed to execute on %s chain", UpgradeName, ctx.ChainID()) } diff --git a/go.mod b/go.mod index 382a20ee..7d3cc161 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/noble-assets/forwarding v1.1.0 - github.com/noble-assets/halo v1.0.0-alpha.0 + github.com/noble-assets/halo v1.0.0 github.com/ondoprotocol/usdy-noble v1.0.0 github.com/rs/zerolog v1.27.0 github.com/spf13/cast v1.5.1 diff --git a/go.sum b/go.sum index 13b1cf0d..803073c2 100644 --- a/go.sum +++ b/go.sum @@ -965,8 +965,8 @@ github.com/noble-assets/cosmos-sdk v0.45.16-send-restrictions h1:oQwbCoejkXp2/oz github.com/noble-assets/cosmos-sdk v0.45.16-send-restrictions/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40= github.com/noble-assets/forwarding v1.1.0 h1:2TXBs2Y9vWqgHyDKtdcHht6i7OT+pLaVHE3bPvfpmJY= github.com/noble-assets/forwarding v1.1.0/go.mod h1:o64ZfzCHteRDhOlkpi7GeKAcjlcbWUihC7Y34Er2/3U= -github.com/noble-assets/halo v1.0.0-alpha.0 h1:i5HBbMVi+GQul/aMxRtfFMfn6B4LKbYj10BFIZ0C3u8= -github.com/noble-assets/halo v1.0.0-alpha.0/go.mod h1:zWcppKjRH5v0ZTRXPtxEhoO1XRFE7wi5GhxtnGeFy6I= +github.com/noble-assets/halo v1.0.0 h1:JG5TAZZcuLArYgl/9dgwJJ9KAOIo2f03/S010WRVNV8= +github.com/noble-assets/halo v1.0.0/go.mod h1:AUFdixNgPdce0soYfT6aNggwW9PUVFxaIkCC83M26Sk= github.com/nunnatsa/ginkgolinter v0.14.0 h1:XQPNmw+kZz5cC/HbFK3mQutpjzAQv1dHregRA+4CGGg= github.com/nunnatsa/ginkgolinter v0.14.0/go.mod h1:cm2xaqCUCRd7qcP4DqbVvpcyEMkuLM9CF0wY6VASohk= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= diff --git a/testutil/network/network.go b/testutil/network/network.go index cb30d007..0707ef6e 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -2,6 +2,8 @@ package network import ( "fmt" + fiattokenfactorytypes "github.com/circlefin/noble-fiattokenfactory/x/fiattokenfactory/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "testing" "time" @@ -14,15 +16,11 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/staking" tmrand "github.com/tendermint/tendermint/libs/rand" tmdb "github.com/tendermint/tm-db" cctptypes "github.com/circlefin/noble-cctp/x/cctp/types" - genutil "github.com/cosmos/cosmos-sdk/x/genutil" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/noble-assets/noble/v6/app" "github.com/noble-assets/noble/v6/cmd" @@ -56,11 +54,35 @@ func New(t *testing.T, configs ...network.Config) *network.Network { // DefaultConfig will initialize config for the network with custom application, // genesis and single validator. All other parameters are inherited from cosmos-sdk/testutil/network.DefaultConfig func DefaultConfig() network.Config { - // app doesn't have this modules anymore, but we need them for test setup, which uses gentx and MsgCreateValidator - app.ModuleBasics[genutiltypes.ModuleName] = genutil.AppModuleBasic{} - app.ModuleBasics[stakingtypes.ModuleName] = staking.AppModuleBasic{} - encoding := cmd.MakeEncodingConfig(app.ModuleBasics) + + genesisState := app.ModuleBasics.DefaultGenesis(encoding.Marshaler) + bankGenesisState := banktypes.DefaultGenesisState() + bankGenesisState.DenomMetadata = []banktypes.Metadata{ + { + Description: "Circle USD Coin", + DenomUnits: []*banktypes.DenomUnit{ + { + Denom: "uusdc", + Exponent: 0, + Aliases: []string{"microusdc"}, + }, + { + Denom: "usdc", + Exponent: 6, + }, + }, + Base: "uusdc", + Display: "usdc", + Name: "Circle USD Coin", + Symbol: "USDC", + }, + } + genesisState[banktypes.ModuleName] = encoding.Marshaler.MustMarshalJSON(bankGenesisState) + ftfGenesisState := fiattokenfactorytypes.DefaultGenesis() + ftfGenesisState.MintingDenom = &fiattokenfactorytypes.MintingDenom{Denom: "uusdc"} + genesisState[fiattokenfactorytypes.ModuleName] = encoding.Marshaler.MustMarshalJSON(ftfGenesisState) + cfg := network.Config{ Codec: encoding.Marshaler, TxConfig: encoding.TxConfig, @@ -76,7 +98,7 @@ func DefaultConfig() network.Config { baseapp.SetMinGasPrices(val.AppConfig.MinGasPrices), ) }, - GenesisState: app.ModuleBasics.DefaultGenesis(encoding.Marshaler), + GenesisState: genesisState, TimeoutCommit: 2 * time.Second, ChainID: "chain-" + tmrand.NewRand().Str(6), // Some changes are introduced to make the tests run as if Noble is a standalone chain. diff --git a/x/tokenfactory/client/cli/query_minting_denom_test.go b/x/tokenfactory/client/cli/query_minting_denom_test.go index 0132f69b..2c5f298d 100644 --- a/x/tokenfactory/client/cli/query_minting_denom_test.go +++ b/x/tokenfactory/client/cli/query_minting_denom_test.go @@ -28,16 +28,14 @@ func networkWithMintingDenomObjects(t *testing.T) (*network.Network, types.Minti Denom: testDenom, } - bankState := banktypes.DefaultGenesisState() - bankState.DenomMetadata = []banktypes.Metadata{{ + var bankState banktypes.GenesisState + cfg.Codec.MustUnmarshalJSON(cfg.GenesisState[banktypes.ModuleName], &bankState) + bankState.DenomMetadata = append(bankState.DenomMetadata, banktypes.Metadata{ Base: testDenom, - }} + }) + cfg.GenesisState[banktypes.ModuleName] = cfg.Codec.MustMarshalJSON(&bankState) - buf, err := cfg.Codec.MarshalJSON(bankState) - require.NoError(t, err) - cfg.GenesisState[banktypes.ModuleName] = buf - - buf, err = cfg.Codec.MarshalJSON(&state) + buf, err := cfg.Codec.MarshalJSON(&state) require.NoError(t, err) cfg.GenesisState[types.ModuleName] = buf