Skip to content

Commit

Permalink
Create and fund in any authorized mint (#12)
Browse files Browse the repository at this point in the history
* add authorized clmm and its pool state

* add authorize clmm program and pool state instructions

* add create donation v2 with multi currency support

* update test script

* add pool state ownership validation

* move seeds to 1 file

* add spec for creation in different mint token

* add donate in authorized token mints

* implement withdraw funds v2 for donation different from default token mint

* update comments

* add sequence diagrams for v2 flows
  • Loading branch information
makarychev authored Jun 10, 2024
1 parent 37df837 commit 6f3e931
Show file tree
Hide file tree
Showing 43 changed files with 7,643 additions and 1,577 deletions.
48 changes: 46 additions & 2 deletions Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,52 @@ donaproto = "HbNNG85aBuR9W5F8YobTeDRRmXWFbDhLDS6WbLzWbLhH"
url = "https://api.apr.dev"

[provider]
cluster = "Localnet"
cluster = "localnet"
wallet = "~/.config/solana/id.json"

[workspace]
types = "app/src/idl/"

[scripts]
test = "yarn run mocha -t 1000000 tests/*"
test = "yarn run mocha -t 1000000 tests/"

[test]
startup_wait = 10000

[test.validator]
url = "https://api.devnet.solana.com"

### Download the program from the mainnet-beta cluster
# solana program dump --url mainnet-beta TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA token.so
[[test.genesis]]
address = "devi51mZmdwUJGU9hjN27vEz64Gps7uUefqxg27EAtH"
program = "raydium_amm_v3.so"
upgradeable = true

# CLMM Config
# {
# id: 'GVSwm4smQBYcgAJU7qjFHLQBHTc4AdB3F2HbZp6KqKof',
# index: 2,
# protocolFeeRate: 120000,
# tradeFeeRate: 500,
# tickSpacing: 10,
# fundFeeRate: 40000,
# }
# let (amm_config_key, __bump) = Pubkey::find_program_address(
# &[
# raydium_amm_v3::states::AMM_CONFIG_SEED.as_bytes(),
# &config_index.to_be_bytes(),
# ],
# &pool_config.raydium_v3_program,
# );
[[test.validator.clone]]
address = 'GVSwm4smQBYcgAJU7qjFHLQBHTc4AdB3F2HbZp6KqKof'

# # AMM Program
# ALERT! not working
# `Transaction simulation failed: This program may not be used for executing instructions`
# [[test.validator.clone]]
# address = "devi51mZmdwUJGU9hjN27vEz64Gps7uUefqxg27EAtH"
# executable = true


Loading

0 comments on commit 6f3e931

Please sign in to comment.