Skip to content

Commit

Permalink
report: gas-report for OZ governance DAO
Browse files Browse the repository at this point in the history
  • Loading branch information
DuBento committed Jul 19, 2023
1 parent 0de8bc8 commit 4607e5f
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 2 deletions.
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,68 @@

- hardhat gas-reporter: run test `npx hardhat test`

*For DAO with Openzeppelin Governance Release [v0.2-dev](github.com/DuBento/Thesis/releases/tag/v0.2-dev)*

```
·-------------------------------------------------------|----------------------------|-------------|-----------------------------·
| Solc version: 0.8.19 · Optimizer enabled: false · Runs: 200 · Block limit: 30000000 gas │
························································|····························|·············|······························
| Methods · 21 gwei/gas · 1700.51 eur/eth │
·······················|································|··············|·············|·············|···············|··············
| Contract · Method · Min · Max · Avg · # calls · eur (avg) │
·······················|································|··············|·············|·············|···············|··············
| GovernorContract · castVoteWithReason · 68296 · 91652 · 88961 · 18 · 3.18 │
·······················|································|··············|·············|·············|···············|··············
| GovernorContract · execute · 133407 · 363629 · 298326 · 14 · 10.65 │
·······················|································|··············|·············|·············|···············|··············
| GovernorContract · propose · 107346 · 115333 · 111769 · 22 · 3.99 │
·······················|································|··············|·············|·············|···············|··············
| GovernorContract · queue · 140058 · 145971 · 143551 · 14 · 5.13 │
·······················|································|··············|·············|·············|···············|··············
| GovernorTimelock · grantRole · 29535 · 52073 · 40804 · 4 · 1.46 │
·······················|································|··············|·············|·············|···············|··············
| GovernorTimelock · revokeRole · - · - · 27746 · 2 · 0.99 │
·······················|································|··············|·············|·············|···············|··············
| GovernorToken · delegate · - · - · 96883 · 2 · 3.46 │
·······················|································|··············|·············|·············|···············|··············
| GovernorToken · transferOwnership · - · - · 32992 · 2 · 1.18 │
·······················|································|··············|·············|·············|···············|··············
| Supplychain · handleTransaction · - · - · 149951 · 1 · 5.35 │
·······················|································|··············|·············|·············|···············|··············
| Supplychain · handleUpdate · - · - · 133635 · 1 · 4.77 │
·······················|································|··············|·············|·············|···············|··············
| Supplychain · newBatch · 198679 · 200874 · 200508 · 12 · 7.16 │
·······················|································|··············|·············|·············|···············|··············
| SupplychainFactory · create · - · - · 155491 · 1 · 5.55 │
·······················|································|··············|·············|·············|···············|··············
| SupplychainFactory · transferOwnership · - · - · 32967 · 2 · 1.18 │
·······················|································|··············|·············|·············|···············|··············
| UserRegistry · addActor · - · - · 93851 · 6 · 3.35 │
·······················|································|··············|·············|·············|···············|··············
| UserRegistry · addContractToActor · 52141 · 73709 · 67611 · 5 · 2.41 │
·······················|································|··············|·············|·············|···············|··············
| UserRegistry · addMember · - · - · 118547 · 1 · 4.23 │
·······················|································|··············|·············|·············|···············|··············
| UserRegistry · setGovernorTokenAddress · - · - · 51988 · 1 · 1.86 │
·······················|································|··············|·············|·············|···············|··············
| UserRegistry · setSupplychainFactoryAddress · - · - · 52078 · 2 · 1.86 │
·······················|································|··············|·············|·············|···············|··············
| UserRegistry · transferOwnership · - · - · 33011 · 2 · 1.18 │
·······················|································|··············|·············|·············|···············|··············
| Deployments · · % of limit · │
························································|··············|·············|·············|···············|··············
| GovernorContract · - · - · 6696768 · 22.3 % · 239.15 │
························································|··············|·············|·············|···············|··············
| GovernorTimelock · - · - · 2495126 · 8.3 % · 89.10 │
························································|··············|·············|·············|···············|··············
| GovernorToken · - · - · 3975660 · 13.3 % · 141.97 │
························································|··············|·············|·············|···············|··············
| SupplychainFactory · - · - · 2621785 · 8.7 % · 93.63 │
························································|··············|·············|·············|···············|··············
| UserRegistry · - · - · 2310005 · 7.7 % · 82.49 │
·-------------------------------------------------------|--------------|-------------|-------------|---------------|-------------·
```

---

## Resources
Expand Down
3 changes: 1 addition & 2 deletions blockchain/test/GovernorTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ import {
PROPOSAL_VOTE_DESCRIPTION,
} from "./TestConfig";

console.log = () => {};

// console.log = () => {};
describe("Governor", function () {
let governorContract: GovernorContract;
let governorToken: GovernorToken;
Expand Down

0 comments on commit 4607e5f

Please sign in to comment.