Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/anchor/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ inputs:
default: 'v22.8.0'
solana-version:
description: 'The version of solana to use.'
default: 'v1.17.25'
default: 'v2.1.0'
anchor-version:
description: 'The version of anchor to use.'
default: 'v0.29.0'
default: 'v0.31.1'

runs:
using: "composite"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ This monorepo contains all the code needed to build, deploy and interact with th

### Requirements

- Anchor v0.29.0
- Solana v1.17.22
- Anchor v0.31.1
- Solana v2.1.0

### Getting Started

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: whirlpools
services:

build-solana-program:
image: backpackapp/build:v0.29.0
image: backpackapp/build:v0.31.1
working_dir: /usr/src/whirlpools
command: >
anchor build
Expand Down
12 changes: 9 additions & 3 deletions docs/rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/whirlpool/docs/03-SDKs/02-Environment Setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ In your project, run:
\`\`\`bash
yarn add "@orca-so/whirlpools-sdk"
yarn add "@orca-so/common-sdk"
yarn add "@coral-xyz/anchor@0.29.0"
yarn add "@coral-xyz/anchor@0.31.1"
yarn add "@solana/web3.js"
yarn add "@solana/spl-token"
yarn add "decimal.js"
Expand Down Expand Up @@ -250,7 +250,7 @@ This document covers the essential setup required to start building on Orca's SD
```bash
yarn add "@orca-so/whirlpools-sdk"
yarn add "@orca-so/common-sdk"
yarn add "@coral-xyz/anchor@0.29.0"
yarn add "@coral-xyz/anchor@0.31.1"
yarn add "@solana/web3.js"
yarn add "@solana/spl-token"
yarn add "decimal.js"
Expand Down
2 changes: 1 addition & 1 deletion docs/whirlpool/docs/05-Examples/02-CPI.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The classic `@solana/web3.js` implementation with Anchor provides:

### Important Note on Dependencies

The `@orca-so/whirlpools-sdk` is dependent on Anchor v0.29.0. For other Anchor versions, the examples include `resolutions` in the `package.json` to manage dependency conflicts.
The `@orca-so/whirlpools-sdk` is dependent on Anchor v0.31.0. For other Anchor versions, the examples include `resolutions` in the `package.json` to manage dependency conflicts.

## Specific Use Case: Launchpad Integration

Expand Down
10 changes: 8 additions & 2 deletions examples/rust-sdk/whirlpool_repositioning_bot/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/ts-sdk/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"@orca-so/whirlpools": "*",
"@solana/kit": "^2.1.0",
"@solana/kit": "^3.0.3",
"next": "^15.2.4",
"react": "^18.3.1",
"react-dom": "^18.3.1"
Expand Down
2 changes: 1 addition & 1 deletion legacy-sdk/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"start": "tsx src/index.ts"
},
"dependencies": {
"@coral-xyz/anchor": "0.31.0",
"@coral-xyz/anchor": "0.31.1",
"@orca-so/common-sdk": "*",
"@orca-so/whirlpools-sdk": "*",
"@solana/spl-token": "^0.4.14",
Expand Down
2 changes: 1 addition & 1 deletion legacy-sdk/whirlpool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In your project, run:
```bash
yarn add "@orca-so/whirlpools-sdk"
yarn add "@orca-so/common-sdk"
yarn add "@coral-xyz/anchor@0.29.0"
yarn add "@coral-xyz/anchor@0.31.1"
yarn add "@solana/web3.js"
yarn add "@solana/spl-token"
yarn add "decimal.js"
Expand Down
4 changes: 2 additions & 2 deletions legacy-sdk/whirlpool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"peerDependencies": {
"@coral-xyz/anchor": "~0.31.0",
"@coral-xyz/anchor": "~0.31.1",
"@solana/spl-token": "^0.4.14",
"@solana/web3.js": "^1.98.4"
},
Expand All @@ -16,7 +16,7 @@
"tiny-invariant": "^1.3.1"
},
"devDependencies": {
"@coral-xyz/anchor": "~0.31.0",
"@coral-xyz/anchor": "~0.31.1",
"@orca-so/whirlpools-program": "*",
"@solana/spl-token": "^0.4.14",
"@solana/web3.js": "^1.98.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ describe("open_position_with_metadata", () => {
await assert.rejects(
tx.addSigner(defaultMint).buildAndExecute(),
// InvalidProgramId
// https://github.com/coral-xyz/anchor/blob/v0.29.0/lang/src/error.rs#L178-L180
// https://github.com/coral-xyz/anchor/blob/v0.31.1/lang/src/error.rs#L229-231
/0xbc0/,
);
});
Expand All @@ -450,7 +450,7 @@ describe("open_position_with_metadata", () => {
await assert.rejects(
tx.addSigner(defaultMint).buildAndExecute(),
// InvalidProgramId
// https://github.com/coral-xyz/anchor/blob/v0.29.0/lang/src/error.rs#L178-L180
// https://github.com/coral-xyz/anchor/blob/v0.31.1/lang/src/error.rs#L229-L231
/0xbc0/,
);
});
Expand All @@ -470,7 +470,7 @@ describe("open_position_with_metadata", () => {
await assert.rejects(
tx.addSigner(defaultMint).buildAndExecute(),
// ConstraintAddress
// https://github.com/coral-xyz/anchor/blob/v0.29.0/lang/src/error.rs#L89-L91
// https://github.com/coral-xyz/anchor/blob/v0.31.1/lang/src/error.rs#L229-231
/0x7dc/,
);
});
Expand Down
2 changes: 1 addition & 1 deletion programs/whirlpool/src/state/adaptive_fee_tier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ mod discriminator_tests {

#[test]
fn test_discriminator() {
let discriminator = AdaptiveFeeTier::discriminator();
let discriminator: [u8; 8] = AdaptiveFeeTier::DISCRIMINATOR.try_into().unwrap();
// The discriminator is determined by the struct name and not depending on the program id.
// $ echo -n account:AdaptiveFeeTier | sha256sum | cut -c 1-16
// 931090742f92952e
Expand Down
2 changes: 1 addition & 1 deletion programs/whirlpool/src/state/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ mod discriminator_tests {

#[test]
fn test_discriminator() {
let discriminator = WhirlpoolsConfig::discriminator();
let discriminator: [u8; 8] = WhirlpoolsConfig::DISCRIMINATOR.try_into().unwrap();
// The discriminator is determined by the struct name and not depending on the program id.
// $ echo -n account:WhirlpoolsConfig | sha256sum | cut -c 1-16
// 9d1431e0d957c1fe
Expand Down
2 changes: 1 addition & 1 deletion programs/whirlpool/src/state/config_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ mod discriminator_tests {

#[test]
fn test_discriminator() {
let discriminator = WhirlpoolsConfigExtension::discriminator();
let discriminator: [u8; 8] = WhirlpoolsConfigExtension::DISCRIMINATOR.try_into().unwrap();
// The discriminator is determined by the struct name and not depending on the program id.
// $ echo -n account:WhirlpoolsConfigExtension | sha256sum | cut -c 1-16
// 0263d7a3f01a993a
Expand Down
2 changes: 1 addition & 1 deletion programs/whirlpool/src/state/fee_tier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ mod discriminator_tests {

#[test]
fn test_discriminator() {
let discriminator = FeeTier::discriminator();
let discriminator: [u8; 8] = FeeTier::DISCRIMINATOR.try_into().unwrap();
// The discriminator is determined by the struct name and not depending on the program id.
// $ echo -n account:FeeTier | sha256sum | cut -c 1-16
// 384b9f4c8e44be69
Expand Down
2 changes: 1 addition & 1 deletion programs/whirlpool/src/state/fixed_tick_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ mod discriminator_tests {

#[test]
fn test_discriminator() {
let discriminator = TickArray::discriminator();
let discriminator: [u8; 8] = TickArray::DISCRIMINATOR.try_into().unwrap();
// The discriminator is determined by the struct name and not depending on the program id.
// $ echo -n account:TickArray | sha256sum | cut -c 1-16
// 4561bdbe6e0742bb
Expand Down
2 changes: 1 addition & 1 deletion programs/whirlpool/src/state/lock_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ mod discriminator_tests {

#[test]
fn test_discriminator() {
let discriminator = LockConfig::discriminator();
let discriminator: [u8; 8] = LockConfig::DISCRIMINATOR.try_into().unwrap();
// The discriminator is determined by the struct name and not depending on the program id.
// $ echo -n account:LockConfig | sha256sum | cut -c 1-16
// 6a2fee9f7c0ca0c0
Expand Down
2 changes: 1 addition & 1 deletion programs/whirlpool/src/state/oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ mod discriminator_tests {

#[test]
fn test_discriminator() {
let discriminator = Oracle::discriminator();
let discriminator: [u8; 8] = Oracle::DISCRIMINATOR.try_into().unwrap();
// The discriminator is determined by the struct name and not depending on the program id.
// $ echo -n account:Oracle | sha256sum | cut -c 1-16
// 8bc283b38cb3e5f4
Expand Down
2 changes: 1 addition & 1 deletion programs/whirlpool/src/state/position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ mod discriminator_tests {

#[test]
fn test_discriminator() {
let discriminator = Position::discriminator();
let discriminator: [u8; 8] = Position::DISCRIMINATOR.try_into().unwrap();
// The discriminator is determined by the struct name and not depending on the program id.
// $ echo -n account:Position | sha256sum | cut -c 1-16
// aabc8fe47a40f7d0
Expand Down
2 changes: 1 addition & 1 deletion programs/whirlpool/src/state/position_bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ mod discriminator_tests {

#[test]
fn test_discriminator() {
let discriminator = PositionBundle::discriminator();
let discriminator: [u8; 8] = PositionBundle::DISCRIMINATOR.try_into().unwrap();
// The discriminator is determined by the struct name and not depending on the program id.
// $ echo -n account:PositionBundle | sha256sum | cut -c 1-16
// 81a9af41b95f2064
Expand Down
2 changes: 1 addition & 1 deletion programs/whirlpool/src/state/token_badge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ mod discriminator_tests {

#[test]
fn test_discriminator() {
let discriminator = TokenBadge::discriminator();
let discriminator: [u8; 8] = TokenBadge::DISCRIMINATOR.try_into().unwrap();
// The discriminator is determined by the struct name and not depending on the program id.
// $ echo -n account:TokenBadge | sha256sum | cut -c 1-16
// 74dbcce5f974ff96
Expand Down
2 changes: 1 addition & 1 deletion programs/whirlpool/src/state/whirlpool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ mod discriminator_tests {

#[test]
fn test_discriminator() {
let discriminator = Whirlpool::discriminator();
let discriminator: [u8; 8] = Whirlpool::DISCRIMINATOR.try_into().unwrap();
// The discriminator is determined by the struct name and not depending on the program id.
// $ echo -n account:Whirlpool | sha256sum | cut -c 1-16
// 3f95d10ce1806309
Expand Down
2 changes: 1 addition & 1 deletion rust-sdk/client/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust-sdk/client/src/generated/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
pub mod shared;
pub mod types;

pub(crate) use programs::*;

1 change: 0 additions & 1 deletion rust-sdk/client/src/state/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
mod dynamic_tick_array;
mod tick_array;

pub use dynamic_tick_array::*;
pub use tick_array::*;
11 changes: 11 additions & 0 deletions rust-sdk/integration/client/anchor v0.31/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "orca_whirlpools_client_integration_anchor_v0_31"
edition = "2021"

[lib]
path = "../../lib.rs"

[dependencies]
anchor-lang = { version = "~0.31.1" }
solana-program = { version = "~2.1.0" }
orca_whirlpools_client = { path = "../../../client", features = ["anchor"] }
10 changes: 8 additions & 2 deletions rust-sdk/whirlpool/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading