diff --git a/cmd/provenanced/cmd/init.go b/cmd/provenanced/cmd/init.go index 7f3830136b..38c1dbbff3 100644 --- a/cmd/provenanced/cmd/init.go +++ b/cmd/provenanced/cmd/init.go @@ -225,9 +225,8 @@ func createAndExportGenesisFile( appGenState[moduleName] = cdc.MustMarshalJSON(&crisisGenState) } - // Set the gov deposit denom + // Set the gov deposit. { - // TODO[1760]: gov: Verify that these changes are okay and nothing else is needed. moduleName := govtypes.ModuleName var govGenState govtypesv1.GenesisState cdc.MustUnmarshalJSON(appGenState[moduleName], &govGenState) diff --git a/cmd/provenanced/cmd/testnet.go b/cmd/provenanced/cmd/testnet.go index ffbaebe726..e28cdecc76 100644 --- a/cmd/provenanced/cmd/testnet.go +++ b/cmd/provenanced/cmd/testnet.go @@ -367,8 +367,7 @@ func initGenFiles( crisisGenState.ConstantFee.Denom = chainDenom appGenState[crisistypes.ModuleName] = clientCtx.Codec.MustMarshalJSON(&crisisGenState) - // Set the gov depost denom - // TODO[1760]: gov: Verify that these changes are okay and nothing else is needed. + // Set the gov deposit and shorten the voting period. var govGenState govtypesv1.GenesisState clientCtx.Codec.MustUnmarshalJSON(appGenState[govtypes.ModuleName], &govGenState) govGenState.Params.MinDeposit = sdk.NewCoins(sdk.NewInt64Coin(chainDenom, 10000000)) diff --git a/x/msgfees/keeper/query_server_test.go b/x/msgfees/keeper/query_server_test.go index d9708f7fec..73a3f36c9f 100644 --- a/x/msgfees/keeper/query_server_test.go +++ b/x/msgfees/keeper/query_server_test.go @@ -16,6 +16,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" sdksigning "github.com/cosmos/cosmos-sdk/types/tx/signing" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/authz" banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" @@ -202,31 +203,31 @@ func (s *QueryServerTestSuite) createTxFeesRequest(pubKey cryptotypes.PubKey, pr } } -func (s *QueryServerTestSuite) signTx(theTx client.TxBuilder, pubKey cryptotypes.PubKey, privKey cryptotypes.PrivKey, acct sdk.AccountI) { - accountSig := sdksigning.SignatureV2{ - PubKey: pubKey, - Data: &sdksigning.SingleSignatureData{ - SignMode: sdksigning.SignMode(s.cfg.TxConfig.SignModeHandler().DefaultMode()), - }, - Sequence: acct.GetSequence(), - } +func (s *QueryServerTestSuite) signTx(txb client.TxBuilder, pubKey cryptotypes.PubKey, privKey cryptotypes.PrivKey, acct sdk.AccountI) { signerData := signing.SignerData{ ChainID: s.cfg.ChainID, AccountNumber: acct.GetAccountNumber(), Sequence: acct.GetSequence(), } - txData := signing.TxData{} // TODO[1760]: signing: Base this off of theTx.GetTx(). + theTx := txb.GetTx() + adaptableTx, ok := theTx.(authsigning.V2AdaptableTx) + s.Require().True(ok, "%T does not implement the authsigning.V2AdaptableTx interface", theTx) + + txData := adaptableTx.GetSigningTxData() signBytes, err := s.cfg.TxConfig.SignModeHandler().GetSignBytes(s.ctx, s.cfg.TxConfig.SignModeHandler().DefaultMode(), signerData, txData) - if err != nil { - panic(err) - } + s.Require().NoError(err, "GetSignBytes") + sig, err := privKey.Sign(signBytes) - if err != nil { - panic(err) - } - accountSig.Data.(*sdksigning.SingleSignatureData).Signature = sig - err = theTx.SetSignatures(accountSig) - if err != nil { - panic(err) + s.Require().NoError(err, "privKey.Sign(signBytes)") + + accountSig := sdksigning.SignatureV2{ + PubKey: pubKey, + Data: &sdksigning.SingleSignatureData{ + SignMode: sdksigning.SignMode(s.cfg.TxConfig.SignModeHandler().DefaultMode()), + Signature: sig, + }, + Sequence: acct.GetSequence(), } + err = txb.SetSignatures(accountSig) + s.Require().NoError(err, "SetSignatures") } diff --git a/x/quarantine/spec/04_events.md b/x/quarantine/spec/04_events.md index 10216ee66c..b08e4e5b39 100644 --- a/x/quarantine/spec/04_events.md +++ b/x/quarantine/spec/04_events.md @@ -14,9 +14,9 @@ This event is emitted when an account opts into quarantine. `@Type`: `/cosmos.quarantine.v1beta1.EventOptIn` -| Attribute Key | Attribute Value | -|---------------|--------------------------------------| -| to_address | {bech32 string of account opting in} | +| Attribute Key | Attribute Value | +|---------------|----------------------------------------| +| to_address | \{bech32 string of account opting in\} | ## EventOptOut @@ -24,9 +24,9 @@ This event is emitted when an account opts out of quarantine. `@Type`: `/cosmos.quarantine.v1beta1.EventOptOut` -| Attribute Key | Attribute Value | -|---------------|---------------------------------------| -| to_address | {bech32 string of account opting out} | +| Attribute Key | Attribute Value | +|---------------|-----------------------------------------| +| to_address | \{bech32 string of account opting out\} | ## EventFundsQuarantined @@ -35,10 +35,10 @@ The following event is also emitted. `@Type`: `/cosmos.quarantine.v1beta1.EventFundsQuarantined` -| Attribute Key | Attribute Value | -|---------------|---------------------------------------| -| to_address | {bech32 string of intended recipient} | -| coins | {sdk.Coins of funds quarantined} | +| Attribute Key | Attribute Value | +|---------------|-----------------------------------------| +| to_address | \{bech32 string of intended recipient\} | +| coins | \{sdk.Coins of funds quarantined\} | ## EventFundsReleased @@ -46,7 +46,7 @@ This event is emitted when funds are fully accepted and sent from the quarantine `@Type`: `/cosmos.quarantine.v1beta1.EventFundsReleased` -| Attribute Key | Attribute Value | -|---------------|-------------------------------| -| to_address | {bech32 string of recipient} | -| coins | {sdk.Coins of funds released} | +| Attribute Key | Attribute Value | +|---------------|---------------------------------| +| to_address | \{bech32 string of recipient\} | +| coins | \{sdk.Coins of funds released\} | diff --git a/x/sanction/spec/04_events.md b/x/sanction/spec/04_events.md index 953e375e08..5da604aee6 100644 --- a/x/sanction/spec/04_events.md +++ b/x/sanction/spec/04_events.md @@ -15,9 +15,9 @@ This event is emitted when an account is sanctioned. `@Type`: `/cosmos.sanction.v1beta1.EventAddressSanctioned` -| Attribute Key | Attribute Value | -|---------------|---------------------------------------| -| address | {bech32 string of sanctioned account} | +| Attribute Key | Attribute Value | +|---------------|-----------------------------------------| +| address | \{bech32 string of sanctioned account\} | ## EventAddressUnsanctioned @@ -25,9 +25,9 @@ This event is emitted when an account is unsanctioned. `@Type`: `/cosmos.sanction.v1beta1.EventAddressUnsanctioned` -| Attribute Key | Attribute Value | -|---------------|-----------------------------------------| -| address | {bech32 string of unsanctioned account} | +| Attribute Key | Attribute Value | +|---------------|-------------------------------------------| +| address | \{bech32 string of unsanctioned account\} | ## EventTempAddressSanctioned @@ -35,9 +35,9 @@ This event is emitted when a temporary sanction is placed on an account. `@Type`: `/cosmos.sanction.v1beta1.EventTempAddressSanctioned` -| Attribute Key | Attribute Value | -|---------------|---------------------------------------| -| address | {bech32 string of sanctioned account} | +| Attribute Key | Attribute Value | +|---------------|-----------------------------------------| +| address | \{bech32 string of sanctioned account\} | ## EventTempAddressUnsanctioned @@ -45,9 +45,9 @@ This event is emitted when a temporary unsanction is placed on an account. `@Type`: `/cosmos.sanction.v1beta1.EventTempAddressUnsanctioned` -| Attribute Key | Attribute Value | -|---------------|-----------------------------------------| -| address | {bech32 string of unsanctioned account} | +| Attribute Key | Attribute Value | +|---------------|-------------------------------------------| +| address | \{bech32 string of unsanctioned account\} | ## EventParamsUpdated