Skip to content

Conversation

@txhsl
Copy link
Contributor

@txhsl txhsl commented May 15, 2024

Close #201, #205, #207. Done, also fixed several potential bugs of GovernanceVote.

@txhsl txhsl changed the title systemcontract: optimize gas cost of governance contract systemcontract: optimize gas cost May 17, 2024
@txhsl txhsl changed the title systemcontract: optimize gas cost systemcontract: optimize gas cost and fix GovernanceVote May 20, 2024
@txhsl txhsl requested review from chenquanyu and passer-byzhang and removed request for chenquanyu May 20, 2024 07:40
@txhsl txhsl linked an issue May 20, 2024 that may be closed by this pull request
@txhsl txhsl force-pushed the governance-gas-optimize branch from 86f4780 to 62bdbbe Compare May 20, 2024 09:39
Copy link
Collaborator

@passer-byzhang passer-byzhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like fixed except Caching Arrays Length in Loops and Increase Operation Optimization

txhsl and others added 3 commits May 21, 2024 15:34
* index some event parameters

* update solidity compiler version

* systemcontract: governance unit tests (#210)

* update gitignore

* init hardhat project

* first ut

* systemcontract: add candidate management ut and getter check (#211)

* systemcontract: use customized error library (#209)

* systemcontract: use customized error library

* update existing ut

---------

Co-authored-by: belane <[email protected]>
@txhsl txhsl requested a review from chenquanyu May 21, 2024 08:36
@txhsl
Copy link
Contributor Author

txhsl commented May 23, 2024

This well also close #207, since other unit tests has been already merged.

@txhsl txhsl linked an issue May 23, 2024 that may be closed by this pull request
@txhsl txhsl changed the title systemcontract: optimize gas cost and fix GovernanceVote systemcontract: optimize gas cost May 29, 2024
@txhsl txhsl requested a review from chenquanyu May 29, 2024 03:49
@txhsl txhsl merged commit e1942ca into bane-main May 29, 2024
@txhsl txhsl deleted the governance-gas-optimize branch May 29, 2024 07:15
txhsl added a commit that referenced this pull request May 30, 2024
* index some event parameters

* update solidity compiler version

* systemcontract: governance unit tests (#210)

* update gitignore

* init hardhat project

* first ut

* systemcontract: add candidate management ut and getter check (#211)

* systemcontract: use customized error library (#209)

* systemcontract: use customized error library

* update existing ut

* systemcontract: add policy unit tests (#214)

* systemcontract: add ut about reward distribution and fix several ut (#215)

* systemcontract: optimize gas cost (#195)

* systemcontract: optimize gas cost

---------

Co-authored-by: belane <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GVN-11 - Absence of Unit Test [Informative] GVN-09 - Reentrancy Pattern [Informative] GVN-05 - GAS Optimizations [Informative]

4 participants