Skip to content

Commit e670f57

Browse files
authored
feat(message-buffer): add init msg buffer pda to script, fix msg buffer pid (#845)
1 parent c0956f8 commit e670f57

File tree

10 files changed

+386
-112
lines changed

10 files changed

+386
-112
lines changed

pythnet/message_buffer/Anchor.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
seeds = true
33
skip-lint = false
44
[programs.localnet]
5-
message_buffer = "Vbmv1jt4vyuqBZcpYPpnVhrqVe5e6ZPb6JxDcffRHUM"
5+
message_buffer = "7Vbmv1jt4vyuqBZcpYPpnVhrqVe5e6ZPb6JxDcffRHUM"
66
mock_cpi_caller = "Dg5PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"
77

88
[registry]

pythnet/message_buffer/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
},
77
"dependencies": {
88
"@coral-xyz/anchor": "^0.27.0",
9-
"@lumina-dev/test": "^0.0.12"
9+
"@lumina-dev/test": "^0.0.12",
10+
"@pythnetwork/client": "^2.17.0",
11+
"dotenv": "^16.0.3"
1012
},
1113
"devDependencies": {
1214
"@types/bn.js": "^5.1.0",

pythnet/message_buffer/programs/message_buffer/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use {
1212
state::*,
1313
};
1414

15-
declare_id!("Vbmv1jt4vyuqBZcpYPpnVhrqVe5e6ZPb6JxDcffRHUM");
15+
declare_id!("7Vbmv1jt4vyuqBZcpYPpnVhrqVe5e6ZPb6JxDcffRHUM");
1616

1717
#[program]
1818
pub mod message_buffer {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
MESSAGE_BUFFER_PROGRAM_ID=BZZFM8qzdWvv4ysy8dxpAzjs9WJ6iy9y1ph2YNqWYzrm
2+
ORACLE_PROGRAM_ID=7th6GdMuo4u1zNLzFAyMY6psunHNsGjPjo8hXvcTgKei
3+
PAYER_KEYPAIR_PATH=/keys/funding.json
4+
CLUSTER=integration
5+
# 522 + 85(PriceFeedMessage) + 101(TwapMessage)
6+
INITIAL_SIZE=708
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
MESSAGE_BUFFER_PROGRAM_ID=BZZFM8qzdWvv4ysy8dxpAzjs9WJ6iy9y1ph2YNqWYzrm
2+
PAYER_KEYPAIR_PATH=/Users/rchen/.config/solana/id.json
3+
ENDPOINT=http://pythnet:8899
4+
CLUSTER=localnet
5+
# 522 + 85(PriceFeedMessage) + 101(TwapMessage)
6+
INITIAL_SIZE=708
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MESSAGE_BUFFER_PROGRAM_ID=7Vbmv1jt4vyuqBZcpYPpnVhrqVe5e6ZPb6JxDcffRHUM
2+
PAYER_KEYPAIR_PATH=<ABSOLUTE_PATH_TO_KEYPAIR>
3+
CLUSTER=pythtest-crosschain
4+
# Whitelist admin will be initialized to same as payer
5+
# then a separate txn will be used to set it to the following address
6+
# after the message buffers have been initialized
7+
# WHITELIST_ADMIN=D8y6qTbQeYQdyrgKUvZbsveQkfnUThRKZvewddr4SKNt # Pythtest Multisig authority address (PDA of executor)
8+
# 522 + 85(PriceFeedMessage) + 101(TwapMessage) + extra buffer
9+
INITIAL_SIZE=2048
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MESSAGE_BUFFER_PROGRAM_ID=
2+
# absolute path to keypair
3+
PAYER_KEYPAIR_PATH=
4+
# 'devnet' | 'testnet' | 'mainnet-beta' |'integration' | 'pythtest-conformance' | 'pythnet' | 'localnet' | 'pythtest-crosschain';
5+
CLUSTER=
6+
# optional pubkey whitelist admin to set after initializing accounts
7+
# whitelist admin will initially be set to the payer
8+
WHITELIST_ADMIN=
9+
INITIAL_SIZE=

0 commit comments

Comments
 (0)