Skip to content

Commit 889d75c

Browse files
authored
Unset useLiteralContent in buidler compilation settings (sc-forks#512)
1 parent 1b8b730 commit 889d75c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

plugins/buidler.plugin.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const { ensurePluginLoadedWithUsePlugin } = require("@nomiclabs/buidler/plugins"
1515
const {
1616
TASK_TEST,
1717
TASK_COMPILE,
18+
TASK_COMPILE_GET_COMPILER_INPUT
1819
} = require("@nomiclabs/buidler/builtin-tasks/task-names");
1920

2021
ensurePluginLoadedWithUsePlugin();
@@ -24,6 +25,13 @@ function plugin() {
2425
// UI for the task flags...
2526
const ui = new PluginUI();
2627

28+
// Unset useLiteralContent due to solc metadata size restriction
29+
task(TASK_COMPILE_GET_COMPILER_INPUT).setAction(async (_, __, runSuper) => {
30+
const input = await runSuper();
31+
input.settings.metadata.useLiteralContent = false;
32+
return input;
33+
})
34+
2735
task("coverage", "Generates a code coverage report for tests")
2836

2937
.addOptionalParam("testfiles", ui.flags.file, "", types.string)

0 commit comments

Comments
 (0)