-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from make-software/feature/docs
Reputation Token and utils documentation.
- Loading branch information
Showing
19 changed files
with
240 additions
and
62 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,44 +1,29 @@ | ||
# contracts | ||
# MVPR DAO for Casper | ||
|
||
Voting contract | ||
data: | ||
- voting_address - Address | ||
Reusable smart contracts for building DAOs on top of Casper. | ||
|
||
Reputation contract | ||
data: | ||
- reputation_address - Address | ||
- owner - Address | ||
- whitelist - Vec<Address> | ||
Repository contains following modules: | ||
- `contract` provides smart contracts implementation, | ||
- `utils` and `macros` makes writing code easier, | ||
- `tests` contain integration tests, | ||
- `client` implements a JavaScript client for smart contracts interactions. | ||
|
||
methods: | ||
only_onwer: | ||
- change_onwership(new_owner: Address) | ||
- add_to_whitelist(addr: Address) | ||
- remove_from_whitelist(addr: Address) | ||
whitelist_only: | ||
- mint | ||
- burn | ||
- transfer_from | ||
- stake | ||
## Build contracts | ||
Build `WASM` files. | ||
|
||
Variable Repository | ||
data: | ||
... | ||
|
||
methods: | ||
only_onwer: | ||
- change_onwership(new_owner: Address) | ||
- add_to_whitelist(addr: Address) | ||
- remove_from_whitelist(addr: Address) | ||
|
||
whitelist_only: | ||
- set_string(name: String, value: String) | ||
- set_u256(name: String, value: U256) | ||
```bash | ||
$ make build-contracts | ||
``` | ||
|
||
all: | ||
- get_string(name: String) -> String | ||
- get_u256(name: String) -> U256 | ||
## Test | ||
Run integration tests. | ||
|
||
Master Voting Contract: | ||
- vote for whitelist changes. | ||
```bash | ||
$ make test | ||
``` | ||
|
||
## Docs | ||
Generate `rustdoc`. Opens a new browser window. | ||
```bash | ||
$ make docs | ||
``` |
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 |
---|---|---|
|
@@ -13,4 +13,4 @@ name = "reputation-tests" | |
path = "src/reputation_tests.rs" | ||
bench = false | ||
doctest = false | ||
|
||
doc = false |
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,5 +1,7 @@ | ||
pub mod events; | ||
mod events; | ||
pub mod owner; | ||
pub mod staking; | ||
pub mod token; | ||
pub mod whitelist; | ||
|
||
pub(crate) use events::Events; |
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
Oops, something went wrong.