Run these commands one after the other
- cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
- avm install latest
- avm use latest
- anchor --version
- change the cluster to
Mainnet
in the Anchor.toml file. - run
anchor build
- run
anchor deploy
- The fee can be changed in the programs/raydium-swapper/src/lib.rs file.
- Every fee should be multiplied by 100. Also do not change the denominator or WSOL address.
- For example, to change the fee to 0.1%, simple multiply 0.1 by 100 (10) and then change the fee in the code to 10.
- After changing the fee, follow the upgrade instruction below to upgrade the program.
Changes made to the program code can be updated on chain
- run
anchor build
- run
anchor upgrade target/deploy/raydium_swapper.so --program-id GqpnKEGRfwwisQxC8j9AHbtWf8BLzdo4mH3P5oJC7FiQ