Skip to content

Commit

Permalink
Sokol + xDAI (#559)
Browse files Browse the repository at this point in the history
* Sokol

* Add xdai
  • Loading branch information
ben-kaufman authored May 19, 2020
1 parent 3327277 commit 98e0da3
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ services:
environment:
POSTGRES_PASSWORD: letmein
ganache:
image: 'daostack/migration-experimental:0.1.1-rc.20-v0'
image: 'daostack/migration-experimental:0.1.1-rc.20-v2'
ports:
- '8545:8545'
5 changes: 4 additions & 1 deletion ops/generate-contractsinfo.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
const fs = require("fs");
const { migrationFileLocation: defaultMigrationFileLocation, network } = require("./settings");
let { migrationFileLocation: defaultMigrationFileLocation, network } = require("./settings");
if (network === "poa-sokol") {
network = "sokol"
}
const { forEachTemplate } = require("./utils");
const path = require("path");
const currentDir = path.resolve(`${__dirname}`);
Expand Down
7 changes: 5 additions & 2 deletions ops/generate-subgraph.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
const fs = require("fs");
const path = require("path")
const yaml = require("js-yaml");
const { migrationFileLocation: defaultMigrationFileLocation,
let { migrationFileLocation: defaultMigrationFileLocation,
network ,startBlock} = require("./settings");
if (network === "poa-sokol") {
network = "sokol"
}
const { forEachTemplate } = require("./utils");
const mappings = require("./mappings.json")[network].mappings;
const { subgraphLocation: defaultSubgraphLocation } = require('./graph-cli')
Expand Down Expand Up @@ -127,7 +130,7 @@ function combineFragments(fragments, isTemplate, addresses, missingAddresses) {
var result = {
kind: 'ethereum/contract',
name: `${name}`,
network: `${network}`,
network: `${network === "sokol" ? "poa-sokol" : network}`,
source,
mapping: {
kind: "ethereum/events",
Expand Down
126 changes: 124 additions & 2 deletions ops/mappings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"private":
{
"private": {
"mappings": [
{
"name": "DAOToken",
Expand Down Expand Up @@ -370,5 +369,128 @@
"arcVersion": "0.1.1-rc.20"
}
]
},
"sokol": {
"mappings": [
{
"name": "DAOToken",
"contractName": "DAOToken",
"dao": "package",
"mapping": "DAOToken",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "Reputation",
"contractName": "Reputation",
"dao": "package",
"mapping": "Reputation",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "Avatar",
"contractName": "Avatar",
"dao": "package",
"mapping": "Avatar",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "Vault",
"contractName": "Vault",
"dao": "package",
"mapping": "Vault",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "Controller",
"contractName": "Controller",
"dao": "package",
"mapping": "Controller",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "GenesisProtocol",
"contractName": "GenesisProtocol",
"dao": "package",
"mapping": "GenesisProtocol",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "DAORegistry",
"contractName": "DAORegistryInstance",
"dao": "package",
"mapping": "DAORegistry",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "DAOFactory",
"contractName": "DAOFactoryInstance",
"dao": "package",
"mapping": "DAOFactory",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "ContributionReward",
"contractName": "ContributionReward",
"dao": "package",
"mapping": "ContributionReward",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "ContributionRewardExt",
"contractName": "ContributionRewardExt",
"dao": "package",
"mapping": "ContributionRewardExt",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "Competition",
"contractName": "Competition",
"dao": "package",
"mapping": "Competition",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "SchemeFactory",
"contractName": "SchemeFactory",
"dao": "package",
"mapping": "SchemeFactory",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "SchemeRegistrar",
"contractName": "SchemeRegistrar",
"dao": "package",
"mapping": "SchemeRegistrar",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "GenericScheme",
"contractName": "GenericScheme",
"dao": "package",
"mapping": "GenericScheme",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "UpgradeScheme",
"contractName": "UpgradeScheme",
"dao": "package",
"mapping": "UpgradeScheme",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "JoinAndQuit",
"contractName": "JoinAndQuit",
"dao": "package",
"mapping": "JoinAndQuit",
"arcVersion": "0.1.1-rc.20"
},
{
"name": "FundingRequest",
"contractName": "FundingRequest",
"dao": "package",
"mapping": "FundingRequest",
"arcVersion": "0.1.1-rc.20"
}
]
}
}
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@daostack/subgraph-experimental",
"version": "0.1.1-rc.8-v0",
"version": "0.1.1-rc.8-v1",
"author": "DAOstack (https://www.daostack.io)",
"license": "GPL-3.0",
"description": "A caching layer for daostack using The Graph",
Expand Down Expand Up @@ -32,7 +32,7 @@
"test:watch": "npm run test -- --watch"
},
"devDependencies": {
"@daostack/migration-experimental": "0.1.1-rc.20-v0",
"@daostack/migration-experimental": "0.1.1-rc.20-v2",
"@types/jest": "^23.3.7",
"@types/mocha": "^5.2.5",
"babel-eslint": "^10.0.1",
Expand Down

0 comments on commit 98e0da3

Please sign in to comment.