Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "validator-voting"
description = "NEAR Validator Voting Contract"
version = "0.1.0"
version = "0.2.0"
edition = "2021"

# NEP-0330 is automatically implemented for all contracts built with https://github.com/near/cargo-near.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ The purpose of this contract is for validators to vote on any specific proposal.
Install [`cargo-near`](https://github.com/near/cargo-near) and run:

```bash
cargo near build
make
```

## Test

```bash
cargo test
make test
```

## Deploy
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RUSTFLAGS = "-C link-arg=-s"

all: lint validator-voting validator-voting-test
all: lint validator-voting

lint:
@cargo fmt --all
Expand Down
14 changes: 13 additions & 1 deletion src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,21 @@ pub enum Event<'a> {
proposal: &'a String,
approval_timestamp_ms: &'a U64,
deadline_timestamp_ms: &'a U64,
yes_stake: &'a U128,
voted_stake: &'a U128,
total_stake: &'a U128,
num_votes: &'a U64,
num_votes_yes: &'a U64,
num_votes_total: &'a U64,
},
ProposalRejected {
proposal: &'a String,
rejection_timestamp_ms: &'a U64,
deadline_timestamp_ms: &'a U64,
yes_stake: &'a U128,
voted_stake: &'a U128,
total_stake: &'a U128,
num_votes_yes: &'a U64,
num_votes_total: &'a U64,
},
}

Expand Down
Loading