PatrickAlphaC / dao-template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error - TimelockController: operation is not ready

ShivaliLN opened this issue · comments

Hi Patrick,

I wrote my testcases in javascript, and not sure why but I keep getting this error: reverted with reason string 'TimelockController: operation is not ready'.

Also, I had to add a saltHash parameter in the execute function. Checked the contract and it does needed that. Could you please explain what is that for?

const exTx = await timelock.connect(Executor).execute(treasury.address, 0, encodedFunctionCall, descriptionHash, saltHash)
await exTx.wait(1)

Note- treasury.address here is like my Box.sol and 'Executor' is the one who I have given executor role.

Thank you so much for your time

Could you please give me the exact steps that you took to get that error starting from git clone https://github.com/PatrickAlphaC/dao-template?

Hello,

Actually, I started a fresh hardhat project did not git clone this repo.
a. npm oz contracts
b. Took the GovernorContract and TimeLock contract from here
c. Created one contract for ERC20Vote using contract from here (added few functions for my project)
d. Created Treasury contract (which is being governed by the timelock like box.sol)
d. Created one NFT contract as well for my project

Attached are the testscripts with error message, please let me know if any further details are needed.

Testscript.docx

Thank You

Ahhh - this wouldn't be an issue with the repo so much as a debugging question then.

My advice then would be to git clone the repo, see if you get the same error from this repo (and if you do, let me know!), and if you don't get the same error, try to find out what step you missed that this repo has that you don't.

Thank you, Patrick. I was able to troubleshoot it, there were few issues with my testscripts.