Skip to content

Commit

Permalink
Update audit report and readme (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmeissner authored Mar 15, 2021
1 parent 7a5244d commit 92ca91f
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,16 @@ The contracts have been developed with [Solidity 0.8.0](https://github.com/ether

- `yarn build`
- `yarn hardhat --network rinkeby setup --dao <safe_address> --oracle <realitio_address> --cooldown 60 --timeout 30`
- `yarn hardhat --network rinkeby verify-etherscan --module <module_address> --dao <safe_address> --oracle <realitio_address> --cooldown 60 --timeout 30`
- Enable module (e.g. with transaction builder and abi from `0x34CfAC646f301356fAa8B21e94227e3583Fe3F5F`)
- `yarn hardhat --network rinkeby addProposal --module <module_address> --proposal-file sample_proposal.json`
- Resolve oracle (e.g. answer question on Rinkeby https://reality.eth.link/app/)
- `yarn hardhat --network rinkeby executeProposal --module <module_address> --question <question_id_from_realitio> --proposal-file sample_proposal.json`
- `yarn hardhat --network rinkeby executeProposal --module <module_address> --proposal-file sample_proposal.json`

### Audits

An audit has been performed by the [G0 group](https://github.com/g0-group).

All issues and notes of the audit have been addressed in commit [4780fbdb78dd0f837f8d3f0b252e83ee11792c87](https://github.com/gnosis/dao-module/commit/4780fbdb78dd0f837f8d3f0b252e83ee11792c87).
All issues and notes of the audit have been addressed in commit [7a5244d0a0a70b023d23af59659e0c055be7cca2](https://github.com/gnosis/dao-module/commit/7a5244d0a0a70b023d23af59659e0c055be7cca2).

The audit results are available as a pdf in [this repo](./docs/GnosisDaoRealitioModuleMar2021.pdf) or on the [g0-group repo](https://github.com/g0-group/Audits/blob/e53a1fcd8dbaa3ab9d49cd8a840e68c2951aca6c/GnosisDaoRealitioModuleMar2021.pdf).
The audit results are available as a pdf in [this repo](./docs/GnosisDaoRealitioModuleMar2021.pdf) or on the [g0-group repo](https://github.com/g0-group/Audits/blob/4e172e8b44012c6bf2346e9925df5e0f27a40d7a/GnosisDaoRealitioModuleMar2021.pdf).
Binary file modified docs/GnosisDaoRealitioModuleMar2021.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const argv = yargs

// Load environment variables.
dotenv.config();
const { INFURA_KEY, MNEMONIC, MY_ETHERSCAN_API_KEY, PK } = process.env;
const { INFURA_KEY, MNEMONIC, ETHERSCAN_API_KEY, PK } = process.env;

import "./src/tasks/setup";
import "./src/tasks/proposals";
Expand Down Expand Up @@ -73,6 +73,6 @@ export default {
timeout: 2000000,
},
etherscan: {
apiKey: MY_ETHERSCAN_API_KEY,
apiKey: ETHERSCAN_API_KEY,
},
};
24 changes: 24 additions & 0 deletions src/tasks/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,30 @@ task("setup", "Provides the clearing price to an auction")
console.log("Module deployed to:", module.address);
});

task("verify-etherscan", "Verifies the contract on etherscan")
.addParam("module", "Address of the module", undefined, types.string)
.addParam("dao", "Address of the DAO (e.g. Safe)", undefined, types.string)
.addParam("oracle", "Address of the oracle (e.g. Realitio)", undefined, types.string)
.addParam("timeout", "Timeout in seconds that should be required for the oracle", 48 * 3600, types.int, true)
.addParam("cooldown", "Cooldown in seconds that should be required after a oracle provided answer", 24 * 3600, types.int, true)
.addParam("expiration", "Time duration in seconds for which a positive answer is valid. After this time the answer is expired", 7 * 24 * 3600, types.int, true)
.addParam("bond", "Minimum bond that is required for an answer to be accepted", "0", types.string, true)
.addParam(
"template",
"Template that should be used for proposal questions (See https://github.com/realitio/realitio-dapp#structuring-and-fetching-information)",
"0x000000000000000000000000000000000000000000000000000000000000002d",
types.string,
true
)
.setAction(async (taskArgs, hardhatRuntime) => {
await hardhatRuntime.run("verify", {
address: taskArgs.module,
constructorArgsParams: [
taskArgs.dao, taskArgs.oracle, `${taskArgs.timeout}`, `${taskArgs.cooldown}`, `${taskArgs.expiration}`, `${taskArgs.bond}`, taskArgs.template
]
})
});

task("createDaoTemplate", "Creates a question template on the oracle address")
.addParam("oracle", "Address of the oracle (e.g. Realitio)", undefined, types.string)
.addParam(
Expand Down

0 comments on commit 92ca91f

Please sign in to comment.