Description
The idea is a simple demo contract, which can be used to help test confio/cosmwasm#90 and cosmwasm/wasmd#16 as well as serve as a demo.
This contract is created with an owner, and has two actions:
ReflectMsg
will take aCosmosMsg
as an argument, and if it was signed by the owner, it will re-dispatch the same message untouched. This let's the owner use the "mask" as his identity for anything - send tokens, stake, etc.ChangeOwner
will take aHumanAddr
as an argument. It must be signed by the current owner, and will update to a new owner.
This will let us easily test multiple scenarios in re-dispatching and handling "opaque messages". However, it is actually a useful functionality in some cases. Imagine "validator key rotation". If you create a validator with such a "mask contract" as the owner, you can swap out control of the mask without updating the validator struct at all. A mask could also own staked tokens, and you could make a trade of the mask against some liquid tokens if desired. (Since cosmos-sdk allows multiple messages in one tx, you can do it atomically by doing a multisig off-chain, then executing both transfers together)