-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Migration] Application module #378
[Migration] Application module #378
Conversation
79c0a56
to
4c1e606
Compare
3ac490d
to
6e18452
Compare
ignite scaffold module application --dep bank,account,gateway --params max-delegated-gateways:uint
ignite scaffold map application stake:coin service-configs:array.string delegatee-gateway-addresses:array.string --no-message --module application --index address --signer address
ignite scaffold message stake-application stake:coin services:array.string --signer address --module application
ignite scaffold message unstake-application --signer address --module application
ignite scaffold message delegate-to-gateway gateway-address:string --signer app-address --module application
ignite scaffold message undelegate-from-gateway gateway-address:string --signer app-address --module application
6e18452
to
1140daf
Compare
x/application/types/errors.go
Outdated
ErrAppSample = sdkerrors.Register(ModuleName, 1101, "sample error") | ||
ErrAppInvalidStake = sdkerrors.Register(ModuleName, 1102, "invalid application stake") | ||
ErrAppInvalidAddress = sdkerrors.Register(ModuleName, 1103, "invalid application address") | ||
ErrAppUnauthorized = sdkerrors.Register(ModuleName, 1104, "unauthorized application signer") | ||
ErrAppNotFound = sdkerrors.Register(ModuleName, 1105, "application not found") | ||
ErrAppInvalidServiceConfigs = sdkerrors.Register(ModuleName, 1107, "invalid service configs") | ||
ErrAppGatewayNotFound = sdkerrors.Register(ModuleName, 1108, "gateway not found") | ||
ErrAppInvalidGatewayAddress = sdkerrors.Register(ModuleName, 1109, "invalid gateway address") | ||
ErrAppAlreadyDelegated = sdkerrors.Register(ModuleName, 1110, "application already delegated to gateway") | ||
ErrAppMaxDelegatedGateways = sdkerrors.Register(ModuleName, 1111, "maximum number of delegated gateways reached") | ||
ErrAppInvalidMaxDelegatedGateways = sdkerrors.Register(ModuleName, 1112, "invalid MaxDelegatedGateways parameter") | ||
ErrAppNotDelegated = sdkerrors.Register(ModuleName, 1113, "application not delegated to gateway") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ErrAppSample = sdkerrors.Register(ModuleName, 1101, "sample error") | |
ErrAppInvalidStake = sdkerrors.Register(ModuleName, 1102, "invalid application stake") | |
ErrAppInvalidAddress = sdkerrors.Register(ModuleName, 1103, "invalid application address") | |
ErrAppUnauthorized = sdkerrors.Register(ModuleName, 1104, "unauthorized application signer") | |
ErrAppNotFound = sdkerrors.Register(ModuleName, 1105, "application not found") | |
ErrAppInvalidServiceConfigs = sdkerrors.Register(ModuleName, 1107, "invalid service configs") | |
ErrAppGatewayNotFound = sdkerrors.Register(ModuleName, 1108, "gateway not found") | |
ErrAppInvalidGatewayAddress = sdkerrors.Register(ModuleName, 1109, "invalid gateway address") | |
ErrAppAlreadyDelegated = sdkerrors.Register(ModuleName, 1110, "application already delegated to gateway") | |
ErrAppMaxDelegatedGateways = sdkerrors.Register(ModuleName, 1111, "maximum number of delegated gateways reached") | |
ErrAppInvalidMaxDelegatedGateways = sdkerrors.Register(ModuleName, 1112, "invalid MaxDelegatedGateways parameter") | |
ErrAppNotDelegated = sdkerrors.Register(ModuleName, 1113, "application not delegated to gateway") | |
ErrAppInvalidStake = sdkerrors.Register(ModuleName, 1101, "invalid application stake") | |
ErrAppInvalidAddress = sdkerrors.Register(ModuleName, 1102, "invalid application address") | |
ErrAppUnauthorized = sdkerrors.Register(ModuleName, 1103, "unauthorized application signer") | |
ErrAppNotFound = sdkerrors.Register(ModuleName, 1104, "application not found") | |
ErrAppInvalidServiceConfigs = sdkerrors.Register(ModuleName, 1105, "invalid service configs") | |
ErrAppGatewayNotFound = sdkerrors.Register(ModuleName, 1106, "gateway not found") | |
ErrAppInvalidGatewayAddress = sdkerrors.Register(ModuleName, 1107, "invalid gateway address") | |
ErrAppAlreadyDelegated = sdkerrors.Register(ModuleName, 1108, "application already delegated to gateway") | |
ErrAppMaxDelegatedGateways = sdkerrors.Register(ModuleName, 1109, "maximum number of delegated gateways reached") | |
ErrAppInvalidMaxDelegatedGateways = sdkerrors.Register(ModuleName, 1110, "invalid MaxDelegatedGateways parameter") | |
ErrAppNotDelegated = sdkerrors.Register(ModuleName, 1111, "application not delegated to gateway") |
@@ -0,0 +1 @@ | |||
package types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package types | |
package types | |
// This file is in place to declare the package for dynamically generated protobufs |
) | ||
|
||
// ValidateAppServiceConfigs returns an error if any of the application service configs are invalid | ||
func ValidateAppServiceConfigs(services []*sharedtypes.ApplicationServiceConfig) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func ValidateAppServiceConfigs(services []*sharedtypes.ApplicationServiceConfig) error { | |
// TODO_TECHDEBT(#348): ensure consistent error convention is used. | |
func ValidateAppServiceConfigs(services []*sharedtypes.ApplicationServiceConfig) error { |
} | ||
|
||
// ValidateSupplierServiceConfigs returns an error if any of the supplier service configs are invalid | ||
func ValidateSupplierServiceConfigs(services []*sharedtypes.SupplierServiceConfig) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func ValidateSupplierServiceConfigs(services []*sharedtypes.SupplierServiceConfig) error { | |
// TODO_TECHDEBT(#348): ensure consistent error convention is used. | |
func ValidateSupplierServiceConfigs(services []*sharedtypes.SupplierServiceConfig) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
Human Summary
Application
module migration based off ofmigration/gateway-module-x-service-module
which is based off ofmigration/base
.Issue
Type of change
Select one or more:
Testing
make go_develop_and_test
make test_e2e
devnet-test-e2e
label to the PR. This is VERY expensive, only do it after all the reviews are complete.Sanity Checklist