Skip to content
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

feat: code clean up #601

Merged
merged 2 commits into from
Oct 9, 2024
Merged

feat: code clean up #601

merged 2 commits into from
Oct 9, 2024

Conversation

cosinlink
Copy link
Collaborator

@cosinlink cosinlink commented Oct 9, 2024

CI
{
"hardfork": "pascal",
"bsc": "bnb-chain/bsc@19e8487"
}
CI

Description

clean deprecated code and add ci to compare genesis with bytecode files from bsc repo

for deprecated contracts and functions:

  1. non-view and non-pure external functions => revert
  2. view or pure external functions => not change
  3. internal functions => removed

Example

local check without ci

export HARDFORK=pascal
export BSC_URL=https://github.com/bnb-chain/bsc/pull/2692/commits/f7ab40e46171af937a70767bb0221653d574eafe
ts-node scripts/check-bsc-hardfork-bytecode.ts

Rationale

Preventing the exploitation of deprecated code for security

Changes

Notable changes:

  1. non-view and non-pure external functions => revert
  2. view or pure external functions => not change
  3. internal functions => removed
  4. add ci check bytecode

* fix: recover withdrawUnlockedToken function

* chore: remove unused todo comment

* fix: deprecate MAX_NUM_OF_VALIDATORS and replace with maxElectedValidators

* feat: add getProtector and getValidatorUpdateTime view functions

* feat: sync genesis.json
@cosinlink cosinlink added this pull request to the merge queue Oct 9, 2024
Merged via the queue into master with commit d156409 Oct 9, 2024
7 checks passed
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.

3 participants