Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

withdraw and call spl raydium swap poc #76

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
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
22 changes: 21 additions & 1 deletion Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
skip-lint = false

[programs.localnet]
connected = "4xEw862A2SEwMjofPkUyd4NEekmVJKJsdHkK3UkAtDrc"
connectedSPL = "8iUjRRhUCn8BjrvsWPfj8mguTe9L81ES4oAUApiF8JFC"
gateway = "ZETAjseVjuFsxdRxo6MmTCvqFwb3ZHUx56Co3vCmGis"

[registry]
Expand All @@ -15,4 +17,22 @@
wallet = "~/.config/solana/id.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.test.ts"

[test.validator]
url = "https://api.mainnet-beta.solana.com"

# [test]
# startup_wait = 20000

# cp-swap program in mainnet
[[test.validator.clone]]
address = "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"

# cp-swap create_pool_fee_reveiver in mainnet

Check warning on line 32 in Anchor.toml

View workflow job for this annotation

GitHub Actions / stable / typos

"reveiver" should be "receiver".
[[test.validator.clone]]
address = "DNXgeM9EiiaAbaWvwjHj9fQQLAX5ZsfHyvmYUNRAdNC8"

# cp-swap ammConfig in mainnet
[[test.validator.clone]]
address = "D4FPEruKEHrG5TenZ2mpDGEfu1iUvTiqBxvpU8HLBvC2"
116 changes: 87 additions & 29 deletions Cargo.lock

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

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
"rust:fmt": "./scripts/fmt.sh"
},
"dependencies": {
"@coral-xyz/anchor": "^0.30.0",
"@coral-xyz/anchor": "^0.30.1",
"@solana/spl-memo": "^0.2.5",
"@solana/spl-token": "^0.4.6",
"@solana/spl-token": "^0.4.8",
"elliptic": "^6.5.7",
"ethereumjs-util": "^7.1.5",
"secp256k1": "^5.0.0"
"secp256k1": "^5.0.0",
"@solana/web3.js": "^1.95.3",
"@raydium-io/raydium-sdk-v2": "^0.1.71-alpha"
},
"devDependencies": {
"@types/bn.js": "^5.1.0",
Expand Down
23 changes: 23 additions & 0 deletions programs/connected/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[package]
name = "connected"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "connected"

[features]
default = []
cpi = ["no-entrypoint"]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"]

[dependencies]
anchor-lang = { version = "=0.30.1" }
anchor-spl = { version = "=0.30.1" }
spl-associated-token-account = "3.0.2"
solana-program = "=1.18.15"
2 changes: 2 additions & 0 deletions programs/connected/Xargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.bpfel-unknown-unknown.dependencies.std]
features = []
Loading
Loading