-
Notifications
You must be signed in to change notification settings - Fork 36
DAOTracker Support #380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
DAOTracker Support #380
Changes from 36 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
1518830
init
dOrgJelli 4324736
testing next
dOrgJelli 3ab8fbe
tests
dOrgJelli 6f8a3ca
remove brainstorming doc
dOrgJelli c1f2855
fix
dOrgJelli 0748136
fix
dOrgJelli 26bb9e5
fix
dOrgJelli 01c335b
fixes
dOrgJelli b27bde5
fix
dOrgJelli 1a14687
:face_palm:
dOrgJelli c655571
fix
dOrgJelli a3635e1
fix
dOrgJelli 7dc18a2
timeout
dOrgJelli 1da76e8
found it
dOrgJelli 7703a4a
fix
dOrgJelli a3acb0b
checking correct things
dOrgJelli 8771ada
see if dao tracker is even a thing
dOrgJelli 35c62d8
fix datasource.yaml
dOrgJelli 730907b
.toLowerCase()
dOrgJelli 0b826d5
fix
dOrgJelli 21c7d3b
fix
dOrgJelli ab7135a
wait longer?
dOrgJelli 9bed19a
feedback changes
dOrgJelli 1fc11a8
updates based on feedback
dOrgJelli 7614966
fixes
dOrgJelli 2e8621a
change to 31 so tests pass
dOrgJelli b2d371b
fixed
dOrgJelli 4e05317
fix lint
dOrgJelli 85656bb
Merge branch 'master' into new-dao-indexing
dOrgJelli 590c9d3
merge master
dOrgJelli 3350d4c
new DAOtracker
dOrgJelli 336a558
revert
dOrgJelli 918ad72
fix?
dOrgJelli 25cbf81
fix
dOrgJelli b43c982
ci pls work
dOrgJelli ea63c15
maybe this?
dOrgJelli 98a82f9
DaoCreator only
dOrgJelli 8599ecc
Hardcoded Blacklist
dOrgJelli 5cb7cdf
revert
dOrgJelli 6ef7316
fix lint
dOrgJelli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"templates": [ | ||
{ | ||
"name": "Avatar", | ||
"mapping": "Avatar", | ||
"start_arcVersion": "0.0.1-rc.16" | ||
}, | ||
{ | ||
"name": "Controller", | ||
"mapping": "Controller", | ||
"start_arcVersion": "0.0.1-rc.16" | ||
}, | ||
{ | ||
"name": "DAOToken", | ||
"mapping": "DAOToken", | ||
"start_arcVersion": "0.0.1-rc.16" | ||
}, | ||
{ | ||
"name": "Reputation", | ||
"mapping": "Reputation", | ||
"start_arcVersion": "0.0.1-rc.16" | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const fs = require("fs"); | ||
|
||
function versionToNum(version) { | ||
const strlen = version.length; | ||
return Number(version.slice(strlen - 2, strlen)); | ||
} | ||
|
||
function forEachTemplate(callback) { | ||
const templates = require("./templates.json").templates; | ||
const abiDirectories = fs.readdirSync(`${__dirname}/../abis`, { withFileTypes: true }) | ||
.filter(dirent => dirent.isDirectory()) | ||
.map(dirent => dirent.name); | ||
|
||
for (var template of templates) { | ||
const { name, mapping, start_arcVersion, end_arcVersion } = template; | ||
const startNum = versionToNum(start_arcVersion); | ||
const endNum = end_arcVersion ? versionToNum(end_arcVersion) : undefined; | ||
|
||
// for each ABI directory, if it falls within start & end | ||
for (var abiDirectory of abiDirectories) { | ||
const arcVersion = abiDirectory; | ||
const arcNum = versionToNum(arcVersion); | ||
|
||
if (arcNum >= startNum && (endNum === undefined || arcNum <= endNum)) { | ||
callback(name, mapping, arcVersion); | ||
} | ||
} | ||
} | ||
} | ||
|
||
module.exports = { | ||
versionToNum, | ||
forEachTemplate | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
abis: | ||
- DAOTracker | ||
entities: | ||
- DAOTrackerContract | ||
- BlacklistedDAO | ||
- ResetDAO | ||
eventHandlers: | ||
- event: TrackDAO(indexed address,address,address,address,address,string) | ||
handler: handleTrackDAO | ||
- event: BlacklistDAO(indexed address,string) | ||
handler: handleBlacklistDAO | ||
- event: ResetDAO(indexed address,string) | ||
handler: handleResetDAO |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.