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

Implement bep-127 and bep-131 #131

Merged
merged 24 commits into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1dd4ce1
[R4R]: new implement of BEP-127 (#3)
gothery001 Feb 25, 2022
34f3abc
implement bep-131
dean65 Feb 24, 2022
1ffd1f4
update ut
dean65 Feb 24, 2022
c25eafc
update logic of felony function
dean65 Feb 24, 2022
bc746fd
update the getMiningValidators function
dean65 Feb 24, 2022
d53bcea
update logic of the update maxNumOfCandidates function
dean65 Feb 24, 2022
430151c
fix calculating epoch number
dean65 Feb 25, 2022
0b6fba0
update _exitMaintenance
dean65 Feb 28, 2022
c98f24c
fix comments
dean65 Mar 1, 2022
381c1f9
Merge pull request #1 from dean65/bep-131
dean65 Mar 2, 2022
fe34e57
update readme
Mar 2, 2022
d6c297a
Merge pull request #5 from Blockorus/readme_update
realuncle Mar 2, 2022
64fdcdc
fix testcase on slash and validator contract
realuncle Mar 2, 2022
ced93e4
fix update maxNumOfMaintaining
dean65 Mar 2, 2022
7404210
Merge pull request #7 from dean65/fix_update_gov
realuncle Mar 2, 2022
4d264cb
Merge pull request #6 from Blockorus/ut_fix
realuncle Mar 2, 2022
44afea9
fix: bug that validatorSet order was changed incorrectly while _felon…
Mar 10, 2022
5914847
feat: modify slots number
Mar 11, 2022
cd45f26
Merge pull request #9 from gothery001/bug-fix
realuncle Mar 11, 2022
49c6a48
chore: rename var in loop
Mar 11, 2022
18e4ced
Merge pull request #10 from gothery001/bug-fix
realuncle Mar 11, 2022
c252462
Fix audit report of BEP-127 and BEP-131 (#17)
gothery001 Apr 13, 2022
116e9fa
fix: Bug fix that incorrectly modification of fixing audit report (#18)
gothery001 Apr 13, 2022
8462f93
fix: bug that slash count calculation problem while update validator …
gothery001 Apr 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
}
]
}
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Install dependency:
npm install
```

Node: v12.18.3
Truffle: Truffle v5.1.31
Solc: 0.6.4+commit.1dca32f3.Darwin.appleclang
Ganache-cli: v6.10.1


## unit test

Generate contracts for testing:
Expand All @@ -27,7 +33,7 @@ node generate-relayerincentivizecontract.js --roundSize 30 --maximumWeight 3 --m

Start ganache:
```shell script
ganache-cli --mnemonic 'clock radar mass judge dismiss just intact mind resemble fringe diary casino' --gasLimit 13000000 -e 10000
ganache-cli --mnemonic 'clock radar mass judge dismiss just intact mind resemble fringe diary casino' --gasLimit 100000000 -e 10000 --allowUnlimitedContractSize
```

Run truffle test:
Expand All @@ -37,6 +43,12 @@ truffle migrate
truffle test
```

Run hardhat test:
```shell script
npx hardhat compile
npx hardhat test --network development
```

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