anchor build anchor deploy
Copy the program ID from the output logs; paste it in Anchor.toml & lib.rs.
Anchor.toml
lib.rs
anchor build anchor deploy yarn install yarn add ts-mocha anchor run test