-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the whole documentation (#49)
- Loading branch information
1 parent
fbfaa16
commit f35cbf4
Showing
16 changed files
with
107 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# cosmwasm-anchor-handler | ||
|
||
This is the cosmwasm implementation of "anchor-handler" contract. | ||
|
||
This contract handles **Anchor edge list** & **merkle root updates**. | ||
This contract is intended to be used with the **Bridge** contract. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,38 @@ | ||
# cosmwasm-anchor | ||
# comswasm_anchor(FixedDepositAnchor) | ||
|
||
This is the cosmwasm implementation of "anchor" contract. | ||
This is the cosmwasm implementation of "anchor" contract. | ||
|
||
The **FixedDepositAnchor** system is an interoperable shielded pool supporting | ||
fixed denomination deposits of CW20 tokens. | ||
|
||
The system is to be linked to other *FixedDepositAnchor*s through a simple | ||
graph-like interface where anchors maintain edges of their neighboring anchors. | ||
|
||
The system requires users to both deposit a fixed denomination of CW20 assets | ||
into the smart contract and insert a commitment into the underlying merkle tree | ||
of the form: | ||
``` | ||
commitment = Poseidon(destinationChainId, nullifier, secret) | ||
``` | ||
|
||
Commitments adhering to different hash functions and formats will invalidate | ||
any attempt at withdrawal. | ||
|
||
Information regarding the commitments: | ||
- **Poseidon** is a zkSNARK friendly hash function | ||
- **destinationChainId** is the chainId of the destination chain, where | ||
the withdrawal is intended to be made | ||
- **nullifier** is a random field element and identifier for the deposit | ||
that will be used to withdraw the deposit and ensure that the deposit | ||
is not double withdrawn. | ||
- **secret** is a random field element that will remain secret throughout | ||
the lifetime of the deposit and withdrawal. | ||
|
||
Using the preimage of the commitment, users can generate a zkSNARK proof that | ||
the deposit is located in one-of-many anchor merkle trees and that the commitment's | ||
destination chain id matches the underlying chain id of the anchor where the | ||
withdrawal is taking place. The chain id opcode is leveraged to prevent any | ||
tampering of this data. | ||
|
||
|
||
**NOTE**: For more information, please check the **Webb Protocol** documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# cosmwasm-tokenwrapper-handler | ||
|
||
This is the cosmwasm implementation of "tokenwrapper-handler" contract. | ||
|
||
This contract handles **GovernedTokenWrapper** **fee** and **token updates**. | ||
This contract is intended to be used with the **Bridge** and **SignatureBridge** contracts. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,3 @@ | |
newline_style = "unix" | ||
hard_tabs = false | ||
tab_spaces = 4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,3 @@ | |
newline_style = "unix" | ||
hard_tabs = false | ||
tab_spaces = 4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Protocol-cosmwasm types | ||
|
||
This is a collection of common types that are used in "protocol-cosmwasm" contracts. | ||
They include the InstantiateMsg, ExecuteMsg, and QueryMsg Api definitions for each contract, | ||
This is a collection of common types that are used in **protocol-cosmwasm** contracts. | ||
They include the *InstantiateMsg*, *ExecuteMsg*, and *QueryMsg* *Api definition*s for each contract, | ||
which are used to communicate among contracts. | ||
They also include the common utils, which are used in many contracts. | ||
They also include the common utils, which are used among the contracts. |