New answers tagged

0

From the Solidity documentation: Fixed point numbers are not fully supported by Solidity yet. They can be declared, but cannot be assigned to or from. The only possible fix at this point is to not use fixed point numbers.


2

Just a guess because the link seems to be dead, but maybe you're using libraries? From https://solidity.readthedocs.io/en/v0.5.11/using-the-compiler.html: If your contracts use libraries, you will notice that the bytecode contains substrings of the form __$53aea86b7d70b31448b230b20ae141a537$__. These are placeholders for the actual library addresses. The ...


0

Assuming that is a TypeScript compile error, add a file at src/typings.d.ts containing: declare var BrowserSolc: any; That just let's the compiler know that BrowserSolc is a real thing even tho it can't see it (because the TypeScript compiler does not load the scripts in tags).


1

Brownie allows you to use multiple versions of solidity within the same project. All that's required is setting the compiler version to null within your project's config file. From the documentation: If the version is set to null, Brownie looks at the version pragma of each contract and uses the latest matching compiler version that has been installed. If ...


2

I figured it out... You have to cast the uint to the same length so in this case it would be: bytes28 bar = bytes28(uint224(foo)); If it were bytes16 it would be: bytes16 bar = bytes28(uint128(foo)); bytes vs bits: 28 / 32 == 224 / 256 16 / 32 == 128 / 256


Top 50 recent answers are included