Skip to content

Conversation

@cosinlink
Copy link
Contributor

@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 enabled auto-merge October 9, 2024 10:50
@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
4 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.

4 participants