Skip to content

Commit 1b78d6e

Browse files
committed
add explanation of compiler failure
1 parent dd38cba commit 1b78d6e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

plasma_framework/contracts/src/exits/utils/BondSize.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ library BondSize {
3131
pure
3232
returns (Params memory)
3333
{
34+
// These requires would make compile to fail without optimizer on
35+
// This contract itself would be fine, the problem seems to be the caller of this function cannot be inside constructor
36+
// See this commit that solves the compiler issue:
37+
// https://github.com/omisego/plasma-contracts/commit/b1161ef823076d978b925cd4f23776915bfcc020
3438
require(initialBondSize > 0, "initialBondSize cannot be 0");
3539
require(lowerBoundDivisor > 0, "lowerBoundDivisor cannot be 0");
3640
require(upperBoundMultiplier > 0, "upperBoundMultiplier cannot be 0");

plasma_framework/truffle-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module.exports = {
6363
version: '0.5.12',
6464
settings: {
6565
optimizer: {
66-
enabled: true,
66+
enabled: false,
6767
runs: 200,
6868
},
6969
},

0 commit comments

Comments
 (0)