Skip to content

Commit

Permalink
Merge pull request #503 from dOrgTech/dev
Browse files Browse the repository at this point in the history
xdai support
  • Loading branch information
cbrzn authored Jun 2, 2020
2 parents ac657d8 + 6ef7285 commit 09db2fd
Show file tree
Hide file tree
Showing 176 changed files with 1,484 additions and 29,592 deletions.
4 changes: 2 additions & 2 deletions packages/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dorgtech/daocreator-lib",
"version": "1.0.1",
"version": "1.0.2",
"main": "dist/index.js",
"license": "MIT",
"scripts": {
Expand All @@ -18,7 +18,7 @@
"jsonschema": "^1.2.5"
},
"devDependencies": {
"@daostack/migration": "0.0.1-rc.36-v5",
"@daostack/migration": "0.0.1-rc.41-v7",
"@types/bn.js": "^4.11.5",
"@types/node": "^10.12.18",
"@types/web3": "1.0.19",
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/scripts/prepArc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function copyMigrationScript() {
"utils.js",
"sanitize.js",
"migration.json",
"contracts-optimized/0.0.1-rc.33"
"contracts-optimized/0.0.1-rc.41"
];
const baseDir = path.dirname(require.resolve("@daostack/migration"));
const destDir = path.join(__dirname, "../src/dependency/arc/src");
Expand Down
12 changes: 10 additions & 2 deletions packages/lib/src/dependency/arc/migration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ export const migrateDAO = async (
try {
const web3 = await getWeb3();
const opts = await getDefaultOpts();
const network = await getNetworkName();
let network = await getNetworkName();

if (network === 'private') {
if (await web3.eth.net.getId() === 100) {
network = 'xdai'
} else if (await web3.eth.net.getId() === 77) {
network = 'sokol'
}
}

const logTx = async ({ transactionHash, gasUsed }: any, msg: string) => {
const tx = await web3.eth.getTransaction(transactionHash);
Expand Down Expand Up @@ -65,7 +73,7 @@ export const migrateDAO = async (
return { receipt, result };
};

const arcVersion = "0.0.1-rc.33";
const arcVersion = "0.0.1-rc.41";
const getArcVersionNumber = (ver: string) => Number(ver.slice(-2));

// If the user doesn't have a supported network chosen, abort
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 09db2fd

Please sign in to comment.