This challenge designed for all contributors to Bit.Country Tewai Chain who would like to get involved in Bit.Country development.
You can submit the challenges by sending an email to [email protected] or feel free to invite Bit.Country Core Contributor to your repo to review your code.(check out who are contributors on Challenge 1).
Let's get started!
Getting to know and understand the concept of Bit.Country chain.
- Clone Bit.Country Blockchain repo using challenges-v1 branch Don't forget to leave a Star to show your support.
git clone -b challenges-v1 https://github.com/bit-country/Bit-Country-Blockchain.git
- Ensure everything works as expected by compiling the code
Implement Auction unit-test.
You may have seen the auction pallet has implemented some basic functionality of auctioning the Asset in the Bit.Country. However, there are missing some unit test for the Auction functionality.
You need to write at least 5 test cases to ensure the Auction pallet working as expected.
Here are some sample test cases but not limited to
- Create auction
- Bidding successful.
- Biding fail due to insufficient fund
- Simulate expired block number to ensure the Asset ownership transfer correctly after the end of the auction
- Self bidding should be rejected
- Bid on expired Auction
Country Staking Pallet Design
Design the staking pallet that allows staking on country to earn reward per era. For the sake of simplicity, please consider the following into the consideration
- Reward calculation could be a fixed percentage of own token staked per era (e.g 10 percent)
- Reward distribution mechadism: either executed by offchain worker or your own innovation. You can check out how Polkadot payout reward through authorship with note_uncles and note_author. [pallet_staking](https://github.com/paritytech/substrate/blob/master/frame/staking/src/lib.rs#L3247)
- No Slashing
Country Staking Pallet implementation.
Implement into code based on the Design from Challenge 3. The code need to follow the naming convention, syntax standard, proven logic by having unit test covered.