The general idea of the following auction program is that everyone can send their bids during a bidding period. The bids already include sending money/sols in order to bind the bidders to their bid. If the highest bid is raised, previously the highest bidder can claim her/his money back at the end of an auction. After the end of the bidding period, the program has to be called manually for the beneficiary to receive their money.
anchor build
- Don't forget to change the program ID in
Anchor.toml
andprograms/auction/src/lib
- The program ID should be the result of the
anchor keys list
command
- The program ID should be the result of the
- Change path to your wallet in
Anchor.toml
and airdrop some sols withsolana airdrop <amount>
(you have to start thesolana-test-validator
before airdrop) - Make sure your
solana-test-validator
is terminated - In the
.anchor/program-logs
you can find the logs
anchor test
- Without conditions and validations