{"id":19096868,"url":"https://github.com/makerdao/dss-ward","last_synced_at":"2025-04-18T16:31:29.324Z","repository":{"id":150487200,"uuid":"342026873","full_name":"makerdao/dss-ward","owner":"makerdao","description":"Show authorizations of DSS contracts","archived":true,"fork":false,"pushed_at":"2021-05-15T03:12:34.000Z","size":379,"stargazers_count":7,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-11T20:37:41.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/makerdao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-24T20:28:46.000Z","updated_at":"2024-11-03T14:38:17.000Z","dependencies_parsed_at":"2023-05-02T07:10:29.780Z","dependency_job_id":null,"html_url":"https://github.com/makerdao/dss-ward","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerdao%2Fdss-ward","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerdao%2Fdss-ward/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerdao%2Fdss-ward/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makerdao%2Fdss-ward/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/makerdao","download_url":"https://codeload.github.com/makerdao/dss-ward/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249517937,"owners_count":21284861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T03:38:03.011Z","updated_at":"2025-04-18T16:31:29.318Z","avatar_url":"https://github.com/makerdao.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dss-ward\n\nShow authorizations of DSS contracts.\n\n![Screenshot from 2021-04-22 10-05-02](https://user-images.githubusercontent.com/16065447/115738016-45492780-a352-11eb-82cd-5bdfc2f483f4.png)\n\nThis script checks:\n\n* owner\n* authority\n* wards: deployer, logNote relies and event-emitting relies\n* buds: logNote kisses and event-emitting kisses\n\nIt can be used to check the authorities over a single contract by specifying its\nchainlog name or address, or it can also be used to check all the authorities in\nthe system by starting from the Vat and hierarchically finding all the addresses\nthat have authority over it.\n\nIts outputs are a `tree`-style authorization hierarchy, and an interactive d3.js\ngraph.\n\n## install\n\n```\ngit clone git@github.com:makerdao/dss-ward.git\ncd dss-ward\n./install.sh\n```\n\n## run\n\nFirst, source your ethereum environment in order to have the `ETH_RPC_URL` and\n`ETHERSCAN_API_KEY` environment variables.\n\n### get authorities over a single contract\n\nThis is the simplest and fastest way this script can be used. It obtains all\nthe addresses that have a certain authority over a contract you specify. Note,\nhowever, that this will not obtain the authorities that this specific contract\nhas over other contracts in the system. In order to obtain these, check\n[get permissions of a contract](https://github.com/makerdao/dss-ward#get-permissions-of-a-contract)\n\nIn order to get the authorities over a specific contract, run\n\n```\nnode src/ward.js MCD_SPOT\n```\n\nThis will work with any contract that's in the chainlog. Otherwise, you can run\n\n```\nnode src/ward.js 0xDa0FaB05039809e63C5D068c897c3e602fA97457\n```\n\nin order to get the authorities over an arbitrary address.\n\n### run checks for the VAT\n\nIn order to check the authorities in the VAT, run\n\n```\nnode src/ward.js MCD_VAT\n```\n\nThis will take a while. At the end, it will output all the  addresses that have\ndirect or indirect authority over the Vat, ordered hierarchically.\n\n### run checks for oracles\n\nIn order to get the authorities over the oracles, run\n\n```\nnode src/ward.js --mode oracles\n```\n\nThis will get all the `PIP`s in the chainlog, as well as their medianizers\n(either `orb`s or `src`) and get the authorities over each one of them.\n\n### run checks for the whole system\n\n```\nnode src/ward.js --mode full\n```\n\nThis command will run checks for the vat, the oracles, and any remaining\naddresses in the chainlog. Its result can be visualized as a graph. See\n[graph visualization](https://github.com/makerdao/dss-ward#graph-visualization).\n\n### get permissions of a contract\n\nThe permissions of a contract are all the contracts where it is an\nauthority. In other words, getting the permissions of a contract is the reverse\noperation from getting its authorities.\n\n```\nnode src/ward.js --mode permissions MCD_SPOT\n```\n\n### graph visualization\n\n![dss-graph](https://user-images.githubusercontent.com/16065447/115738639-d7513000-a352-11eb-8cff-507021629945.gif)\n\nIn order to visualize the whole system as a graph, first run a\n[full check](https://github.com/makerdao/dss-ward#run-checks-for-the-whole-system)).\nThen run\n\n```\nnode src/server.js\n```\n\nAnd finally open `src/graph.html` in a browser.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakerdao%2Fdss-ward","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakerdao%2Fdss-ward","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakerdao%2Fdss-ward/lists"}