MCPcopy Create free account
hub / github.com/Sifchain/sifnode / SetParams

Method SetParams

x/admin/keeper/msg_server.go:15–27  ·  view source on GitHub ↗
(ctx context.Context, msg *types.MsgSetParams)

Source from the content-addressed store, hash-verified

13}
14
15func (m msgServer) SetParams(ctx context.Context, msg *types.MsgSetParams) (*types.MsgSetParamsResponse, error) {
16 addr, err := sdk.AccAddressFromBech32(msg.Signer)
17 if err != nil {
18 return nil, err
19 }
20
21 if !m.keeper.IsAdminAccount(sdk.UnwrapSDKContext(ctx), types.AdminType_ADMIN, addr) {
22 return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "unauthorised signer")
23 }
24
25 m.keeper.SetParams(sdk.UnwrapSDKContext(ctx), msg.Params)
26 return &types.MsgSetParamsResponse{}, nil
27}
28
29func (m msgServer) AddAccount(ctx context.Context, msg *types.MsgAddAccount) (*types.MsgAddAccountResponse, error) {
30 addr, err := sdk.AccAddressFromBech32(msg.Signer)

Callers 4

UpdateParamsMethod · 0.95
UpdatePoolsMethod · 0.95
UpdateRowanCollateralMethod · 0.95
AdminCloseAllMethod · 0.95

Calls 2

IsAdminAccountMethod · 0.65
SetParamsMethod · 0.65

Tested by

no test coverage detected