Skip to content

Commit 0769af6

Browse files
committed
Merge branch 'main' of github.com:pyth-network/pyth-crosschain into tb/pyth-ethereum/dont-store-in-parse
2 parents 87c6654 + e098914 commit 0769af6

File tree

34 files changed

+1953
-41
lines changed

34 files changed

+1953
-41
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Publish Rust package pyth-lazer-publisher-sdk to crates.io
2+
3+
on:
4+
push:
5+
tags:
6+
- rust-pyth-lazer-publisher-sdk-v*
7+
jobs:
8+
publish-pyth-lazer-publisher-sdk:
9+
name: Publish Rust package pyth-lazer-publisher-sdk to crates.io
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout sources
13+
uses: actions/checkout@v2
14+
15+
- run: cargo publish --token ${CARGO_REGISTRY_TOKEN}
16+
env:
17+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
18+
working-directory: "lazer/publisher-sdk/rust"

contract_manager/store/chains/CosmWasmChains.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,11 @@
8282
prefix: xion
8383
feeDenom: uxion
8484
type: CosmWasmChain
85+
- endpoint: https://rpc.xion-mainnet-1.burnt.com:443
86+
id: xion
87+
wormholeChainName: xion
88+
mainnet: true
89+
gasPrice: "0.025"
90+
prefix: xion
91+
feeDenom: uxion
92+
type: CosmWasmChain

contract_manager/store/contracts/CosmWasmPriceFeedContracts.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@
4646
- chain: xion_testnet_2
4747
address: xion1wptw89weav8tnpgxg4fyhcahgk8yy99lka3w308536ktadkvjwxqe463hl
4848
type: CosmWasmPriceFeedContract
49+
- chain: xion
50+
address: xion18nsqwhfwnqzs4vkxdr02x40awm0gz9pl0wn4ecsl8qqra2vxqppq57qx5a
51+
type: CosmWasmPriceFeedContract

contract_manager/store/contracts/CosmWasmWormholeContracts.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@
4646
- chain: xion_testnet_2
4747
address: xion1qlrdccrcw4rew9ervlazeyt9qmcx84r87vrq74sfd48f4q8y3qrqf59syp
4848
type: CosmWasmWormholeContract
49+
- chain: xion
50+
address: xion1zfdqgkd9lcqwc4ywkeg2pr2v2p5xxa7n2s9layq2623pvhp4xv0sr4659c
51+
type: CosmWasmWormholeContract
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
- chain: near
22
address: pyth-oracle.near
3-
type: NearPriceFeedContract
43
governanceDataSourceChain: 1
54
governanceDataSourceAddress: 5635979a221c34931e32620b9293a463065555ea71fe97cd6237ade875b12e9e
65
lastExecutedGovernanceSequence: 408
6+
type: NearPriceFeedContract
77
- chain: near_testnet
88
address: pyth-oracle.testnet
9-
type: NearPriceFeedContract
109
governanceDataSourceChain: 1
1110
governanceDataSourceAddress: 63278d271099bfd491951b3e648f08b1c71631e4a53674ad43e8f9f98068c385
1211
lastExecutedGovernanceSequence: 100
12+
type: NearPriceFeedContract

governance/xc_admin/packages/xc_admin_common/src/chains.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export const RECEIVER_CHAINS = {
108108
story: 60078,
109109
hyperevm: 60079,
110110
bittensor_mainnet: 60080,
111+
xion: 60081,
111112

112113
// Testnets as a separate chain ids (to use stable data sources and governance for them)
113114
injective_testnet: 60013,

lazer/Cargo.lock

Lines changed: 80 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lazer/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[workspace]
22
resolver = "2"
33
members = [
4+
"publisher_sdk/rust",
45
"sdk/rust/protocol",
56
"sdk/rust/client",
67
"contracts/solana/programs/pyth-lazer-solana-contract",
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
syntax = "proto3";
2+
3+
import "google/protobuf/timestamp.proto";
4+
5+
package pyth_lazer_transaction;
6+
7+
// PublisherUpdate contains an array of individual updates and a timestamp
8+
message PublisherUpdate {
9+
// Array of updates, each of which target a single feed
10+
repeated FeedUpdate updates = 1;
11+
12+
// ID of the Publisher that is sending the update
13+
// Should match ID stored in Pyth Lazer
14+
optional uint32 publisher_id = 2;
15+
16+
// Timestamp when this message was created
17+
optional google.protobuf.Timestamp publisher_timestamp = 3;
18+
}
19+
20+
// Update to a feed. May contain different types of data depending on what kind of update it is
21+
message FeedUpdate {
22+
// Feed which the update should be applied to
23+
// Should match a feed id recognized by PythLazer
24+
optional uint32 feed_id = 1;
25+
26+
// Timestamp when this data was first acquired or generated
27+
optional google.protobuf.Timestamp source_timestamp = 2;
28+
29+
// one of the valid updates allowed by publishers for a lazer feed
30+
oneof update {
31+
PriceUpdate price_update = 3;
32+
FundingRateUpdate funding_rate_update = 4;
33+
};
34+
}
35+
36+
message PriceUpdate {
37+
// Price for the symbol as an integer
38+
// Should be produced with a matching exponent to the configured exponent value in PythLazer
39+
// May be missing if no price data is available
40+
optional int64 price = 1;
41+
42+
// Best Bid Price for the symbol as an integer
43+
// Should be produced with a matching exponent to the configured exponent value in PythLazer
44+
// May be missing if no data is available
45+
optional int64 best_bid_price = 2;
46+
47+
// Best Ask Price for the symbol as an integer
48+
// Should be produced with a matching exponent to the configured exponent value in PythLazer
49+
// May be missing if no data is available
50+
optional int64 best_ask_price = 3;
51+
}
52+
53+
message FundingRateUpdate {
54+
// Price for which the funding rate applies to
55+
optional int64 price = 1;
56+
57+
// Perpetual Future funding rate
58+
optional int64 rate = 2;
59+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
syntax = "proto3";
2+
3+
package pyth_lazer_transaction;
4+
5+
import "publisher_update.proto";
6+
7+
// Types of Signatures allowed for signing Lazer Transactions
8+
enum TransactionSignatureType {
9+
// signature is 64 bytes long
10+
ed25519 = 0;
11+
}
12+
13+
// Signed lazer transaction payload
14+
// This is what Pyth Lazer expects as input to the system
15+
message SignedLazerTransaction {
16+
// Type and signature should match
17+
optional TransactionSignatureType signature_type = 1;
18+
19+
// Signature derived by signing payload with private key
20+
optional bytes signature = 2;
21+
22+
// a LazerTransaction message which is already encoded with protobuf as bytes
23+
// The encoded bytes are what should be signed
24+
optional bytes payload = 3;
25+
}
26+
27+
// Transaction contianing one of the valid Lazer Transactions
28+
message LazerTransaction {
29+
oneof payload {
30+
// Expected transaction sent by Publishers
31+
// May contain many individual updates to various feeds
32+
PublisherUpdate publisher_update = 1;
33+
}
34+
}

0 commit comments

Comments
 (0)