Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Im new to Solidity and im getting these error, "expected 300000000000000000 to equal 200000000000000000. The numerical values of the given "ethers.BigNumber" and "ethers.BigNumber" inputs were compared, and they differed.",
where i could be the problem
"expected 76025 to be below 75000. The numerical values of the given "ethers.BigNumber" and "number" inputs were compared, and they differed.", where i could optimize ?
Thanks for your feedback. Function argument having a
uint
type rules out the negative indexes. Trying to pass a negative number as auint
would not event reach a contract, it would fail on hardhat level. However I admit that I do not check if the user has modified any of the required method signatures by e.g. changing theuint
toint
. Added the test checking if the interface is left unmodified.For
get
function, you may have a negative index, therefore, it should be invalid (because formally negative indexes shouldn't work in Solidity) and the call must be reverted. However, there's no check for the negatives, and my solution, despite not having them either, passes all the tests.Either write in the description that the input
_input
will be non-negative or add some negative indexes to the tests, please.(if strictly, I would propose to add float numerals and/or non-numerals, but I couldn't find any info about receiving the type of the variable. =/)Other than that, this kata is great, hope it will get out of the Beta ^.^
Of course. Fixed.
Thanks for the feedback, added some additional tests, also for the case of getting an item with a non-existing index.
This is not tested.
Initial code has
contract WaitingListInitial
but the required contract name isWaitingList
, so it should becontract WaitingList
.