Skip to content

Commit

Permalink
[R4R]: new implement of BEP-127 (bnb-chain#3)
Browse files Browse the repository at this point in the history
* feat: new implement of bep-127 and test

* fix: review comments

* fix: add re-init for validatorExtraSet

* fix: template file sync

* fix: validatorExtraSet should init at the same time as `maxNumOfMaintaining` init

* modify config

* fix: maintainInfo leak at next 24-hours

* chores: add comment

* fix: `isCurrentValidator` error before `validatorExtraSet` init

* chore

* test: add test case for BSCValidatorSet

* test: add view test case for BSCValidatorSet

* chore: modify comments

* fix: numOfMaintaining modification on edge case

* fix: review comments

* test: add code size log

* chore: optimize new ValidatorExtra

* fix: numOfMaintaining edge case

* fix: add exitMaintenance event

* fix: add exitMaintenance event

* chore

* fix: remove unused code

* chore
  • Loading branch information
gothery001 authored Feb 25, 2022
1 parent ce622fe commit 1dd4ce1
Show file tree
Hide file tree
Showing 16 changed files with 12,366 additions and 131 deletions.
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,13 @@ build/
pids
logs
.idea/
contracts/flattened/*.sol
contracts/flattened/*.sol

#Hardhat files
cache
artifacts

.env

types
typechain-types
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
artifacts
cache
node_modules
16 changes: 16 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"printWidth": 100,
"trailingComma": "es5",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"overrides": [
{
"files": "*.sol",
"options": {
"semi": true,
"printWidth": 100
}
}
]
}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ truffle migrate
truffle test
```

Run hardhat test:
```shell script
npx hardhat compile
npx hardhat test
```

Flatten all system contracts:
```shell script
npm run flatten
Expand Down
Loading

0 comments on commit 1dd4ce1

Please sign in to comment.