r4bbit 9444d72c60
feat(amm): route user deposits and LP burns through ATA program
Add `owner` and `ata_program_id` parameters to `add_liquidity`,
`remove_liquidity`, `swap_exact_input`, and `swap_exact_output`. User
deposit-side transfers now emit `ATA::Transfer` chained calls instead of
`Token::Transfer` directly, and LP burns emit `ATA::Burn` instead of
`Token::Burn`. Vault withdrawal chained calls are unchanged.

- Add `ata_program_id` field to `AddLiquidity`, `RemoveLiquidity`,
  `SwapExactInput`, and `SwapExactOutput` instruction variants in
  `amm_core`
- Add `ata_core` dependency to `amm_program` and guest crates
- Update guest binary, unit tests, and integration tests to supply the
  new `owner` account and `ata_program_id` at every call site
- Regenerate `artifacts/amm-idl.json`

Closes #11
2026-04-22 14:35:30 +02:00

22 lines
667 B
TOML

[package]
name = "amm-guest"
version = "0.1.0"
edition = "2021"
[workspace]
[[bin]]
name = "amm"
path = "src/bin/amm.rs"
[dependencies]
spel-framework = { git = "https://github.com/logos-co/spel.git", tag = "v0.2.0-rc.2", package = "spel-framework" }
nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.0-rc1" }
risc0-zkvm = { version = "=3.0.5", default-features = false }
amm_core = { path = "../../core" }
ata_core = { path = "../../../ata/core" }
amm_program = { path = "../..", package = "amm_program" }
token_core = { path = "../../../token/core" }
serde = { version = "1.0", features = ["derive"] }
borsh = "1.5"