Skip to content

Commit bfad57d

Browse files
committed
setup first set of governance functions for evaluation
1 parent 092347e commit bfad57d

File tree

6 files changed

+630
-579
lines changed

6 files changed

+630
-579
lines changed

apps/pyth-lazer-agent/src/jrpc_handle.rs

Lines changed: 0 additions & 328 deletions
This file was deleted.

target_chains/stylus/contracts/pyth-receiver/src/error.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pub enum PythReceiverError {
2626
InvalidGovernanceDataSource,
2727
OldGovernanceMessage,
2828
GovernanceMessageAlreadyExecuted,
29+
InvalidWormholeAddressToSet,
2930
}
3031

3132
impl core::fmt::Debug for PythReceiverError {
@@ -61,6 +62,7 @@ impl From<PythReceiverError> for Vec<u8> {
6162
PythReceiverError::InvalidGovernanceDataSource => 22,
6263
PythReceiverError::OldGovernanceMessage => 23,
6364
PythReceiverError::GovernanceMessageAlreadyExecuted => 24,
65+
PythReceiverError::InvalidWormholeAddressToSet => 25,
6466
}]
6567
}
6668
}

target_chains/stylus/contracts/pyth-receiver/src/governance_structs.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ pub enum GovernancePayload {
4848
AuthorizeGovernanceDataSourceTransfer(AuthorizeGovernanceDataSourceTransfer),
4949
SetDataSources(SetDataSources),
5050
SetFee(SetFee),
51+
SetValidPeriod(SetValidPeriod),
5152
RequestGovernanceDataSourceTransfer(RequestGovernanceDataSourceTransfer),
5253
SetWormholeAddress(SetWormholeAddress),
5354
SetFeeInToken(SetFeeInToken),
55+
SetTransactionFee(SetTransactionFee),
56+
WithdrawFee(WithdrawFee),
5457
}
5558

5659
#[derive(Clone, Debug, PartialEq)]
@@ -59,6 +62,23 @@ pub struct SetFee {
5962
pub expo: u64,
6063
}
6164

65+
#[derive(Clone, Debug, PartialEq)]
66+
pub struct SetValidPeriod {
67+
pub valid_time_period_seconds: u64,
68+
}
69+
70+
#[derive(Clone, Debug, PartialEq)]
71+
pub struct SetTransactionFee {
72+
pub value: u64,
73+
pub expo: u64,
74+
}
75+
76+
#[derive(Clone, Debug, PartialEq)]
77+
pub struct WithdrawFee {
78+
pub value: u64,
79+
pub expo: u64,
80+
}
81+
6282
#[derive(Clone, Debug, PartialEq)]
6383
pub struct SetFeeInToken {
6484
pub value: u64,

0 commit comments

Comments
 (0)