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

[registry]
url = "https://anchor.projectserum.com"

[scripts]
#
# Testing.
#
env = "echo $ANCHOR_PROVIDER_URL"
test = "npm run test"
test-with-build = "anchor run build && anchor test --skip-build"
#
# Build the program and all CPI dependencies.
#
build = "anchor run build-deps && anchor build"
build-deps = "anchor run build-name-service && anchor run build-metadata && anchor run build-cardinal-namespaces && anchor run build-cardinal-certificate"
build-name-service = "cd deps/solana-program-library/name-service/program && pwd && cargo build-bpf && cd ../../../../"
build-metadata = "cd deps/metaplex-program-library/token-metadata/program && pwd && cargo build-bpf && cd ../../../../"
build-cardinal-namespaces = "cd deps/cardinal-namespaces/programs/cardinal-namespaces/ && pwd && cargo build-bpf && cd ../../../../"
build-cardinal-certificate = "cd deps/cardinal-token-manager/programs/cardinal-token-manager && pwd && cargo build-bpf && cd ../../../../"

[[test.genesis]]
address = "namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX"
program = "./deps/solana-program-library/target/deploy/spl_name_service.so"

[[test.genesis]]
address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
program = "./deps/metaplex-program-library/token-metadata/target/deploy/mpl_token_metadata.so"

[[test.genesis]]
address = "nameXpT2PwZ2iA6DTNYTotTmiMYusBCYqwBLN2QgF4w"
program = "./deps/cardinal-namespaces/target/deploy/namespaces.so"

[[test.genesis]]
address = "mgr99QFMYByTqGPWmNqunV7vBLmWWXdSrHUfV8Jf3JM"
program = "./deps/cardinal-token-manager/target/deploy/cardinal_token_manager.so"

[workspace]
members = [
  "programs/spl-token-bonding",
  "programs/spl-token-collective" 
]

[programs.mainnet]
spl_token_bonding = "8qQkpoVeKuqRhhJWaAN5Q2CyWcavVidDC81tm7J5Qw9v"
spl_token_collective = "4NGSagpHoW35MAb15ZQgpDDHxVfneuSZZm3D1GjLZvLB"
chat = "chatGL6yNgZT2Z3BeMYGcgdMpcBKdmxko4C5UhEX4To"
fungible_entangler = "fent99TYZcj9PGbeooaZXEMQzMd7rz8vYFiudd8HevB"

[programs.localnet]
spl_token_bonding = "8qQkpoVeKuqRhhJWaAN5Q2CyWcavVidDC81tm7J5Qw9v"
spl_token_collective = "4NGSagpHoW35MAb15ZQgpDDHxVfneuSZZm3D1GjLZvLB"
chat = "chatGL6yNgZT2Z3BeMYGcgdMpcBKdmxko4C5UhEX4To"
fungible_entangler = "fent99TYZcj9PGbeooaZXEMQzMd7rz8vYFiudd8HevB"
