-
Notifications
You must be signed in to change notification settings - Fork 96
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
feat: clean bindings #ntrn-410 #750
Conversation
cfd2e5f
to
ff760da
Compare
b7277a0
to
412c4a5
Compare
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.
Regenerate swagger, please
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.
Regenerate swagger pls, to reflect proto description changes
@swelf19 done |
// ResubmitFailure resubmits the failure after contract acknowledgement failed | ||
func (k Keeper) ResubmitFailure(goCtx context.Context, req *types.MsgResubmitFailure) (*types.MsgResubmitFailureResponse, 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.
why do we have ResubmitFailure
and DoResubmitFailure
? what's the difference between them? can we unify so there's only one Keeper's method for failures resubmission?
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.
renamed DoResubmitFailure
to resubmitFailure
to avoid clashing. This function is keeper function and a little bit lower level dealing with store
// ResubmitFailure resubmits the failure after contract acknowledgement failed | ||
func (k Keeper) ResubmitFailure(goCtx context.Context, req *types.MsgResubmitFailure) (*types.MsgResubmitFailureResponse, error) { | ||
if err := req.Validate(); err != nil { | ||
return nil, errors.Wrap(err, "failed to validate MsgUpdateParams") |
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.
failed to validate MsgUpdateParams?
} | ||
|
||
if !k.wasmKeeper.HasContractInfo(ctx, sender) { | ||
return nil, errors.Wrap(sdkerrors.ErrNotFound, "not a contract address tried to resubmit") |
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.
the error would look like "not a contract address tried to resubmit: not found" with codespace and code referring to sdk.
I think this way it would be more clear. wdyt about something like this?
ErrNotContractResubmission = errors.Register(ModuleName, 1104, "failures resubmission is only allowed to be called by a smart contract")
...
return nil, errors.Wrap(ErrNotContractResubmission, "sender is not a smart contract")
would be "sender is not a smart contract: failures resubmission is only allowed to be called by a smart contract" with codespace and code referring to the contractmanager module.
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.
like it!
Remove bindings and related code from neutron-sdk ,neutron-dev-contracts and integration tests
https://hadronlabs.atlassian.net/browse/NTRN-410
PR's: