Hi everyone!

I am learning solidity and smart contracts, and I am looking into other contracts code. I saw in some contracts that the constructor has a parameter _startBlock.

How I decide what to put in there? What is the logic behind? Also, I read on Rug Doctor that the _startBlock is important for knowing if a platform is trustable or not. Why is important?

Thanks for your time!

1 Like

Hi, welcome! :wave:

I am not sure for this parameter _startBlock, but I think it all depends on your logic, for example, current block number is 1000, you want your contract to start at the block number 1500, so maybe then you can set this value as 1500 to start.

And I do not know the Rug Doctor, maybe you should share the contract.


Thank you for your answer Skyge!

This is the contract:

I deployed all the contracts, Egg, Masterchef and Timelock. All works fine. For the startBlock parameter I put a random number because I don’t understand how to decide what block will be the first. Why it is important.


its the block which starts your farming rewards, knowing each blocks is more or less 3 secs you can predict which time from now based on current block your farm will start, also inform the community which block will start farm.


Ahh ok, I think I understands now. Thank you!