Msg/CreateGovernor

Msg/CreateGovernor is successful when:

  • always (an error is never returned)

Msg/CreateGovernor has the following outcomes:

  • Governor is added to state
  • EventCreateGovernor is emitted
  • MsgCreateGovernorResponse is returned

An error is never returned

never error

When msg create governor

{
  "address": "chora1s3x2yhc4qf59gf53hwsnhkh7gqa3eryxnu6nup",
  "metadata": "chora:13toVfvC2YxrrfSXWB5h2BGHiXZURsKxWUz72uDRDSPMCrYPguGUXSC.rdf"
}

Then expect no error.

Governor is added to state

state governor added

When msg create governor

{
  "address": "chora1q5m97jdcksj24g9enlkjqq75ygt5q6ak54jk38",
  "metadata": "chora:13toVfvC2YxrrfSXWB5h2BGHiXZURsKxWUz72uDRDSPMCrYPguGUXSC.rdf"
}

Then expect state governor

{
  "address": "BTZfSbi0JKqguZ/tIAPUIhdAa7Y=",
  "metadata": "chora:13toVfvC2YxrrfSXWB5h2BGHiXZURsKxWUz72uDRDSPMCrYPguGUXSC.rdf"
}

EventCreateGovernor is emitted

event create governor emitted

When msg create governor

{
  "address": "chora1s3x2yhc4qf59gf53hwsnhkh7gqa3eryxnu6nup",
  "metadata": "chora:13toVfvC2YxrrfSXWB5h2BGHiXZURsKxWUz72uDRDSPMCrYPguGUXSC.rdf"
}

Then expect event create governor

{
  "address": "chora1s3x2yhc4qf59gf53hwsnhkh7gqa3eryxnu6nup"
}

MsgCreateGovernorResponse is returned

Background

Given admin "chora1q5m97jdcksj24g9enlkjqq75ygt5q6ak54jk38".

message response returned

When msg create governor

{
  "address": "chora1s3x2yhc4qf59gf53hwsnhkh7gqa3eryxnu6nup",
  "metadata": "chora:13toVfvC2YxrrfSXWB5h2BGHiXZURsKxWUz72uDRDSPMCrYPguGUXSC.rdf"
}

Then expect response

{
  "address": "chora1s3x2yhc4qf59gf53hwsnhkh7gqa3eryxnu6nup"
}