Skip to content

Commit

Permalink
Add assertions for contract parameters change
Browse files Browse the repository at this point in the history
  • Loading branch information
vasyafromrussia committed Oct 25, 2023
1 parent 98302e5 commit bb70fe9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contract/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,14 @@ impl Contract {
}

pub fn set_claim_period(&mut self, period: Duration) {
self.assert_oracle();

self.claim_period = period;
}

pub fn set_burn_period(&mut self, period: Duration) {
self.assert_oracle();

self.burn_period = period;
}
}

0 comments on commit bb70fe9

Please sign in to comment.