Create a time Vault which we can break with number overflow!
Start running Ganache. From within the project run
truffle console development// coonect to Ganache blockchain testnet- truffle(development)>
compile// compile code - truffle(development)>
migrate// migrate contract to chain - truffle(development)>
let instance = await TimeVault.deployed()// get contract instance - truffle(development)>
inst.deposit({from: accounts[0], value: 3000000000000000000})// deposit 3 Eth - truffle(development)>
inst.withdraw({from: accounts[0]})// will fail with error from contract due to timelock limit - node test/get_storage.js // read mapping from storage
- TODO we have to break contract and get back our Eth
Notes on Rnkeby deployment
let instance = await TimeVault.deployed() instance.address web3.eth.getStorageAt(instance.address, 0) // owner address instance.deposit({from:accounts[0], value:100000000000000000}) instance.getBalance().then((value) => console.log(web3.utils.fromWei(value, "ether")))