I have a question:

How to calculate this function for both Ethereum networks mainnet and ropsten getBlockTimestamp().add(delay)?

I installed web3.eth and tried web3.eth.getBlockTimestamp().add(delay) but it did not work. I would appreciate it if you could help me in this.

1 Answer 1


web3.eth does not have a method named getBlockTimestamp().

I think you are confusing the Web3 JS package with the Solidity smart contract language.

For reference: getBlockTimestamp.add(delay) appears in Compound's Timelock.sol contract, which is here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.