-
Notifications
You must be signed in to change notification settings - Fork 3
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 #28 from script3/audit
Fixes from first round of auditor feedback
- Loading branch information
Showing
31 changed files
with
1,091 additions
and
279 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 @@ | ||
[package] | ||
name = "soroban-governor" | ||
version = "1.0.0" | ||
version = "1.1.0" | ||
authors = ["Script3 Ltd. <[email protected]>"] | ||
license = "MIT" | ||
edition = "2021" | ||
|
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,4 +1,19 @@ | ||
pub(crate) const ONE_DAY_LEDGERS: u32 = 17280; // assumes 5s a ledger | ||
pub(crate) const MAX_PROPOSAL_LIFETIME: u32 = 31 * ONE_DAY_LEDGERS; // 31 days | ||
pub(crate) const MAX_VOTE_PERIOD: u32 = 7 * ONE_DAY_LEDGERS; // 7 days | ||
pub(crate) const BPS_SCALAR: i128 = 10_000; | ||
/// One day assuming 5s a ledger | ||
pub(crate) const ONE_DAY_LEDGERS: u32 = 17280; | ||
/// One hour assuming 5s a ledger | ||
pub(crate) const ONE_HOUR_LEDGERS: u32 = 720; | ||
/// 1 in basis points | ||
pub(crate) const BPS_SCALAR: u32 = 10_000; | ||
|
||
/// The maximum number of ledgers a proposal can exist for (31 days) | ||
pub(crate) const MAX_PROPOSAL_LIFETIME: u32 = 31 * ONE_DAY_LEDGERS; | ||
/// The maximum number of ledgers a proposal can be voted on for (7 days) | ||
pub(crate) const MAX_VOTE_PERIOD: u32 = 7 * ONE_DAY_LEDGERS; | ||
/// The minimum number of ledgers a proposal can be voted on for | ||
pub(crate) const MIN_VOTE_PERIOD: u32 = ONE_HOUR_LEDGERS; | ||
/// The maximum number of ledgers a proposal has between state changes before expiration | ||
pub(crate) const MAX_GRACE_PERIOD: u32 = 7 * ONE_DAY_LEDGERS; | ||
/// The minimum number of ledgers a proposal has between state changes before expiration | ||
pub(crate) const MIN_GRACE_PERIOD: u32 = ONE_DAY_LEDGERS; | ||
/// The minimum number of tokens required to create a proposal | ||
pub(crate) const MIN_VOTE_THRESHOLD: i128 = 1; |
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
Oops, something went wrong.