Skip to content

Commit ac3d505

Browse files
committed
removing extraneous comments
1 parent cb47ed3 commit ac3d505

File tree

1 file changed

+0
-44
lines changed
  • target_chains/stylus/contracts/pyth-receiver/src

1 file changed

+0
-44
lines changed

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

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,6 @@ pub struct DataSource {
4646
pub emitter_address: FixedBytes<32>,
4747
}
4848

49-
// impl StorageKey for DataSourceStorage {
50-
// fn to_slot(&self, root: B256) -> U256 {
51-
// let chain_id: u16 = self.chain_id.get().to::<u16>();
52-
// let emitter_address = self.emitter_address.get();
53-
54-
// let bytes = serialize_data_source_to_bytes(chain_id, emitter_address.as_slice().try_into().unwrap())
55-
// .expect("Failed to serialize DataSource");
56-
57-
// keccak256(bytes).to_slot(root)
58-
// }
59-
// }
60-
6149
impl StorageKey for DataSource {
6250
fn to_slot(&self, root: B256) -> U256 {
6351
let chain_id: u16 = self.chain_id.to::<u16>();
@@ -69,24 +57,6 @@ impl StorageKey for DataSource {
6957
keccak256(bytes).to_slot(root)
7058
}
7159
}
72-
73-
// pub trait GetDataSource {
74-
// fn data_source(&self) -> DataSourceStorage;
75-
// }
76-
77-
// impl GetDataSource for VerifiedVM {
78-
// fn data_source(&self) -> DataSourceStorage {
79-
// let mut ds = DataSourceStorage {
80-
// chain_id: StorageU16::new(storage_key!("chain_id")),
81-
// emitter_address: StorageFixedBytes::<32>::new(storage_key!("emitter_address")),
82-
// };
83-
// ds.chain_id.set(self.emitter_chain_id.into());
84-
// ds.emitter_address.set(self.emitter_address);
85-
// ds
86-
// }
87-
// }
88-
89-
// PriceInfo struct storing price information
9060
#[storage]
9161
pub struct PriceInfoStorage {
9262
pub publish_time: StorageU64,
@@ -109,20 +79,6 @@ pub struct PriceInfoStorage {
10979
// pub ema_conf: U64,
11080
// }
11181

112-
// impl From<&PriceFeedMessage> for PriceInfo {
113-
// fn from(price_feed_message: &PriceFeedMessage) -> Self {
114-
// Self {
115-
// publish_time: U64::from(price_feed_message.publish_time),
116-
// expo: I32::from_be_bytes(price_feed_message.exponent.to_be_bytes()),
117-
// price: I64::from_be_bytes(price_feed_message.price.to_be_bytes()),
118-
// conf: U64::from(price_feed_message.conf),
119-
// ema_price: I64::from_be_bytes(price_feed_message.ema_price.to_be_bytes()),
120-
// ema_conf: U64::from(price_feed_message.ema_conf),
121-
// }
122-
// }
123-
// }
124-
125-
// PriceInfo struct storing price information
12682
pub type PriceInfoReturn = (U64, I32, I64, U64, I64, U64);
12783

12884
#[cfg(test)]

0 commit comments

Comments
 (0)