Skip to content

Commit

Permalink
v24.2 program id change to boost
Browse files Browse the repository at this point in the history
Signed-off-by: microwavedcola1 <[email protected]>
  • Loading branch information
microwavedcola1 committed Jul 26, 2024
1 parent 9ad4aef commit e3220de
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
exclude = ["programs/margin-trade"]

[programs.localnet]
mango_v4 = "4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg"
mango_v4 = "zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25"

[programs.devnet]
mango_v4 = "4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg"
mango_v4 = "zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25"

[features]
seeds = true
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ See DEVELOPING.md and FAQ-DEV.md

### Deployments

- devnet: 4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg
- mainnet-beta: 4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg
- devnet: zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25
- mainnet-beta: zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25
- primary mango group on mainnet-beta: 78b8f4cGCwmZ9ysPFMWLaLTkkaYnUjwMJYStWe5RTSSX

### Release
Expand Down
6 changes: 3 additions & 3 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- $KEY as a path to a keypair (needs around 20 SOL for the buffer)
- $RPC_URL as a url to an RPC node
- 4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg is the address of the Mango v4 Program
- zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25 is the address of the Mango v4 Program
- FP4PxqHTVzeG2c6eZd7974F9WvKUSdBeduUK3rjYyvBw is the address of the Mango v4 Program Governance

- Assuming there's a release branch (like release/program-v0.22.0)
Expand Down Expand Up @@ -46,13 +46,13 @@

- Create IDL buffer

anchor idl write-buffer --provider.cluster $RPC_URL --provider.wallet $KEY --filepath target/idl/mango_v4_no_docs.json 4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg
anchor idl write-buffer --provider.cluster $RPC_URL --provider.wallet $KEY --filepath target/idl/mango_v4_no_docs.json zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25

Save the returned address as $IDL_BUFFER

- Set IDL buffer authority

anchor idl set-authority --provider.cluster $RPC_URL --provider.wallet $KEY --program-id 4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg --new-authority FP4PxqHTVzeG2c6eZd7974F9WvKUSdBeduUK3rjYyvBw $IDL_BUFFER
anchor idl set-authority --provider.cluster $RPC_URL --provider.wallet $KEY --program-id zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25 --new-authority FP4PxqHTVzeG2c6eZd7974F9WvKUSdBeduUK3rjYyvBw $IDL_BUFFER

- Make a gist for the proposal description, ideally based on previous upgrade proposals

Expand Down
2 changes: 1 addition & 1 deletion anchor-tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ enum MINTS {
BTC = 'BTC',
}
const NUM_USERS = 4;
const PROGRAM_ID = '4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg';
const PROGRAM_ID = 'zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25';

interface TestUser {
keypair: anchor.web3.Keypair;
Expand Down
2 changes: 1 addition & 1 deletion bin/service-mango-fills/conf/example-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ retry_connection_sleep_secs = 30

[source.snapshot]
rpc_http_url = "http://mango.rpcpool.com/<token>"
program_id = "4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg"
program_id = "zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25"
2 changes: 1 addition & 1 deletion bin/service-mango-orderbook/conf/example-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ retry_connection_sleep_secs = 30

[source.snapshot]
rpc_http_url = "http://mango.rpcpool.com/<token>"
program_id = "4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg"
program_id = "zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25"
2 changes: 1 addition & 1 deletion bin/service-mango-pnl/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ async fn main() -> anyhow::Result<()> {
let (account_write_queue_sender, slot_queue_sender) = memory_target::init(chain_data).await?;
let filter_config = FilterConfig {
entity_filter: EntityFilter::filter_by_program_id(
"4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg",
"zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25",
),
};
grpc_plugin_source::process_events(
Expand Down
2 changes: 1 addition & 1 deletion programs/mango-v4/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use state::{
TokenIndex, TCS_START_INCENTIVE,
};

declare_id!("4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg");
declare_id!("zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25");

#[program]
pub mod mango_v4 {
Expand Down
2 changes: 1 addition & 1 deletion programs/mango-v4/tests/cases/test_ix_gate_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async fn test_ix_gate_set() -> Result<(), TransportError> {

//
// test cu budget, ix has a lot of logging
// e.g. Program 4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg consumed 66986 of 75000 compute units
// e.g. Program zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25 consumed 66986 of 75000 compute units
send_tx(
solana,
IxGateSetInstruction {
Expand Down
2 changes: 1 addition & 1 deletion programs/mango-v4/tests/cases/test_replay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async fn test_replay() -> anyhow::Result<()> {
let known_accounts = [
"ComputeBudget111111111111111111111111111111",
"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg",
"zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25",
"11111111111111111111111111111111",
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
]
Expand Down
2 changes: 1 addition & 1 deletion release-to-devnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -ex pipefail

WALLET_WITH_FUNDS=~/.config/solana/mango-mainnet-1.json
PROGRAM_ID=4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg
PROGRAM_ID=zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25

# build program,
anchor build -- --features enable-gpl
Expand Down
2 changes: 1 addition & 1 deletion run-anchor-tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# WALLET_WITH_FUNDS=~/.config/solana/mango-devnet.json
# PROGRAM_ID=4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg
# PROGRAM_ID=zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25

anchor build -- --features enable-gpl
./idl-fixup.sh
Expand Down
2 changes: 1 addition & 1 deletion ts/client/ids.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "mainnet-beta.clarkeni",
"publicKey": "DLdcpC6AsAJ9xeKMR3WhHrN5sM5o7GVVXQhQ5vwisTtz",
"serum3ProgramId": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",
"mangoProgramId": "4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg",
"mangoProgramId": "zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25",
"banks": [
{
"name": "SOL",
Expand Down
6 changes: 3 additions & 3 deletions ts/client/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export const OPENBOOK_PROGRAM_ID = {
};

export const MANGO_V4_ID = {
testnet: new PublicKey('4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg'),
devnet: new PublicKey('4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg'),
'mainnet-beta': new PublicKey('4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg'),
testnet: new PublicKey('zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25'),
devnet: new PublicKey('zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25'),
'mainnet-beta': new PublicKey('zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25'),
};

export const MANGO_V4_MAIN_GROUP = new PublicKey(
Expand Down

0 comments on commit e3220de

Please sign in to comment.