Skip to content

Commit

Permalink
Merge branch 'main' into dwedul/1760-make-sims-pass
Browse files Browse the repository at this point in the history
  • Loading branch information
SpicyLemon committed Jun 5, 2024
2 parents 190acff + 857d79a commit 605a4ed
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 49 deletions.
3 changes: 1 addition & 2 deletions cmd/provenanced/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions cmd/provenanced/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
39 changes: 20 additions & 19 deletions x/msgfees/keeper/query_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")
}
28 changes: 14 additions & 14 deletions x/quarantine/spec/04_events.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ 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

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

Expand All @@ -35,18 +35,18 @@ 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

This event is emitted when funds are fully accepted and sent from the quarantine funds holder to the originally intended recipient.

`@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\} |
24 changes: 12 additions & 12 deletions x/sanction/spec/04_events.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,39 @@ 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

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

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

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

Expand Down

0 comments on commit 605a4ed

Please sign in to comment.