Crates.io | cw-escrow |
lib.rs | cw-escrow |
version | 0.10.0 |
source | src |
created_at | 2019-12-29 20:55:38.702445 |
updated_at | 2021-05-27 09:33:53.014384 |
description | Simple CosmWasm contract for an escrow with arbiter and timeout |
homepage | |
repository | https://github.com/CosmWasm/cosmwasm-examples |
max_upload_size | |
id | 193320 |
size | 93,797 |
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.
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.