Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
akorchyn committed Mar 29, 2024
1 parent 8312c34 commit 35b4311
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions contracts/voting_snapshot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ To deploy manually, install [`cargo-near`](https://github.com/near/cargo-near) a
cargo near deploy <account-id>
```

## How to load snapshot?

To load snapshot use js script prepared for it.

```bash
node ../../snapshotter/loadSnapshot.js --contract contractID --json ../../snapshot-108194270.json --network testnet --account adminId
```

## Contract interface

```rust
Expand Down Expand Up @@ -60,6 +68,8 @@ pub fn is_nominee(self, nominee: &AccountId) -> bool
pub fn is_eligible_voter(self, voter: &AccountId) -> bool
pub fn get_voter_information(self, voter: &AccountId) -> VoterInformation
pub fn get_voters_info(self, voters: Vec<AccountId>) -> Vec<(AccountId, VoterInformation)>
pub fn get_total_eligible_users(&self) -> u32
pub fn get_total_voters(&self) -> u32

// Callbacks:
pub fn on_refund_success(self, account_id: AccountId) -> ()
Expand Down

0 comments on commit 35b4311

Please sign in to comment.