Skip to content

Commit cdf0457

Browse files
committed
fix(lazer/sui): make setters package private
1 parent 76c4c6e commit cdf0457

File tree

7 files changed

+16
-15
lines changed

7 files changed

+16
-15
lines changed

lazer/contracts/sui/Move.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[move]
44
version = 3
5-
manifest_digest = "BEA4B53A0FCA0BE323AA9CCD8FD8CB24392F7A7FF5C9FFF61181A37A7AEBD662"
5+
manifest_digest = "DD0B86B0E012F788977D2224EA46B39395FCF48AB7DAE200E70E6E12F9445868"
66
deps_digest = "F9B494B64F0615AED0E98FC12A85B85ECD2BC5185C22D30E7F67786BB52E507C"
77
dependencies = [
88
{ id = "Bridge", name = "Bridge" },

lazer/contracts/sui/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Pyth Lazer Sui Contract
22

3-
`pyth_lazer` is a Sui module that allows consumers to easily parse and verify cryptographically signed price feed data from the Pyth Network's high-frequency Lazer protocol for use on-chain.
3+
`pyth_lazer` is a Sui package that allows consumers to easily parse and verify cryptographically signed price feed data from the Pyth Network's high-frequency Lazer protocol for use on-chain.
44

55
This package is built using the Move language and Sui framework.
66

@@ -21,4 +21,5 @@ sui move test test_parse_and_verify_le_ecdsa_update # run a specific test
2121
```
2222

2323
Deploy:
24+
2425
TODO

lazer/contracts/sui/sources/channel.move

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ public fun get_update_interval_ms(channel: &Channel): u64 {
6666
Channel::FixedRate200ms => 200,
6767
_ => 0,
6868
}
69-
}
69+
}

lazer/contracts/sui/sources/feed.move

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,46 +102,46 @@ public fun funding_timestamp(feed: &Feed): Option<Option<u64>> {
102102
}
103103

104104
/// Set the feed ID
105-
public fun set_feed_id(feed: &mut Feed, feed_id: u32) {
105+
public(package) fun set_feed_id(feed: &mut Feed, feed_id: u32) {
106106
feed.feed_id = feed_id;
107107
}
108108

109109
/// Set the price
110-
public fun set_price(feed: &mut Feed, price: Option<Option<I64>>) {
110+
public(package) fun set_price(feed: &mut Feed, price: Option<Option<I64>>) {
111111
feed.price = price;
112112
}
113113

114114
/// Set the best bid price
115-
public fun set_best_bid_price(feed: &mut Feed, best_bid_price: Option<Option<I64>>) {
115+
public(package) fun set_best_bid_price(feed: &mut Feed, best_bid_price: Option<Option<I64>>) {
116116
feed.best_bid_price = best_bid_price;
117117
}
118118

119119
/// Set the best ask price
120-
public fun set_best_ask_price(feed: &mut Feed, best_ask_price: Option<Option<I64>>) {
120+
public(package) fun set_best_ask_price(feed: &mut Feed, best_ask_price: Option<Option<I64>>) {
121121
feed.best_ask_price = best_ask_price;
122122
}
123123

124124
/// Set the publisher count
125-
public fun set_publisher_count(feed: &mut Feed, publisher_count: Option<u16>) {
125+
public(package) fun set_publisher_count(feed: &mut Feed, publisher_count: Option<u16>) {
126126
feed.publisher_count = publisher_count;
127127
}
128128

129129
/// Set the exponent
130-
public fun set_exponent(feed: &mut Feed, exponent: Option<I16>) {
130+
public(package) fun set_exponent(feed: &mut Feed, exponent: Option<I16>) {
131131
feed.exponent = exponent;
132132
}
133133

134134
/// Set the confidence interval
135-
public fun set_confidence(feed: &mut Feed, confidence: Option<Option<I64>>) {
135+
public(package) fun set_confidence(feed: &mut Feed, confidence: Option<Option<I64>>) {
136136
feed.confidence = confidence;
137137
}
138138

139139
/// Set the funding rate
140-
public fun set_funding_rate(feed: &mut Feed, funding_rate: Option<Option<I64>>) {
140+
public(package) fun set_funding_rate(feed: &mut Feed, funding_rate: Option<Option<I64>>) {
141141
feed.funding_rate = funding_rate;
142142
}
143143

144144
/// Set the funding timestamp
145-
public fun set_funding_timestamp(feed: &mut Feed, funding_timestamp: Option<Option<u64>>) {
145+
public(package) fun set_funding_timestamp(feed: &mut Feed, funding_timestamp: Option<Option<u64>>) {
146146
feed.funding_timestamp = funding_timestamp;
147147
}

lazer/contracts/sui/sources/i16.move

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,4 @@ fun test_boundary_values() {
147147

148148
// Test -1
149149
assert!(from_u16(0xFFFF) == new(1, true), 1);
150-
}
150+
}

lazer/contracts/sui/sources/i64.move

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,4 @@ fun test_single_zero_representation() {
134134
assert!(&new(0, true) == &new(0, false), 1);
135135
assert!(&new(0, true) == &from_u64(0), 1);
136136
assert!(&new(0, false) == &from_u64(0), 1);
137-
}
137+
}

lazer/contracts/sui/sources/update.move

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ public fun channel(update: &Update): Channel {
3535
/// Get a reference to the feeds vector of the update
3636
public fun feeds(update: &Update): vector<Feed> {
3737
update.feeds
38-
}
38+
}

0 commit comments

Comments
 (0)