This file describes the process for contributing to seda-chain
.
First and foremost, fork the repository. Then please read the developing instructions for setting up your environment.
Your commits must follow specific guidelines.
Sign all commits with a GPG key. GitHub has extensive documentation on how to:
All commits are to follow the Conventional Commits standard. Commit messages should always be meaningful.
If you already have an error you can return, just return it. If you would like
to add context to the error, use errorsmod.Wrap()
or errorsmod.Wrapf()
.
For instance:
import (
errorsmod "cosmossdk.io/errors"
)
err := cdc.UnmarshalJSON(bz, &data)
if err != nil {
return errorsmod.Wrapf(err, "failed to unmarshal %s genesis state", types.ModuleName)
}
If there is no error at hand, you need to create an error or make use of SDK
errors. To create a new error, add an error in types/errors.go
and return it.
To make use of SDK errors, find an appropriate error from Cosmos SDK package's
types/errors/errors.go
and return it. For example, we return a ErrInvalidRequest
error when there is a failure in preliminary validation of transaction request
parameters.
import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
func (m *MsgCreateVestingAccount) ValidateBasic() error {
if m.EndTime <= 0 {
return sdkerrors.ErrInvalidRequest.Wrap("invalid end time")
}
return nil
}
Please run make lint
before making a commit to format the code.
For creating the PR, please follow the instructions below.
- Firstly, please open a
PR from your forked repo
to the
main
branch ofseda-chain
. - Please fill in the PR template that is there.
- Then assign it to yourself and anyone else who worked on the issue with you.
- Make sure all CI tests pass.
- Finally, please assign at least two reviewers to your PR: