Update anchor to v0.27.0, stop using submodule (#582)
This commit is contained in:
parent
9429d3991d
commit
5a05e9cb2e
|
@ -1,10 +1,3 @@
|
||||||
[submodule "anchor"]
|
|
||||||
path = 3rdparty/anchor
|
|
||||||
url = https://github.com/blockworks-foundation/anchor.git
|
|
||||||
branch = v0.25.0-mangov4
|
|
||||||
[submodule "switchboard-v2"]
|
|
||||||
path = 3rdparty/switchboard-v2
|
|
||||||
url = https://github.com/blockworks-foundation/sbv2-solana.git
|
|
||||||
[submodule "3rdparty/fixed"]
|
[submodule "3rdparty/fixed"]
|
||||||
path = 3rdparty/fixed
|
path = 3rdparty/fixed
|
||||||
url = https://gitlab.com/ckamm/fixed.git
|
url = https://gitlab.com/ckamm/fixed.git
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit b3707b1faaf6816cb3dd600074c81a39d373e952
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 97ed7b12de198f9dca2637af0ce8f5823cc3a0e3
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,7 +3,6 @@ members = [
|
||||||
"bin/*",
|
"bin/*",
|
||||||
"programs/mango-v4",
|
"programs/mango-v4",
|
||||||
"lib/*",
|
"lib/*",
|
||||||
"3rdparty/anchor/cli",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
|
@ -12,8 +11,3 @@ overflow-checks = true
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
# for gzip encoded responses
|
# for gzip encoded responses
|
||||||
jsonrpc-core-client = { git = "https://github.com/ckamm/jsonrpc.git", branch = "ckamm/http-with-gzip" }
|
jsonrpc-core-client = { git = "https://github.com/ckamm/jsonrpc.git", branch = "ckamm/http-with-gzip" }
|
||||||
# these patch anchor to use solana 1.14.9 in order to fix dependency conflicts in switchboard-v2
|
|
||||||
# downstream applications may need to copy these patches to their own workspace
|
|
||||||
anchor-spl = { path = "./3rdparty/anchor/spl/" }
|
|
||||||
anchor-lang = { path = "./3rdparty/anchor/lang/" }
|
|
||||||
switchboard-v2 = { path = "./3rdparty/switchboard-v2/rust/switchboard-v2/" }
|
|
||||||
|
|
12
README.md
12
README.md
|
@ -27,6 +27,7 @@ See DEVELOPING.md
|
||||||
|
|
||||||
- rust version 1.65.0
|
- rust version 1.65.0
|
||||||
- solana-cli 1.14.9
|
- solana-cli 1.14.9
|
||||||
|
- anchor-cli 0.27.0
|
||||||
- npm 8.1.2
|
- npm 8.1.2
|
||||||
- node v16.13.1
|
- node v16.13.1
|
||||||
|
|
||||||
|
@ -43,16 +44,7 @@ Consider setting the git option `submodule.recurse=true`.
|
||||||
|
|
||||||
### Release
|
### Release
|
||||||
|
|
||||||
Here are steps followed while performing a program deployment to mainnet-beta
|
For program deployment, see RELEASING.md.
|
||||||
|
|
||||||
- review diff of last deployed tag to mainnet-beta, e.g. https://github.com/blockworks-foundation/mango-v4/compare/program-v0.4.0..dev, pay special attention to account layout changes, backward compatibility of newly introduced account fields, etc.
|
|
||||||
- deploy to mainnet-beta
|
|
||||||
- update changelog with deploy timestamp and tx
|
|
||||||
- add a git tag e.g. `program-v0.0.1`, should match the version the program has
|
|
||||||
- reset `main` to currently deployed tag
|
|
||||||
- notify other contributors for bringing in changes from new release by merging `main` into their branch, e.g. `ts-client` and `deploy-mm`
|
|
||||||
- notify other contributors for appropriately handling offchain services e.g. scrapers, market makers, etc.
|
|
||||||
- bump program version in `Cargo.toml` on dev branch for next release
|
|
||||||
|
|
||||||
Here are steps followed while performing a npm package release
|
Here are steps followed while performing a npm package release
|
||||||
note: the UI currently uses code directly from github, pointing to the ts-client branch
|
note: the UI currently uses code directly from github, pointing to the ts-client branch
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
- Do a verifiable build
|
- Do a verifiable build
|
||||||
|
|
||||||
cargo run -p anchor-cli -- build --verifiable --solana-version 1.14.13 -- --features enable-gpl
|
anchor build --verifiable --solana-version 1.14.13 -- --features enable-gpl
|
||||||
|
|
||||||
(or wait for github to finish and create the release)
|
(or wait for github to finish and create the release)
|
||||||
|
|
||||||
|
@ -45,13 +45,13 @@
|
||||||
|
|
||||||
- Create IDL buffer
|
- Create IDL buffer
|
||||||
|
|
||||||
cargo run -p anchor-cli -- 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 4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg
|
||||||
|
|
||||||
Save the returned address as $IDL_BUFFER
|
Save the returned address as $IDL_BUFFER
|
||||||
|
|
||||||
- Set IDL buffer authority
|
- Set IDL buffer authority
|
||||||
|
|
||||||
cargo run -p anchor-cli -- 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 4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg --new-authority FP4PxqHTVzeG2c6eZd7974F9WvKUSdBeduUK3rjYyvBw $IDL_BUFFER
|
||||||
|
|
||||||
- Make a gist for the proposal description, ideally based on previous upgrade proposals
|
- Make a gist for the proposal description, ideally based on previous upgrade proposals
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,9 @@ name = "cli"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anchor-client = { path = "../../3rdparty/anchor/client" }
|
anchor-client = "0.27.0"
|
||||||
anchor-lang = { path = "../../3rdparty/anchor/lang" }
|
anchor-lang = "0.27.0"
|
||||||
anchor-spl = { path = "../../3rdparty/anchor/spl" }
|
anchor-spl = "0.27.0"
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
clap = { version = "3.1.8", features = ["derive", "env"] }
|
clap = { version = "3.1.8", features = ["derive", "env"] }
|
||||||
dotenv = "0.15.0"
|
dotenv = "0.15.0"
|
||||||
|
|
|
@ -8,9 +8,9 @@ name = "keeper"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anchor-client = { path = "../../3rdparty/anchor/client" }
|
anchor-client = "0.27.0"
|
||||||
anchor-lang = { path = "../../3rdparty/anchor/lang" }
|
anchor-lang = "0.27.0"
|
||||||
anchor-spl = { path = "../../3rdparty/anchor/spl" }
|
anchor-spl = "0.27.0"
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
clap = { version = "3.1.8", features = ["derive", "env"] }
|
clap = { version = "3.1.8", features = ["derive", "env"] }
|
||||||
dotenv = "0.15.0"
|
dotenv = "0.15.0"
|
||||||
|
|
|
@ -8,8 +8,8 @@ name = "liquidator"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anchor-lang = { path = "../../3rdparty/anchor/lang" }
|
anchor-lang = "0.27.0"
|
||||||
anchor-client = { path = "../../3rdparty/anchor/client" }
|
anchor-client = "0.27.0"
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
arrayref = "0.3.6"
|
arrayref = "0.3.6"
|
||||||
async-channel = "1.6"
|
async-channel = "1.6"
|
||||||
|
|
|
@ -8,8 +8,8 @@ name = "settler"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anchor-lang = { path = "../../3rdparty/anchor/lang" }
|
anchor-lang = "0.27.0"
|
||||||
anchor-client = { path = "../../3rdparty/anchor/client" }
|
anchor-client = "0.27.0"
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
arrayref = "0.3.6"
|
arrayref = "0.3.6"
|
||||||
async-channel = "1.6"
|
async-channel = "1.6"
|
||||||
|
|
|
@ -7,9 +7,9 @@ edition = "2021"
|
||||||
doctest = false
|
doctest = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anchor-client = { path = "../../3rdparty/anchor/client" }
|
anchor-client = "0.27.0"
|
||||||
anchor-lang = { path = "../../3rdparty/anchor/lang" }
|
anchor-lang = "0.27.0"
|
||||||
anchor-spl = { path = "../../3rdparty/anchor/spl" }
|
anchor-spl = "0.27.0"
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
async-channel = "1.6"
|
async-channel = "1.6"
|
||||||
async-once-cell = { version = "0.4.2", features = ["unpin"] }
|
async-once-cell = { version = "0.4.2", features = ["unpin"] }
|
||||||
|
|
|
@ -355,7 +355,8 @@ impl MangoGroupContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn from_serum_style_pubkey(d: [u64; 4]) -> Pubkey {
|
fn from_serum_style_pubkey(d: [u64; 4]) -> Pubkey {
|
||||||
Pubkey::new(bytemuck::cast_slice(&d as &[_]))
|
let b: [u8; 32] = bytemuck::cast(d);
|
||||||
|
Pubkey::from(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn fetch_raw_account(rpc: &RpcClientAsync, address: Pubkey) -> Result<Account, ClientError> {
|
async fn fetch_raw_account(rpc: &RpcClientAsync, address: Pubkey) -> Result<Account, ClientError> {
|
||||||
|
|
662
mango_v4.json
662
mango_v4.json
File diff suppressed because it is too large
Load Diff
|
@ -23,8 +23,8 @@ enable-gpl = []
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# todo: when to fix, when to use caret? need a regular chore to bump dependencies
|
# todo: when to fix, when to use caret? need a regular chore to bump dependencies
|
||||||
# note: possibly need init-if-needed feature
|
# note: possibly need init-if-needed feature
|
||||||
anchor-lang = { path = "../../3rdparty/anchor/lang" }
|
anchor-lang = "0.27.0"
|
||||||
anchor-spl = { path = "../../3rdparty/anchor/spl" }
|
anchor-spl = "0.27.0"
|
||||||
arrayref = "0.3.6"
|
arrayref = "0.3.6"
|
||||||
bincode = "1.3.3"
|
bincode = "1.3.3"
|
||||||
borsh = { version = "0.9.3", features = ["const-generics"] }
|
borsh = { version = "0.9.3", features = ["const-generics"] }
|
||||||
|
|
|
@ -124,7 +124,8 @@ pub fn load_open_orders_bytes(bytes: &[u8]) -> Result<&serum_dex::state::OpenOrd
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn pubkey_from_u64_array(d: [u64; 4]) -> Pubkey {
|
pub fn pubkey_from_u64_array(d: [u64; 4]) -> Pubkey {
|
||||||
Pubkey::new(bytemuck::cast_slice(&d as &[_]))
|
let b: [u8; 32] = bytemuck::cast(d);
|
||||||
|
Pubkey::from(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct InitOpenOrders<'info> {
|
pub struct InitOpenOrders<'info> {
|
||||||
|
|
|
@ -21,7 +21,7 @@ pub const MINIMUM_MAX_RATE: I80F48 = I80F48::from_bits(I80F48::ONE.to_bits() / 2
|
||||||
|
|
||||||
#[derive(Derivative)]
|
#[derive(Derivative)]
|
||||||
#[derivative(Debug)]
|
#[derivative(Debug)]
|
||||||
#[account(zero_copy(safe_bytemuck_derives))]
|
#[account(zero_copy)]
|
||||||
pub struct Bank {
|
pub struct Bank {
|
||||||
// ABI: Clients rely on this being at offset 8
|
// ABI: Clients rely on this being at offset 8
|
||||||
pub group: Pubkey,
|
pub group: Pubkey,
|
||||||
|
|
|
@ -26,7 +26,7 @@ pub const PERP_SETTLE_TOKEN_INDEX: TokenIndex = 0;
|
||||||
/// The token index used in AccountBuybackFeesWithMngo to exchange for MNGO
|
/// The token index used in AccountBuybackFeesWithMngo to exchange for MNGO
|
||||||
pub const FEE_BUYBACK_QUOTE_TOKEN_INDEX: TokenIndex = 0;
|
pub const FEE_BUYBACK_QUOTE_TOKEN_INDEX: TokenIndex = 0;
|
||||||
|
|
||||||
#[account(zero_copy(safe_bytemuck_derives))]
|
#[account(zero_copy)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Group {
|
pub struct Group {
|
||||||
// ABI: Clients rely on this being at offset 8
|
// ABI: Clients rely on this being at offset 8
|
||||||
|
|
|
@ -325,9 +325,7 @@ impl Owner for MangoAccountFixed {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Discriminator for MangoAccountFixed {
|
impl Discriminator for MangoAccountFixed {
|
||||||
fn discriminator() -> [u8; 8] {
|
const DISCRIMINATOR: [u8; 8] = MangoAccount::DISCRIMINATOR;
|
||||||
MangoAccount::discriminator()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl anchor_lang::ZeroCopy for MangoAccountFixed {}
|
impl anchor_lang::ZeroCopy for MangoAccountFixed {}
|
||||||
|
|
|
@ -12,7 +12,7 @@ use crate::state::*;
|
||||||
pub const FREE_ORDER_SLOT: PerpMarketIndex = PerpMarketIndex::MAX;
|
pub const FREE_ORDER_SLOT: PerpMarketIndex = PerpMarketIndex::MAX;
|
||||||
|
|
||||||
#[zero_copy]
|
#[zero_copy]
|
||||||
#[derive(AnchorDeserialize, AnchorSerialize, Derivative, bytemuck::Pod, bytemuck::Zeroable)]
|
#[derive(AnchorDeserialize, AnchorSerialize, Derivative, bytemuck::Pod)]
|
||||||
#[derivative(Debug)]
|
#[derivative(Debug)]
|
||||||
pub struct TokenPosition {
|
pub struct TokenPosition {
|
||||||
// TODO: Why did we have deposits and borrows as two different values
|
// TODO: Why did we have deposits and borrows as two different values
|
||||||
|
@ -102,7 +102,7 @@ impl TokenPosition {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[zero_copy]
|
#[zero_copy]
|
||||||
#[derive(AnchorSerialize, AnchorDeserialize, Derivative, bytemuck::Pod, bytemuck::Zeroable)]
|
#[derive(AnchorSerialize, AnchorDeserialize, Derivative, bytemuck::Pod)]
|
||||||
#[derivative(Debug)]
|
#[derivative(Debug)]
|
||||||
pub struct Serum3Orders {
|
pub struct Serum3Orders {
|
||||||
pub open_orders: Pubkey,
|
pub open_orders: Pubkey,
|
||||||
|
@ -158,7 +158,7 @@ impl Default for Serum3Orders {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[zero_copy]
|
#[zero_copy]
|
||||||
#[derive(AnchorSerialize, AnchorDeserialize, Derivative, bytemuck::Pod, bytemuck::Zeroable)]
|
#[derive(AnchorSerialize, AnchorDeserialize, Derivative, bytemuck::Pod)]
|
||||||
#[derivative(Debug)]
|
#[derivative(Debug)]
|
||||||
pub struct PerpPosition {
|
pub struct PerpPosition {
|
||||||
pub market_index: PerpMarketIndex,
|
pub market_index: PerpMarketIndex,
|
||||||
|
@ -782,7 +782,7 @@ impl PerpPosition {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[zero_copy]
|
#[zero_copy]
|
||||||
#[derive(AnchorSerialize, AnchorDeserialize, Debug, bytemuck::Pod, bytemuck::Zeroable)]
|
#[derive(AnchorSerialize, AnchorDeserialize, Debug, bytemuck::Pod)]
|
||||||
pub struct PerpOpenOrder {
|
pub struct PerpOpenOrder {
|
||||||
pub side_and_tree: u8, // SideAndOrderTree -- enums aren't POD
|
pub side_and_tree: u8, // SideAndOrderTree -- enums aren't POD
|
||||||
pub padding1: [u8; 1],
|
pub padding1: [u8; 1],
|
||||||
|
|
|
@ -12,7 +12,7 @@ pub const MAX_BANKS: usize = 6;
|
||||||
// the accounts that are relevant for this mint. The idea is that clients
|
// the accounts that are relevant for this mint. The idea is that clients
|
||||||
// can load this account to figure out which address maps to use when calling
|
// can load this account to figure out which address maps to use when calling
|
||||||
// instructions that need banks/oracles for all active positions.
|
// instructions that need banks/oracles for all active positions.
|
||||||
#[account(zero_copy(safe_bytemuck_derives))]
|
#[account(zero_copy)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct MintInfo {
|
pub struct MintInfo {
|
||||||
// ABI: Clients rely on this being at offset 8
|
// ABI: Clients rely on this being at offset 8
|
||||||
|
|
|
@ -57,7 +57,7 @@ pub mod switchboard_v2_mainnet_oracle {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[zero_copy]
|
#[zero_copy]
|
||||||
#[derive(AnchorDeserialize, AnchorSerialize, Debug, bytemuck::Pod, bytemuck::Zeroable)]
|
#[derive(AnchorDeserialize, AnchorSerialize, Debug, bytemuck::Pod)]
|
||||||
pub struct OracleConfig {
|
pub struct OracleConfig {
|
||||||
pub conf_filter: I80F48,
|
pub conf_filter: I80F48,
|
||||||
pub max_staleness_slots: i64,
|
pub max_staleness_slots: i64,
|
||||||
|
@ -97,7 +97,7 @@ pub struct OracleState {
|
||||||
pub oracle_type: OracleType,
|
pub oracle_type: OracleType,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[account(zero_copy(safe_bytemuck_derives))]
|
#[account(zero_copy)]
|
||||||
pub struct StubOracle {
|
pub struct StubOracle {
|
||||||
// ABI: Clients rely on this being at offset 8
|
// ABI: Clients rely on this being at offset 8
|
||||||
pub group: Pubkey,
|
pub group: Pubkey,
|
||||||
|
|
|
@ -27,7 +27,7 @@ pub struct BookSideOrderHandle {
|
||||||
pub order_tree: BookSideOrderTree,
|
pub order_tree: BookSideOrderTree,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[account(zero_copy(safe_bytemuck_derives))]
|
#[account(zero_copy)]
|
||||||
pub struct BookSide {
|
pub struct BookSide {
|
||||||
pub roots: [OrderTreeRoot; 2],
|
pub roots: [OrderTreeRoot; 2],
|
||||||
pub reserved_roots: [OrderTreeRoot; 4],
|
pub reserved_roots: [OrderTreeRoot; 4],
|
||||||
|
|
|
@ -21,7 +21,7 @@ pub trait QueueHeader: bytemuck::Pod {
|
||||||
fn decr_event_id(&mut self, n: u64);
|
fn decr_event_id(&mut self, n: u64);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[account(zero_copy(safe_bytemuck_derives))]
|
#[account(zero_copy)]
|
||||||
pub struct EventQueue {
|
pub struct EventQueue {
|
||||||
pub header: EventQueueHeader,
|
pub header: EventQueueHeader,
|
||||||
pub buf: [AnyEvent; MAX_NUM_EVENTS as usize],
|
pub buf: [AnyEvent; MAX_NUM_EVENTS as usize],
|
||||||
|
|
|
@ -15,7 +15,7 @@ use super::{orderbook, OracleConfig, OracleState, Orderbook, StablePriceModel, D
|
||||||
|
|
||||||
pub type PerpMarketIndex = u16;
|
pub type PerpMarketIndex = u16;
|
||||||
|
|
||||||
#[account(zero_copy(safe_bytemuck_derives))]
|
#[account(zero_copy)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct PerpMarket {
|
pub struct PerpMarket {
|
||||||
// ABI: Clients rely on this being at offset 8
|
// ABI: Clients rely on this being at offset 8
|
||||||
|
|
|
@ -6,7 +6,7 @@ use crate::state::*;
|
||||||
|
|
||||||
pub type Serum3MarketIndex = u16;
|
pub type Serum3MarketIndex = u16;
|
||||||
|
|
||||||
#[account(zero_copy(safe_bytemuck_derives))]
|
#[account(zero_copy)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Serum3Market {
|
pub struct Serum3Market {
|
||||||
// ABI: Clients rely on this being at offset 8
|
// ABI: Clients rely on this being at offset 8
|
||||||
|
|
|
@ -18,6 +18,6 @@ default = []
|
||||||
test-bpf = []
|
test-bpf = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anchor-lang = { path = "../../3rdparty/anchor/lang" }
|
anchor-lang = "0.27.0"
|
||||||
anchor-spl = { path = "../../3rdparty/anchor/spl" }
|
anchor-spl = "0.27.0"
|
||||||
solana-program = "~1.14.9"
|
solana-program = "~1.14.9"
|
||||||
|
|
|
@ -6,7 +6,7 @@ WALLET_WITH_FUNDS=~/.config/solana/mango-mainnet-1.json
|
||||||
PROGRAM_ID=4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg
|
PROGRAM_ID=4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg
|
||||||
|
|
||||||
# build program,
|
# build program,
|
||||||
cargo run -p anchor-cli -- build -- --features enable-gpl
|
anchor build -- --features enable-gpl
|
||||||
|
|
||||||
# patch types, which we want in rust, but anchor client doesn't support
|
# patch types, which we want in rust, but anchor client doesn't support
|
||||||
./idl-fixup.sh
|
./idl-fixup.sh
|
||||||
|
@ -21,5 +21,5 @@ solana --url https://mango.devnet.rpcpool.com program deploy --program-id $PROGR
|
||||||
-k $WALLET_WITH_FUNDS target/deploy/mango_v4.so --skip-fee-check
|
-k $WALLET_WITH_FUNDS target/deploy/mango_v4.so --skip-fee-check
|
||||||
|
|
||||||
# publish idl
|
# publish idl
|
||||||
cargo run -p anchor-cli -- idl upgrade --provider.cluster https://mango.devnet.rpcpool.com --provider.wallet $WALLET_WITH_FUNDS \
|
anchor idl upgrade --provider.cluster https://mango.devnet.rpcpool.com --provider.wallet $WALLET_WITH_FUNDS \
|
||||||
--filepath target/idl/mango_v4_no_docs.json $PROGRAM_ID
|
--filepath target/idl/mango_v4_no_docs.json $PROGRAM_ID
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
# WALLET_WITH_FUNDS=~/.config/solana/mango-devnet.json
|
# WALLET_WITH_FUNDS=~/.config/solana/mango-devnet.json
|
||||||
# PROGRAM_ID=4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg
|
# PROGRAM_ID=4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg
|
||||||
|
|
||||||
cargo run -p anchor-cli -- build -- --features enable-gpl
|
anchor build -- --features enable-gpl
|
||||||
./idl-fixup.sh
|
./idl-fixup.sh
|
||||||
RUST_BACKTRACE=full cargo run -p anchor-cli -- test --skip-build
|
RUST_BACKTRACE=full anchor test --skip-build
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,7 +3,7 @@
|
||||||
set -e pipefail
|
set -e pipefail
|
||||||
|
|
||||||
# build program,
|
# build program,
|
||||||
cargo run -p anchor-cli -- build -- --features enable-gpl
|
anchor build -- --features enable-gpl
|
||||||
|
|
||||||
# patch types, which we want in rust, but anchor client doesn't support
|
# patch types, which we want in rust, but anchor client doesn't support
|
||||||
./idl-fixup.sh
|
./idl-fixup.sh
|
||||||
|
|
Loading…
Reference in New Issue