mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
Regular → Executable
+7
-3
@@ -1,11 +1,12 @@
|
||||
/*
|
||||
Package params defines the simulation parameters in the gaia.
|
||||
Package params defines the simulation parameters and encoding configuration
|
||||
for the Sonr blockchain application.
|
||||
|
||||
It contains the default weights used for each transaction used on the module's
|
||||
simulation. These weights define the chance for a transaction to be simulated at
|
||||
any gived operation.
|
||||
any given operation.
|
||||
|
||||
You can repace the default values for the weights by providing a params.json
|
||||
You can replace the default values for the weights by providing a params.json
|
||||
file with the weights defined for each of the transaction operations:
|
||||
|
||||
{
|
||||
@@ -15,5 +16,8 @@ file with the weights defined for each of the transaction operations:
|
||||
|
||||
In the example above, the `MsgSend` has 60% chance to be simulated, while the
|
||||
`MsgDelegate` will always be simulated.
|
||||
|
||||
The package also provides encoding configuration types used throughout the
|
||||
application for consistent codec usage.
|
||||
*/
|
||||
package params
|
||||
|
||||
Regular → Executable
+2
@@ -8,6 +8,8 @@ import (
|
||||
|
||||
// EncodingConfig specifies the concrete encoding types to use for a given app.
|
||||
// This is provided for compatibility between protobuf and amino implementations.
|
||||
// It encapsulates all the required components for encoding/decoding transactions
|
||||
// and other data structures in the blockchain.
|
||||
type EncodingConfig struct {
|
||||
InterfaceRegistry types.InterfaceRegistry
|
||||
Codec codec.Codec
|
||||
|
||||
Regular → Executable
+3
-1
@@ -12,7 +12,9 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/tx"
|
||||
)
|
||||
|
||||
// MakeEncodingConfig creates an EncodingConfig for an amino based test configuration.
|
||||
// MakeEncodingConfig creates a default EncodingConfig with standard Cosmos SDK
|
||||
// encoding settings. It sets up the interface registry with proper address codecs,
|
||||
// creates the protobuf codec, and configures transaction handling with default sign modes.
|
||||
func MakeEncodingConfig() EncodingConfig {
|
||||
amino := codec.NewLegacyAmino()
|
||||
interfaceRegistry, err := types.NewInterfaceRegistryWithOptions(types.InterfaceRegistryOptions{
|
||||
|
||||
Reference in New Issue
Block a user