Skip to content

Commit 7cfb281

Browse files
authored
Add on/off chain section to readme (#118)
1 parent 8d99337 commit 7cfb281

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,19 @@ ORDER BY votes_cast DESC;
151151
SELECT delegator, delegate, delegation_timestamp
152152
FROM delegation_events
153153
ORDER BY delegation_timestamp DESC;
154-
```
154+
```
155+
156+
### On/offchain data abstraction
157+
158+
For each of the respective data views there is a corresponding set of actions being performed on-chain. Some of this data is actually reflected in contract state.
159+
This table can be used to determine which view is an amalgamation of contract actions vs. having a direct relationship to contract storage. See [this](https://github.com/houseofstake/house-of-stake-contracts) repo for the contracts.
160+
161+
| Data view | Contract State? | Storage Contract | Actions | Off-chain only |
162+
| --- | --- | --- | --- | ---|
163+
| proposals | Yes | `voting-contract` | `create_proposal`, `get_proposal` | No
164+
| registered_voters | No | N/A | N/A | Yes
165+
| proposal_voting_history | No | N/A | `vote` | Yes
166+
| user_activities | No | N/A | N/A | Yes
167+
| delegation_events | No | N/A | N/A | Yes
168+
| approved_proposals | Yes | `voting-contract` | `update` | No
169+
| proposal_non_voters | No | No | `update` | Yes

0 commit comments

Comments
 (0)