3

This is possible, but not advised. If you do this, you should cast the int32 to an int256 in order to be explicit. int32 a = 1; int256 b = 3; int256 c = int256(a) + b; However, using types smaller than 32 bytes may actually be more expensive than using types that are 32 bytes exactly (such as int256, uint256, etc.). The reason for this is that the EVM ...


2

Part answer... The issue is in the refund() function. This line requires the use of range() (nextContributorsIndex is an integer, not an array): for i in self.nextContributorsIndex: Should be: for i in range(self.nextContributorsIndex): Having said this, PR #1100 introduced the requirement that the input to range() should be a constant, and your ...


1

Your code doesn't make much sense. The function either returns true or throws an exception, so what exactly is the point in returning a single possible value? One could simply conclude that if the function hasn't thrown an exception then the answer is true. With regards to the actual question about using require: Revert (embedded in require) is useful ...


1

You can simplify your setup to only 2 contracts. I've taken the liberty of editing the contracts a bit to make the testing a lot easier and more specific. You can copy paste them in Remix and test yourself. contract A { B b; constructor(B _b) public { b = _b; } function() external payable { (bool success, bytes memory ...


1

No language on Ethereum is Turing complete, because the EVM isn't Turing complete. There is a maximum gas limit, which means no operation can run for unlimited time or use unlimited space. Vyper just makes that more clear than Solidity does.


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