Closed Netail closed 2 years ago
@wooyh2000 Nope this is fine! Just keep pushing onto this branch or diverge of this one if your work starts too conflict too much.
I think you don't need to merge into main, but into our own branch. Maybe it is more convenient to create an immutablefive-develop branche
This is our own branch, please leave on draft as it's not even ready
@Netail Lekker busy! Quick pointer: Using expect statements will actually validate if the response of getRewards is as expected. Your tests will currently (probably) all get green checkmarks since there are only console logs and nothing really fails.
Test the response of a call operation:
await expect(contract.connect(addr1).getRewards()).to.eq( // expected response )
Test the response of a send operation (if events are emitted from the contract):
expect(contract.setRewards(addr1.address, [{ token: token.address, amount: 5 }])).to emit(contract, 'ExpectedEventName');
Yup I haven't created valid tests yet, they were for testing purposes for now.
Cool cool, just checkin :)
@Netail Is the PR still a work in progress? And you may want to add comments in your smart-contract and tests to clarify your code more.
I think you don't need to merge into main, but into our own branch. Maybe it is more convenient to create an immutablefive-develop branche