10 releases (breaking)

0.10.0 May 27, 2021
0.7.0 Oct 15, 2020
0.6.0 Aug 10, 2020
0.5.2 Jun 30, 2020
0.1.0 Dec 29, 2019

#592 in Magic Beans

31 downloads per month


364 lines


This is a simple single-use escrow contract. It creates a contract that can hold some native tokens and gives the power to an arbiter to release them to a pre-defined beneficiary. They can release all tokens, or only a fraction. If an optional timeout is reached, the tokens can no longer be released, rather they can only be returned to the original funder. Tokens can be added to the contract at any time without causing any errors, or losing access to them.

This contract is mainly considered as a simple tutorial example. In the real world, you would probably want one contract to manage many escrows and allow some global configuration options on it. It is generally simpler to rely on some well-known address for handling all escrows securely than checking each deployed escrow is using the proper wasm code.

As of v0.2.0, this was rebuilt from cosmwasm-template, which is the recommended way to create any contracts.

Using this project

If you want to get acquainted more with this contract, you should check out Developing, which explains more on how to run tests and develop code. Publishing contains useful information on how to publish your contract to the world, once you are ready to deploy it on a running blockchain. And Importing contains information about pulling in other contracts or crates that have been published.

But more than anything, there is an online tutorial, which leads you step-by-step on how to modify this particular contract.


~72K SLoC