From 36c30ebc87eee0f93d66a1ac86c2e0cf9c5e165c Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Sun, 20 Oct 2024 19:35:03 +0200 Subject: [PATCH] fix(x/accounts/lockup): fix proto path --- x/accounts/README.md | 28 +++++++++---------- .../defaults/lockup/{ => v1}/lockup.proto | 2 +- .../defaults/lockup/{ => v1}/query.proto | 4 +-- .../defaults/lockup/{ => v1}/tx.proto | 4 +-- 4 files changed, 19 insertions(+), 19 deletions(-) rename x/accounts/proto/cosmos/accounts/defaults/lockup/{ => v1}/lockup.proto (94%) rename x/accounts/proto/cosmos/accounts/defaults/lockup/{ => v1}/query.proto (95%) rename x/accounts/proto/cosmos/accounts/defaults/lockup/{ => v1}/tx.proto (98%) diff --git a/x/accounts/README.md b/x/accounts/README.md index 9d14fd808b74..5f170db5806c 100644 --- a/x/accounts/README.md +++ b/x/accounts/README.md @@ -34,8 +34,8 @@ It's crucial to understand that an account's state is isolated. This means: For example, consider two accounts of type Counter: -- One located at address "cosmos123" -- Another at address "cosmos456" +* One located at address "cosmos123" +* Another at address "cosmos456" These accounts do not share the same collections.Item instance. Instead, each maintains its own separate state. @@ -51,8 +51,8 @@ type Account struct { Creating an account begins with defining its init message. This message is processed when an account is created, similar to: -- The `instantiate` method in a CosmWasm contract -- The `constructor` in an EVM contract +* The `instantiate` method in a CosmWasm contract +* The `constructor` in an EVM contract For an account to be a valid `x/account` implementer, it must define both: @@ -106,8 +106,8 @@ func (a Account) RegisterInitHandler(builder *accountstd.InitBuilder) { Execute handlers are methods that an account can execute, defined as messages. These executions can be triggered: -- During block execution (not queries) through transactions -- During begin or end block +* During block execution (not queries) through transactions +* During begin or end block To define an execute handler, we start by creating its proto message: @@ -176,8 +176,8 @@ value and returning the new value in the response. Query Handlers are read-only methods implemented by an account to expose information about itself. This information can be accessed by: -- External clients (e.g., CLI, wallets) -- Other modules and accounts within the system +* External clients (e.g., CLI, wallets) +* Other modules and accounts within the system Query handlers can be invoked: @@ -340,9 +340,9 @@ This flexibility enables defining interfaces as common sets of messages and/or q Example: Transaction Authentication -- We define a `MsgAuthenticate` message. -- Any account capable of handling `MsgAuthenticate` is considered to implement the `Authentication` interface. -- This approach allows for standardized interaction patterns across different account types. +* We define a `MsgAuthenticate` message. +* Any account capable of handling `MsgAuthenticate` is considered to implement the `Authentication` interface. +* This approach allows for standardized interaction patterns across different account types. (Note: More details on the `Authentication` interface will be provided later.) @@ -431,7 +431,7 @@ func (a Account) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) { 1. **Sender Verification**: Always verify that the sender is the x/accounts module. This prevents unauthorized accounts from triggering authentication. 2. **Authentication Safety**: Ensure your authentication mechanism is secure: - - Prevent replay attacks by making it impossible to reuse the same action with the same signature. + * Prevent replay attacks by making it impossible to reuse the same action with the same signature. ##### Implementation example @@ -491,8 +491,8 @@ func (a Account) AuthRetroCompatibility(ctx context.Context, _ *authtypes.QueryL ### Usage Notes -- Implement this handler only for account types you want to expose via x/auth gRPC methods. -- The `info` field in the response can be nil if your account doesn't fit the `BaseAccount` structure. +* Implement this handler only for account types you want to expose via x/auth gRPC methods. +* The `info` field in the response can be nil if your account doesn't fit the `BaseAccount` structure. ## Genesis diff --git a/x/accounts/proto/cosmos/accounts/defaults/lockup/lockup.proto b/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/lockup.proto similarity index 94% rename from x/accounts/proto/cosmos/accounts/defaults/lockup/lockup.proto rename to x/accounts/proto/cosmos/accounts/defaults/lockup/v1/lockup.proto index 86d9efb8efae..fb25d43550c4 100644 --- a/x/accounts/proto/cosmos/accounts/defaults/lockup/lockup.proto +++ b/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/lockup.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package cosmos.accounts.defaults.lockup; +package cosmos.accounts.defaults.lockup.v1; import "amino/amino.proto"; import "cosmos/base/v1beta1/coin.proto"; diff --git a/x/accounts/proto/cosmos/accounts/defaults/lockup/query.proto b/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/query.proto similarity index 95% rename from x/accounts/proto/cosmos/accounts/defaults/lockup/query.proto rename to x/accounts/proto/cosmos/accounts/defaults/lockup/v1/query.proto index 625163a22bca..0caba9f5012b 100644 --- a/x/accounts/proto/cosmos/accounts/defaults/lockup/query.proto +++ b/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/query.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -package cosmos.accounts.defaults.lockup; +package cosmos.accounts.defaults.lockup.v1; -import "cosmos/accounts/defaults/lockup/lockup.proto"; +import "cosmos/accounts/defaults/lockup/v1/lockup.proto"; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; diff --git a/x/accounts/proto/cosmos/accounts/defaults/lockup/tx.proto b/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/tx.proto similarity index 98% rename from x/accounts/proto/cosmos/accounts/defaults/lockup/tx.proto rename to x/accounts/proto/cosmos/accounts/defaults/lockup/v1/tx.proto index c13cec55b16f..ff0c5f3b784e 100644 --- a/x/accounts/proto/cosmos/accounts/defaults/lockup/tx.proto +++ b/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/tx.proto @@ -1,9 +1,9 @@ syntax = "proto3"; -package cosmos.accounts.defaults.lockup; +package cosmos.accounts.defaults.lockup.v1; import "amino/amino.proto"; import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/accounts/defaults/lockup/lockup.proto"; +import "cosmos/accounts/defaults/lockup/v1/lockup.proto"; import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto";