The AI Works community logo The Blockchain Works community logo The Functional Works community logo The Golang Works community logo The Java Works community logo The JavaScript Works community logo The Python Works community logo The Remote Works community logo The WorksHub company logo

We use cookies and other tracking technologies to improve your browsing experience on our site, analyze site traffic, and understand where our audience is coming from. To find out more, please read our privacy policy.

By choosing 'I Accept', you consent to our use of cookies and other tracking technologies.

We use cookies and other tracking technologies to improve your browsing experience on our site, analyze site traffic, and understand where our audience is coming from. To find out more, please read our privacy policy.

By choosing 'I Accept', you consent to our use of cookies and other tracking technologies. Less

We use cookies and other tracking technologies... More

Login or register
to publish this job!

Login or register
to save this job!

Login or register
to save interesting jobs!

Login or register
to get access to all your job applications!

Login or register to start contributing with an article!

Login or register
to see more jobs from this company!

Login or register
to boost this post!

Show some love to the author of this blog by giving their post some rocket fuel 🚀.

Login or register to search for your ideal job!

Login or register to start working on this issue!

Login or register
to save articles!

Login to see the application

Engineers who find a new job through Java Works average a 15% increase in salary 🚀

You will be redirected back to this page right after signin

Add mask/reflector contract

Issue closed
Pull requests: 0
Contributors: 0
Level: Intermediate
  • Rust
Issue closed
Pull requests: 0
Contributors: 0
Level: Intermediate
  • Rust

On GitHub

Example contracts for using cosmwasm
More info >

Issue posted by: 
ethanfrey's avatar

Ethan Frey

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 a CosmosMsg 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 a HumanAddr 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)

    Use Open Source to hire or get hired

    On GitHub

    Example contracts for using cosmwasm
    More info >

    Issue posted by: 
    ethanfrey's avatar

    Ethan Frey

    Use Open Source to hire or get hired

    Add mask/reflector contract
    View on GitHub