Migrate to Hardhat (#2397)
This commit is contained in:
committed by
GitHub
parent
0c27ecc536
commit
f06738828b
@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
if [ "$SOLC_NIGHTLY" = true ]; then
|
||||
docker pull ethereum/solc:nightly
|
||||
fi
|
||||
|
||||
export OPENZEPPELIN_NON_INTERACTIVE=true
|
||||
|
||||
npx oz compile
|
||||
@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const { execSync } = require('child_process');
|
||||
const { runCoverage } = require('@openzeppelin/test-environment');
|
||||
|
||||
async function main () {
|
||||
await runCoverage(
|
||||
['mocks'],
|
||||
'npm run compile',
|
||||
'./node_modules/.bin/mocha --exit --timeout 10000 --recursive'.split(' '),
|
||||
);
|
||||
|
||||
if (process.env.CI) {
|
||||
execSync('curl -s https://codecov.io/bash | bash -s -- -C "$CIRCLE_SHA1"', { stdio: 'inherit' });
|
||||
}
|
||||
}
|
||||
|
||||
main().catch(e => {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
});
|
||||
9
scripts/coverage.sh
Executable file
9
scripts/coverage.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
buidler coverage
|
||||
|
||||
if [ -n "$CI" ]; then
|
||||
curl -s https://codecov.io/bash | bash -s -- -C "$CIRCLE_SHA1"
|
||||
fi
|
||||
10
scripts/prepack.sh
Executable file
10
scripts/prepack.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# cross platform `mkdir -p`
|
||||
node -e 'fs.mkdirSync("build/contracts", { recursive: true })'
|
||||
|
||||
cp artifacts/*.json build/contracts
|
||||
|
||||
node scripts/remove-ignored-artifacts.js
|
||||
0
scripts/prepare-contracts-package.sh
Normal file → Executable file
0
scripts/prepare-contracts-package.sh
Normal file → Executable file
@ -23,20 +23,19 @@ const ignorePatternsSubtrees = ignorePatterns
|
||||
.concat(ignorePatterns.map(pat => path.join(pat, '**/*')))
|
||||
.map(p => p.replace(/^\//, ''));
|
||||
|
||||
const solcOutput = readJSON('cache/solc-output.json');
|
||||
|
||||
const artifactsDir = 'build/contracts';
|
||||
|
||||
let n = 0;
|
||||
|
||||
for (const artifact of fs.readdirSync(artifactsDir)) {
|
||||
const fullArtifactPath = path.join(artifactsDir, artifact);
|
||||
const { sourcePath: fullSourcePath } = readJSON(fullArtifactPath);
|
||||
const sourcePath = path.relative('.', fullSourcePath);
|
||||
|
||||
for (const sourcePath in solcOutput.contracts) {
|
||||
const ignore = match.any(sourcePath, ignorePatternsSubtrees);
|
||||
|
||||
if (ignore) {
|
||||
fs.unlinkSync(fullArtifactPath);
|
||||
n += 1;
|
||||
for (const contract in solcOutput.contracts[sourcePath]) {
|
||||
fs.unlinkSync(path.join(artifactsDir, contract + '.json'));
|
||||
n += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user