Commit 3c3aa6b1 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

deploy portability (#36)

* deploy: remove dependency on tsc

* deploy: fix typo

* deployer: fix typo
parent dc1247ae
#!/usr/bin/env -S node --require ts-node/register #!/usr/bin/env node
const contracts = require('../src/index.ts'); const contracts = require('../build/src/contract-deployment/deploy');
const { providers, Wallet } = require('ethers'); const { providers, Wallet } = require('ethers');
const { JsonRpcProvider } = providers; const { JsonRpcProvider } = providers;
...@@ -59,7 +59,7 @@ const FORCE_INCLUSION_PERIOD_SECONDS = env.FORCE_INCLUSION_PERIOD_SECONDS || (30 ...@@ -59,7 +59,7 @@ const FORCE_INCLUSION_PERIOD_SECONDS = env.FORCE_INCLUSION_PERIOD_SECONDS || (30
const out = {}; const out = {};
for (const [name, contract] of Object.entries(result.contracts)) { for (const [name, contract] of Object.entries(result.contracts)) {
out[name] = (contract as any).address; out[name] = contract.address;
} }
console.log(JSON.stringify(out, null, 2)); console.log(JSON.stringify(out, null, 2));
})().catch(err => { })().catch(err => {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
"lint:fix": "yarn run lint:fix:typescript", "lint:fix": "yarn run lint:fix:typescript",
"lint:fix:typescript": "prettier --config prettier-config.json --write \"buidler.config.ts\" \"{src,test}/**/*.ts\"", "lint:fix:typescript": "prettier --config prettier-config.json --write \"buidler.config.ts\" \"{src,test}/**/*.ts\"",
"clean": "rm -rf ./artifacts ./build ./cache", "clean": "rm -rf ./artifacts ./build ./cache",
"deploy": "./bin/deploy.ts" "deploy": "./bin/deploy.js"
}, },
"dependencies": { "dependencies": {
"ethers": "5.0.0" "ethers": "5.0.0"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment