From 1f62fceab5c7027c552403295a14b4f69605bc26 Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Fri, 27 Sep 2024 12:58:47 +0200 Subject: [PATCH] lint fix --- contracts/callback-test/README.md | 2 +- x/cwerrors/spec/01_state.md | 12 ++++++++++-- x/cwerrors/spec/02_messages.md | 4 +++- x/cwerrors/spec/04_events.md | 2 +- x/cwerrors/spec/05_client.md | 5 ++--- x/cwerrors/spec/06_errors.md | 2 +- 6 files changed, 18 insertions(+), 9 deletions(-) diff --git a/contracts/callback-test/README.md b/contracts/callback-test/README.md index bab47dd..d445b2a 100644 --- a/contracts/callback-test/README.md +++ b/contracts/callback-test/README.md @@ -62,4 +62,4 @@ pub mod sudo { } ``` -Relevant test has been added as well in contract.rs and the default counter init/execute tests removed \ No newline at end of file +Relevant test has been added as well in contract.rs and the default counter init/execute tests removed diff --git a/x/cwerrors/spec/01_state.md b/x/cwerrors/spec/01_state.md index 01fe72b..c8a8499 100644 --- a/x/cwerrors/spec/01_state.md +++ b/x/cwerrors/spec/01_state.md @@ -9,6 +9,7 @@ Section describes all stored by the module objects and their storage keys The params value can only be updated by x/gov module via a governance upgrade proposal. [More](./02_messages.md#msgupdateparams) Storage keys: + * Params: `ParamsKey -> ProtocolBuffer(Params)` ```protobuf @@ -27,6 +28,7 @@ message Params { ErrorID is a sequence number used to increment error ID. Storage keys: + * ErrorID: `ErrorIDKey -> uint64` ## Contract Errors @@ -34,6 +36,7 @@ Storage keys: Contract Errors is a collection of all the error ids associated with a given contract address. This is used to query contract errors. Storage keys: + * ContractErrors: `ContractErrorsKeyPrefix | contractAddress | errorID -> errorID` ## Errors @@ -41,6 +44,7 @@ Storage keys: Errors is a collections of all the [SudoErrors](../../../proto/rollapp/cwerrors/v1/cwerrors.proto) currently stored by the module which can be queried. Storage keys: + * Errors: `ErrorsKeyPrefix | errorID -> protobuf(SudoError)` ```protobuf @@ -63,6 +67,7 @@ message SudoError { Deletion Blocks is a collection of all the error ids which need to be pruned in a given block height Storage keys: + * DeletionBlocks: `DeletionBlocksKeyPrefix | blockHeight | errorID -> errorID` ## Contract Subscriptions @@ -70,6 +75,7 @@ Storage keys: Contract Subscriptions is a map of the contract addresses which have subscriptions and the height when the subscription expires Storage keys: + * Contract Subscriptions: `ContractSubscriptionsKeyPrefix | contractAddress -> deletionHeight` ## Subscription End Block @@ -77,11 +83,13 @@ Storage keys: Subscritption End Block is a collections of all the subscriptions which need to be cleared at the given block height Storage keys: + * Subscription End Block: `SubscriptionEndBlockKeyPrefix | blockHeight | contractAddress -> contractAddress` -# Transient State +## Transient State The sudo errors which belong to the contracts with subscription are stored in the transient state of the block. Transient Storage keys: -* SudoErrors: `ErrorsForSudoCallbackKey | errorId -> SudoError` \ No newline at end of file + +* SudoErrors: `ErrorsForSudoCallbackKey | errorId -> SudoError` diff --git a/x/cwerrors/spec/02_messages.md b/x/cwerrors/spec/02_messages.md index f4f48b9..81c938e 100644 --- a/x/cwerrors/spec/02_messages.md +++ b/x/cwerrors/spec/02_messages.md @@ -19,12 +19,14 @@ message MsgSubscribeToError { ``` On success + * A subscription is created valid for the duration as specified in the module params. * The subscription fees are sent to the fee collector * In case a subscription already exists, it is extended. This message is expected to fail if: + * The sender address and contract address are not valid addresses * There is no contract with given address * The sender is not authorized to subscribe - the sender is not the contract owner/admin or the contract itself -* The user does not send enough funds or doesnt have enough funds \ No newline at end of file +* The user does not send enough funds or doesnt have enough funds diff --git a/x/cwerrors/spec/04_events.md b/x/cwerrors/spec/04_events.md index 0a48253..8964046 100644 --- a/x/cwerrors/spec/04_events.md +++ b/x/cwerrors/spec/04_events.md @@ -9,4 +9,4 @@ The module emits the following proto-events | Message | `MsgUpdateParams` | [ParamsUpdatedEvent](../../../proto/rollapp/cwerrors/v1/events.proto#L12) | | Message | `MsgSubscribeToError` | [SubscribedToErrorsEvent](../../../proto/rollapp/cwerrors/v1/events.proto#L20) | | Keeper | `SetErrorInState` | [StoringErrorEvent](../../../proto/rollapp/cwerrors/v1/events.proto#L32) | -| Module | `EndBlocker` | [SudoErrorCallbackFailedEvent](../../../proto/rollapp/cwerrors/v1/events.proto#L40) | \ No newline at end of file +| Module | `EndBlocker` | [SudoErrorCallbackFailedEvent](../../../proto/rollapp/cwerrors/v1/events.proto#L40) | diff --git a/x/cwerrors/spec/05_client.md b/x/cwerrors/spec/05_client.md index b0b712d..f38127d 100644 --- a/x/cwerrors/spec/05_client.md +++ b/x/cwerrors/spec/05_client.md @@ -82,15 +82,14 @@ Use the `-h`/`--help` flag to get a help description of a command. `rollapp-wasm tx cwerrors -h` - #### subscribe-to-error Create a new subscription which will register a contract for a sudo callback on errors -Usage: +Usage: `rollapp-wasm tx cwerrors subscribe-to-error [contract-address] [fee-amount] [flags]` Example: -`rollapp-wasm tx cwerrors subscribe-to-error cosmos1wug8sewp6cedgkmrmvhl3lf3tulagm9hnvy8p0rppz9yjw0g4wtqukxvuk 7000stake --from myAccountKey` \ No newline at end of file +`rollapp-wasm tx cwerrors subscribe-to-error cosmos1wug8sewp6cedgkmrmvhl3lf3tulagm9hnvy8p0rppz9yjw0g4wtqukxvuk 7000stake --from myAccountKey` diff --git a/x/cwerrors/spec/06_errors.md b/x/cwerrors/spec/06_errors.md index f6a4baf..026f926 100644 --- a/x/cwerrors/spec/06_errors.md +++ b/x/cwerrors/spec/06_errors.md @@ -9,4 +9,4 @@ enum ModuleErrors { // ERR_CALLBACK_EXECUTION_FAILED is the error code for when the error callback fails ERR_CALLBACK_EXECUTION_FAILED = 1; } -``` \ No newline at end of file +```