Skip to content

Commit

Permalink
fix(x/accounts/lockup): fix proto path
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Oct 20, 2024
1 parent aa507fa commit 36c30eb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
28 changes: 14 additions & 14 deletions x/accounts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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:

Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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.)

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down

0 comments on commit 36c30eb

Please sign in to comment.