3

What is the most seamless way of collaborating with other protocol devs on the same program?

Are there any best practices for handling Anchor params like file-paths, symlink and better keypair handling etc.

2 Answers 2

3

Top chad https://twitter.com/sol_idity has a really good answer of having these scripts in your package.json

    "build": "anchor build && ts-node scripts/add-missing-idl-types.ts",
    "deploy": "anchor deploy  --program-name program_name --provider.cluster $MAINNET_RPC --program-keypair target/deploy/program_name-keypair.json --provider.wallet target/deploy/program-authority.json",
    "write-buffer": "solana program write-buffer target/deploy/program_name.so -u $MAINNET_RPC -k target/deploy/program-authority.json",
    "set-buffer-authority": "solana program set-buffer-authority --new-buffer-authority BUFFER_AUTH_PUBKEY -u $MAINNET_RPC -k target/deploy/program-authority.json",
    "close-buffers": "solana program close --buffers -u $MAINNET_RPC -k target/deploy/program-authority.json",
    "test": "anchor test --provider.cluster $MAINNET_RPC --skip-deploy --skip-build --provider.wallet target/deploy/program-authority.json"

where $MAINNET_RPC is a bash variable

0

I would say syncing the locally used keypairs. deploy the keypair of the programs /target/deploy

add [programs.localnet] for testing.

1
  • hmm but still have the issue of different filepaths
    – Burger Bob
    Commented Feb 11 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.