You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
508 B
18 lines
508 B
const fs = require('fs');
|
|
const { task } = require('hardhat/config');
|
|
const { TASK_COMPILE_GET_REMAPPINGS } = require('hardhat/builtin-tasks/task-names');
|
|
|
|
task(TASK_COMPILE_GET_REMAPPINGS).setAction((taskArgs, env, runSuper) =>
|
|
runSuper().then(remappings =>
|
|
Object.assign(
|
|
remappings,
|
|
Object.fromEntries(
|
|
fs
|
|
.readFileSync('remappings.txt', 'utf-8')
|
|
.split('\n')
|
|
.filter(Boolean)
|
|
.map(line => line.trim().split('=')),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
|