1

This is how your contract should look like if you want to cover 0.6.x standard. However you should never fully trust any solitions here and always double check the logic you copy from here and make sure everything is working as it should be. pragma solidity ^0.6.0; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ ...


1

nested hell Yup. This is circular: struct B { B[] as; } B contains arrays of B? The dynamic array of a struct inside a struct pushes the limits of what the compiler can handle. You would have to construct a memory instance of the struct and use the push method, which isn't present and then copy the works into storage. As a general suggestion, ...


1

The code below compiles with ^0.5.16. There were a few updates needed. 1 - constant is no longer used. You need to use either view or pure more info here I made all view because they read the state. 2 - I needed to set the visibility for each of the functions. I made all public. More options here 3 - payIn is a function that sends money to the contract, ...


Only top voted, non community-wiki answers of a minimum length are eligible