Making contract compatible with newer solidity compiler

I have a simple timelock contract however it doesn’t work with modern solidity compilers, Could anyone make my contract compatible with solidity newer than 0.5.16? Thanks. Here is the code, it only works with solidity version 0.3.5 contract timeLock { struct accountData { uint balance; uint releaseTime; } mapping (address => accountData) accounts; function payIn(uint…

How to call solidity function from javascript file? Keep getting error deploying through truffle and webpack

Error -> TypeError: fetch.amount is not a function [WDS] Disconnected! Please explain or provide code on how to call solidity function Trying to call from ready() function console.log(contract.abi) This line gave me (11) […] 0: Object { constant: true, name: “amount”, payable: false, … } (11) […] ​ 0: Object { constant: true, name: “amount”,…

Clone factory and constructor arguments

In my project I’m using a Clone Factory: https://github.com/optionality/clone-factory/tree/master/contracts function createClone(address target) external returns (address result) { bytes20 targetBytes = bytes20(target); assembly { let clone := mload(0x40) mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(clone, 0x14), targetBytes) mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) result := create(0, clone, 0x37) } addr = result; } It works for contracts without constructor or contracts with empty…

Ethereum Miners and Gas – Analyzing Chain Data

Currently looking at https://medium.com/google-cloud/how-to-query-balances-for-all-ethereum-addresses-in-bigquery-fb594e4034a7 and in the SQL Query to calculate address balances there is a part for tranasction feed debits miners incur? How does that work? Miners are spending gas to mine? — transaction fees debits select miner as address, sum(cast(receipt_gas_used as numeric) * cast(gas_price as numeric)) as value from `bigquery-public-data.crypto_ethereum.transactions` as transactions join…