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

Merge development branch to master branch #537

Merged
merged 334 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
334 commits
Select commit Hold shift + click to select a range
30365fb
StakingStakeModule mainnet deployment data
tjcloa Jun 1, 2023
cb721d8
hh config: fix externalArtifacts path
tjcloa Jun 3, 2023
d9bf6d2
add log to sips:populate
tjcloa Jun 6, 2023
2d3f544
Merge pull request #500 from DistributedCollective:SOV-2462-reverting…
tjcloa Jun 6, 2023
a5a4d6c
update of the fastbtc scripts
ororopickpocket Jun 6, 2023
3a6cc78
solved merge conflict
ororopickpocket Jun 6, 2023
3406e6e
scripts for withdrawing tokens from the funds + sip for role change
ororopickpocket Jun 6, 2023
a5775cf
Merge branch 'development' into SOV-2450-fix-view-reward-function
cwsnt Jun 7, 2023
6d1b2df
add task utils:replace-tx
tjcloa Jun 7, 2023
c342fab
fix multisig tasks scripts
tjcloa Jun 8, 2023
64e74a1
revert switching to JsonRpcProvider in hh config
tjcloa Jun 14, 2023
c750bc9
updated SIP65
ororopickpocket Jun 15, 2023
4222220
remove outdated & unused ECDSA.sol library
tjcloa Jun 15, 2023
110aa62
adding sip0065 arguments
Jun 17, 2023
b84a3a2
fixing a typo
Jun 17, 2023
3214fa2
feat: additional check in transfer function for loan token contract
cwsnt Jun 19, 2023
565ab8c
fix based on review
cwsnt Jun 21, 2023
61d2e16
lm update
ororopickpocket Jun 21, 2023
fb7f5ff
Merge pull request #502 from DistributedCollective/dev-and-adoption-f…
ororopickpocket Jun 21, 2023
ba3ed1f
add hh tasks: vestings creation and misc
tjcloa Jun 22, 2023
df9fd56
refactor hh config & sipArgs formatting
tjcloa Jun 22, 2023
4ffaea1
add external deployments .json
tjcloa Jun 22, 2023
233d9a5
fix hh config rskSovrynTestnet external deployments path
tjcloa Jun 23, 2023
0ef9c6e
add MoCVendors external deployments
tjcloa Jun 23, 2023
670f60e
add loan token modules replacement script
cwsnt Jun 23, 2023
07bf9f1
fix: deployment script
cwsnt Jun 26, 2023
5efbc7b
prettier
cwsnt Jun 26, 2023
199857d
fix deploymeent script based on comment
cwsnt Jun 26, 2023
9307dad
feat: increase feesharing withdrawal interval
cwsnt Jun 26, 2023
c1c2df6
rename hh task to createFourYearVestings
tjcloa Jun 26, 2023
00cccb5
Merge pull request #505 from DistributedCollective/lm-update-20-06
ororopickpocket Jun 27, 2023
614b924
Merge pull request #504 from DistributedCollective/feature/increase-f…
cwsnt Jun 28, 2023
5cef64a
deploymnet: feesharing colleector testnet deployment
cwsnt Jun 28, 2023
c9588b8
fix script: VestingCreationType = 0 for 3 year vestings
tjcloa Jun 28, 2023
db3f974
add Staking testnet deployment
tjcloa Jun 29, 2023
d965d49
fix hh tasks, hh config: add gasPrice to rskForkedMainnet
tjcloa Jun 29, 2023
29af417
add loan token deployment .json data
tjcloa Jul 1, 2023
883134e
enhance multisig hh tasks
tjcloa Jul 1, 2023
45c0352
add loan token functions pausing to pause_unpause.py
tjcloa Jul 1, 2023
24b7647
feature: enable slither as static analyzer
cwsnt Jul 3, 2023
48d5d29
add mainnet deployment
cwsnt Jul 3, 2023
3121de4
Merge pull request #499 from DistributedCollective/SOV-2197-recover-f…
cwsnt Jul 3, 2023
db57cde
fix: public-function-that-could-be-declared-external
cwsnt Jul 5, 2023
ff48508
fix: replace mainnet4 to new endpoint mainnet-dev for check-fork-patc…
Jul 6, 2023
ac848bf
add lending pools deployment data, fix beacon LM address
tjcloa Jul 7, 2023
6112a07
feature: separate rbtc (rbtc, wrbtc, iwrbtc) fee claiming
cwsnt Jul 10, 2023
03a37bd
address review comment
cwsnt Jul 12, 2023
1285ffd
Merge branch 'development' into SOV-2450-fix-view-reward-function
cwsnt Jul 12, 2023
15be5fd
deployment data
cwsnt Jul 12, 2023
de773de
Merge pull request #501 from DistributedCollective/SOV-2450-fix-view-…
cwsnt Jul 12, 2023
a58adb9
fix: processed token in _withdrawRbtcTokenStartingFromCheckpoint
cwsnt Jul 13, 2023
3aec382
SOV-2704-three-years-team-vestings (#508)
tjcloa Jul 14, 2023
8d568c5
Merge pull request #506 from DistributedCollective/SOV-2553-static-an…
cwsnt Jul 17, 2023
3cc2908
update solidoc config, contracts docs and README
tjcloa Jul 18, 2023
05487bc
fix typo and update Contracts header format in README
tjcloa Jul 18, 2023
2a379d2
refactor: withdraw rbtc token to support multiple token
cwsnt Jul 19, 2023
7d21516
remove duplicated processedCheckpoints assignment
cwsnt Jul 19, 2023
cfb9f36
consider max checkpoints deduction for withdrawRbtcToken()
cwsnt Jul 19, 2023
d461543
add PriceFeeds testnet and mainnet deployment data
tjcloa Jul 20, 2023
601ba2e
feat: add pauser role in protocol
cwsnt Jul 21, 2023
12e74d0
fix: remove duplicate function registration
cwsnt Jul 21, 2023
967ce4e
enable pauser to be 0 address
cwsnt Jul 21, 2023
7f6df92
add printLendingPoolsData() to contract_interaction
tjcloa Jul 24, 2023
1c68ad8
feat:add pauser role in loantoken
cwsnt Jul 24, 2023
5384240
update rbtcwrapperproxy contract address
cwsnt Jul 24, 2023
2afadeb
only owner can set the pauser protocol
cwsnt Jul 25, 2023
13518d1
add test for 0 address pauser
cwsnt Jul 25, 2023
551c3b6
add deployment script
cwsnt Jul 25, 2023
6cf61ab
improve non-zero test
cwsnt Jul 25, 2023
b8a4ae8
add feeSharingCollector deployments
cwsnt Jul 26, 2023
9b7a7a8
fix: deployment script based on review
cwsnt Jul 26, 2023
695fa69
fix based on review
cwsnt Jul 28, 2023
e3e57d2
add sips:state hh task
tjcloa Jul 28, 2023
dbb4a81
add admin role in protocol
cwsnt Jul 31, 2023
d88f44f
send rbtc in one call only
cwsnt Aug 2, 2023
f185515
add test case based on review
cwsnt Aug 2, 2023
f9fa764
add FourYearVesting -Factory and -Logic testnet deployment
tjcloa Aug 3, 2023
e6bb1ca
fix hh tasks createVestings and create4YearVestings
tjcloa Aug 3, 2023
8e5497d
add .py script transferOwnershipFromMultisig
tjcloa Aug 3, 2023
2c7cab3
emit event first in the setter
cwsnt Aug 4, 2023
efb8c7e
move emitted rbtc withdraw event into actual sending
cwsnt Aug 4, 2023
2b66c52
add test coverage
cwsnt Aug 7, 2023
c3be7a7
script extension
ororopickpocket Aug 7, 2023
b3d8195
solved merge conflict
ororopickpocket Aug 7, 2023
f2002bc
add only admin or owner modifier into the protocol setting function
cwsnt Aug 7, 2023
324184c
add GenericTokenSender deployment & .prettier format
tjcloa Aug 8, 2023
a5e18e3
adjust getAccumulatedFeesForCheckpointsRange to return relevant token…
cwsnt Aug 9, 2023
d4e6a68
introduce new function to get all fess per checkpoints
cwsnt Aug 10, 2023
63d3e55
revert fees in range test
cwsnt Aug 10, 2023
882f469
remove obsolete unit test
cwsnt Aug 10, 2023
724397c
add vestingCreationType 6
tjcloa Aug 10, 2023
33c1180
SOV-2552 staking foundry fuzzy testing (#513)
tjcloa Aug 10, 2023
f41b169
1# address review comment
cwsnt Aug 14, 2023
a256bce
remove getNextPositiveCheckpoint from get all user fee function
cwsnt Aug 14, 2023
9080ed5
consider startFrom as non checkpoint index
cwsnt Aug 14, 2023
82978df
allow the startFrom to be 0 value
cwsnt Aug 15, 2023
09f31f3
add natspec
cwsnt Aug 15, 2023
bfd49df
naming variable to be more relevant
cwsnt Aug 15, 2023
11a4f43
corrected staking natspec
ororopickpocket Aug 15, 2023
9bc710f
Merge branch 'development' of https://github.com/DistributedCollectiv…
ororopickpocket Aug 15, 2023
8c51d46
replace deprecated cryptoenv for @secrez/cryptoenv
tjcloa Aug 17, 2023
7b149d1
merge with latest development branch & fix conflict
cwsnt Aug 17, 2023
3a852a4
Merge pull request #503 from DistributedCollective/SOV-736-update-loa…
cwsnt Aug 17, 2023
3f81ccc
Merge pull request #507 from DistributedCollective/SOV-2557-separate-…
cwsnt Aug 17, 2023
d1b4862
Merge pull request #510 from DistributedCollective/SOV-2680-update-pa…
cwsnt Aug 17, 2023
62688b1
Merge pull request #509 from DistributedCollective/SOV-2672-pauser-ro…
cwsnt Aug 17, 2023
aad5e81
merge with latest development branch & fix conflict
cwsnt Aug 17, 2023
408388c
Merge pull request #511 from DistributedCollective/SOV-617-admin-role…
cwsnt Aug 17, 2023
4e27dc1
introduce loan token logic trade module
cwsnt Aug 21, 2023
a89092e
add deployment script
cwsnt Aug 21, 2023
0a58417
separate loan token logic trade for LM & RBTC
cwsnt Aug 22, 2023
54a13a8
fix loan token logic trade mmodule name
cwsnt Aug 22, 2023
ff331d3
add LoanMaintenance deployment data
tjcloa Aug 31, 2023
5da6823
revert: add LoanMaintenance deployment data
tjcloa Aug 31, 2023
d516710
add maintenance funcs to ISovryn, add deployment
tjcloa Aug 31, 2023
fc47ebe
update toggle pause and freeze hh tasks
tjcloa Aug 31, 2023
3707115
store wrbtc & iwrbtc address in feesharing storage
cwsnt Sep 4, 2023
0fa81d5
fix SIPs creation hh task, add testnet sample SIPs
tjcloa Sep 5, 2023
10eaf9d
init wrapper function
cwsnt Sep 6, 2023
2304c7b
finalize wrap function withdrawal
cwsnt Sep 7, 2023
b1bb1a3
add test case for regular withdraw
cwsnt Sep 7, 2023
a68ee3b
add deployment
cwsnt Sep 7, 2023
abbbf58
introduce mint & burn module
cwsnt Sep 8, 2023
a807d1a
change order for withdraw execution
cwsnt Sep 8, 2023
8aef38f
2/ add deployment
cwsnt Sep 8, 2023
0617305
fix test
cwsnt Sep 8, 2023
073ca20
fix typo
cwsnt Sep 8, 2023
3d4f13c
2/ fix typo
cwsnt Sep 8, 2023
dd26e5a
distribution script update - september 2023
tjcloa Sep 8, 2023
9c48789
address review comment
cwsnt Sep 11, 2023
10b893e
fix in hh task: togglePaused -> toggleFunctionPause
tjcloa Sep 14, 2023
ef5c9ea
Merge pull request #517 from DistributedCollective/SOV-3109-wrapping-…
cwsnt Sep 16, 2023
d6db4bc
Merge branch 'development' into SOV-2813-feesharing-return-relevant-t…
cwsnt Sep 16, 2023
9bb63bd
adjust the getAllUserFeesPerMaxCheckpoints after claimAllCollectedFee…
cwsnt Sep 16, 2023
ca55670
fix lending pools pausing hh tasks
tjcloa Sep 15, 2023
b928ca4
Merge pull request #518 from DistributedCollective/SOV-2813-feesharin…
cwsnt Sep 17, 2023
4602896
mereg with development branch & fix conflict
cwsnt Sep 17, 2023
a9f7ca3
add latest feee sharing collector deployment
cwsnt Sep 18, 2023
1e81eb2
script updates
ororopickpocket Sep 18, 2023
a769698
Merge branch 'development' of https://github.com/DistributedCollectiv…
ororopickpocket Sep 18, 2023
15591e7
add hh task utils:compare-bytecode
tjcloa Sep 18, 2023
f353e41
add PriceFeedsMoc - Money Onchain deployment .json
tjcloa Sep 18, 2023
d3e520f
fix based on review
cwsnt Sep 20, 2023
51350ea
1/ address comment review
cwsnt Sep 20, 2023
6171b3e
require wrbtc and iWrbtc to be zero address in initialization
cwsnt Sep 20, 2023
b1cf5fc
add test case
cwsnt Sep 20, 2023
dbb2122
Merge pull request #519 from DistributedCollective/SOV-2938-feesharin…
cwsnt Sep 20, 2023
666b3b5
add deployment for feeSharingCollector testnet
cwsnt Sep 21, 2023
7fee23c
loanTokenMintAndBurn should inherit from loanTokenLogicSplit as well
cwsnt Sep 21, 2023
26d2a68
add setAdmin and setPauser scripts for core protocol
tjcloa Sep 21, 2023
990038d
renaming based on review comments
cwsnt Sep 24, 2023
3980513
introduce LoanTokenLogicShared
cwsnt Sep 24, 2023
b86bc6a
move transfer & transferFrom to loanTokenLogic module
cwsnt Sep 25, 2023
ae33803
improve comment
cwsnt Sep 25, 2023
1a711ef
add hh external deployments
tjcloa Sep 25, 2023
5042f44
add deployment to testnet
cwsnt Sep 26, 2023
46480d9
ran prettier
cwsnt Sep 26, 2023
9abea26
fix wrbtc letter case
cwsnt Sep 26, 2023
77213e7
merge with latest development branch & fix conflict
cwsnt Sep 26, 2023
810abe9
Merge pull request #515 from DistributedCollective/SOV-3036-margin-tr…
cwsnt Sep 26, 2023
3a52055
re-deploy bitocracy on the testnet
tjcloa Sep 28, 2023
83c6d1c
update .py scripts
tjcloa Sep 29, 2023
21e9be5
refactor & fix hh deployment and pausing scripts
tjcloa Sep 29, 2023
3bfaca1
minor fix of log output in deployWithCustomProxy
tjcloa Sep 30, 2023
8a3f2bf
refactor FeeSharingCollector deploy & init scripts
tjcloa Sep 30, 2023
ac605ce
FeeSharingCollector upgrade deployment data
tjcloa Oct 2, 2023
a6be61e
bitocracy contracts names fixed in deployment .json
tjcloa Oct 5, 2023
23bedde
add toggle pause and freeze safe batches
tjcloa Oct 8, 2023
6332606
refactor FastBTCBiDi pause/freeze deployment .json
tjcloa Oct 8, 2023
0ec1341
add FastBTCAccessControl.json external artifact
tjcloa Oct 8, 2023
6583a9d
deploymennt loan token refactoring mainnet
cwsnt Oct 9, 2023
971bda7
rename wrtbc deployment
cwsnt Oct 9, 2023
0875fa2
fix multisig:sign-txs hh task bug
tjcloa Oct 9, 2023
185f869
add fastBTC pause/unpause & testnet deployment data
tjcloa Oct 9, 2023
01906c0
add fastBTC safe pause/freeze batches
tjcloa Oct 9, 2023
835b37a
add getter for loanToken target address in loanTokenLogicProxy
cwsnt Oct 10, 2023
ccb03af
add deployment script
cwsnt Oct 10, 2023
b4af8b1
fix script
cwsnt Oct 10, 2023
43b64c3
add fastBTC testnet hh deployment data
tjcloa Oct 10, 2023
374b736
move getTarget loanTokenLogicProxy test
cwsnt Oct 11, 2023
a61d7d2
add deployment loanTokenLogicProxy
cwsnt Oct 11, 2023
cd876bb
update network ids in gnosis safe pausing batches
tjcloa Oct 11, 2023
31b3e7c
replace ZUSD with DLLR in scripts redeeming from XUSD
tjcloa Oct 12, 2023
17e30c0
add demo pause-unpause Safe batches & improve readLoan
tjcloa Oct 16, 2023
a790267
Merge pull request #522 from DistributedCollective/SOV-2857-2-reusabl…
cwsnt Oct 16, 2023
4092b19
Merge branch 'deployment/loan-token-refactoring' into development
cwsnt Oct 16, 2023
d7788b6
add native token processing to GenericTokenSender
tjcloa Oct 17, 2023
d095aa3
add hh task governance:currentVotingPower
tjcloa Oct 17, 2023
9cae7f1
remove TestPausable_flattened test demo contract
tjcloa Oct 17, 2023
d418bed
empower distributor script to process liquid RBTC
tjcloa Oct 17, 2023
090fa88
add funds and vaults mainnet deployments
tjcloa Oct 18, 2023
8c0dbd6
refactor hh task currentVotingPower -> getVotingPower
tjcloa Oct 20, 2023
317352e
update iSovryn
cwsnt Oct 20, 2023
00395e6
fix hh task sips:queue-timer
tjcloa Oct 21, 2023
6470a51
fix some missing returns
cwsnt Oct 22, 2023
d49ee4f
fix Safe batches mainnet beacons addresses
tjcloa Oct 23, 2023
6d4eb2a
Merge pull request #523 from DistributedCollective/SOV-3079-update-is…
cwsnt Oct 24, 2023
8800e92
SOV-585 transfer the contract guardianship (#514)
ororopickpocket Oct 31, 2023
d96f605
feature: add script to transfer amm ownership to governance (#450)
cwsnt Oct 31, 2023
ebb1b68
add to CRON script withdraw DLLR from the protocol
tjcloa Nov 1, 2023
66c4be5
SOV-3174: hh task fixed and tested
Nov 2, 2023
139bce0
add withdrawal script from mynt reserve
cwsnt Nov 6, 2023
388e0ca
ran prettier
cwsnt Nov 6, 2023
0ea8b0f
register missing functions to loan token module interface
cwsnt Nov 8, 2023
f77bd59
add print conversion fee to printV1ConverterData
tjcloa Nov 13, 2023
c5776ce
add Safe pause/unpause priceFeeds
tjcloa Nov 13, 2023
8392f68
add hh task: universal getBalanceOf
tjcloa Nov 14, 2023
bd398f6
hh task getBalanceOf: support multiple tokens & addresses
tjcloa Nov 14, 2023
4b6ca25
add tokens external deployment data
tjcloa Nov 14, 2023
ec4f81b
fix hh task getBalanceOf output text
tjcloa Nov 14, 2023
4ad8ca7
add script getVestingsWithSchedule
tjcloa Nov 16, 2023
44ac4b4
rename vars in fastbtc.py
tjcloa Nov 20, 2023
70eccff
add function redeemFromAggregatorWithMsTo
tjcloa Nov 22, 2023
66f61ac
add XUSD aggregator deploymnt data & fix comment
tjcloa Nov 23, 2023
4ee7eb8
replace XUSD deployment data with the original ABI
tjcloa Nov 24, 2023
f9c19c2
adjust create_vestings script for the new data format
tjcloa Dec 4, 2023
a13bdb8
Merge pull request #526 from DistributedCollective:SOV-3174-compare-b…
tjcloa Dec 5, 2023
99f9f6e
add BFBasketManager external artifact
tjcloa Dec 5, 2023
e981ef9
add sips:decode-sip-data hh task
tjcloa Dec 5, 2023
de7d6ef
Revert "adjust create_vestings script for the new data format"
tjcloa Dec 5, 2023
f9d7ab1
update lockedSOV contract on testnet
cwsnt Dec 6, 2023
b5cb6fd
modify hh task decode-sip-data to accept full tx
tjcloa Dec 12, 2023
6364cfe
update LM rewards XUSD/RBTC to 2000
tjcloa Dec 12, 2023
d79c29f
add Watcher hh deployment data
tjcloa Dec 12, 2023
0da31ae
fix: openzeppelin constants helper cause individual test fails
cwsnt Dec 15, 2023
be593d6
SOV-3436-Proton-release
tjcloa Dec 21, 2023
b55b6af
update .py scripts & refactor hh tasks
tjcloa Dec 21, 2023
ff5c054
update ISovryn deployment data
tjcloa Dec 24, 2023
aefba8b
refactor loan token initialization test
cwsnt Jan 5, 2024
d1d60b7
fix: set unlimited allowance for lockedSov migration
cwsnt Jan 10, 2024
46a7f5f
refactor hh tasks - change addParam to addPositionalParam
tjcloa Jan 10, 2024
a1e3c22
upd create_vestings.py: add 3y team ad-hoc distribution
tjcloa Jan 10, 2024
41263f4
add cancelTeamVestings py script
tjcloa Jan 10, 2024
926fd85
improve scripts
tjcloa Jan 12, 2024
4ac9914
make hh task 'utils:compare-bytecode' use deployed objects by default
Jan 15, 2024
d5a8eaa
enhance utils:compare-bytecode
tjcloa Jan 15, 2024
1f9e94e
tiny update of hh task getBalanceOfAccounts
tjcloa Jan 16, 2024
df88750
fix and refactor misc scripts
tjcloa Jan 17, 2024
72ecfbb
Merge pull request #532 from DistributedCollective/SOV-903-refactor-l…
cwsnt Jan 30, 2024
675b300
Merge pull request #533 from DistributedCollective/SOV-3576-locked-so…
cwsnt Jan 30, 2024
331e920
update multisig scripts & change lm settings
tjcloa Jan 29, 2024
ae8e993
fix and improve hh tasks
tjcloa Jan 31, 2024
2693e0b
bump prettier version and config
tjcloa Feb 2, 2024
73d8708
run .prettier after bumping version
tjcloa Feb 2, 2024
a413f58
fix .solhint.json
tjcloa Feb 2, 2024
a6d9091
update package-lock.json
tjcloa Feb 2, 2024
acb6a0f
update prettier ^3.2.4 -> 3.2.4
tjcloa Feb 3, 2024
a8933b0
update .solhintignore
tjcloa Feb 5, 2024
fb6acd8
update config files
tjcloa Feb 5, 2024
06d8ea8
SOV-3613 Electron release
tjcloa Feb 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ coverage
types
reports
tmp
temp
deployment/deployments
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ module.exports = {
parserOptions: {
ecmaVersion: 2020,
},
rules: {},
rules: {
"compiler-version": ["off"],
},
};
7 changes: 7 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
Expand Down
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ ignore/
!.solhint.json
!.solhintignore
!.eslintignore
!.chainId
!.gitmodules
ignore
*.txt
*.log
Expand All @@ -34,11 +36,14 @@ cache
node_modules
artifacts/
cache/
cache_forge/
contracts_bzx/
tmp/
tmp
/temp/
temp/
temp
/out/
foundry/out/
abi
types/
typechain/
Expand All @@ -47,3 +52,5 @@ typechain/
*/deployments/*forked*
venv/
!/external/artifacts/
cache_hardhat/
foundry/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lib/forge-std"]
path = foundry/lib/forge-std
url = https://github.com/foundry-rs/forge-std
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ types/
venv/
deployment/deployments
tmp/
temp/
out/
foundry/
cache_forge/
safe/
5 changes: 4 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"plugins": ["prettier-plugin-solidity"],
"overrides": [
{
"files": ["*.js", "*.test.js", "*.json"],
"options": {
"trailingComma": "es5",
"printWidth": 99,
"tabWidth": 4,
"useTabs": false,
Expand All @@ -11,8 +13,9 @@
}
},
{
"files": "*.sol",
"files": ["*.sol"],
"options": {
"parser": "solidity-parse",
"printWidth": 99,
"tabWidth": 4,
"useTabs": false,
Expand Down
2 changes: 2 additions & 0 deletions .solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ module.exports = {
"node_modules",
"interfaces",
"events",
"tmp",
"temp",
],
};
7 changes: 5 additions & 2 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"extends": "solhint:recommended",
"plugins": ["prettier"],
"extends": "solhint:recommended",
"rules": {
"prettier/prettier": "error",
"max-line-length": ["warn", 140],
"compiler-version": ["warn"]
"compiler-version": "warn",
"no-global-import": "warn",
"no-console": "warn",
"private-vars-leading-underscore": "warn"
}
}
6 changes: 5 additions & 1 deletion .solhintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ contracts/testhelpers
contracts/openzeppelin
contracts/mixins/EnumerableAddressSet.sol
contracts/interfaces
contracts/events
contracts/events
foundry
tests-foundry
tmp
temp
210 changes: 210 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,216 @@ Out of the box, Hardhat's [mainnet forking mode](https://hardhat.org/hardhat-net
not work with RSK. This package uses `patch-package` to patch the installed version of Hardhat to enable support for
forking from RSK. For more details, see [HARDHAT_FORKING.md](HARDHAT_FORKING.md).

## Slither (pre-requisite)
Slither is enabled as the static analyzer. Currently we introduce the static anlysis to the staking modules `npm run analyze:staking-modules`. <br/>
Before run this command, make sure that we have:

- [Slither](https://github.com/crytic/slither) installed
- The solc version 0.5.17 installed.
We can use [`solc-select`](https://github.com/crytic/solc-select) for managing the solc version.

[comment]: #solidoc (Start)
## Contracts

* [Address](docs/Address.md)
* [Administered](docs/Administered.md)
* [AdminRole](docs/AdminRole.md)
* [AdvancedToken](docs/AdvancedToken.md)
* [AdvancedTokenStorage](docs/AdvancedTokenStorage.md)
* [Affiliates](docs/Affiliates.md)
* [AffiliatesEvents](docs/AffiliatesEvents.md)
* [ApprovalReceiver](docs/ApprovalReceiver.md)
* [BProPriceFeed](docs/BProPriceFeed.md)
* [CheckpointsShared](docs/CheckpointsShared.md)
* [Constants](docs/Constants.md)
* [Context](docs/Context.md)
* [DevelopmentFund](docs/DevelopmentFund.md)
* [DummyContract](docs/DummyContract.md)
* [EnumerableAddressSet](docs/EnumerableAddressSet.md)
* [EnumerableBytes32Set](docs/EnumerableBytes32Set.md)
* [EnumerableBytes4Set](docs/EnumerableBytes4Set.md)
* [ERC20](docs/ERC20.md)
* [ERC20Detailed](docs/ERC20Detailed.md)
* [ErrorDecoder](docs/ErrorDecoder.md)
* [Escrow](docs/Escrow.md)
* [EscrowReward](docs/EscrowReward.md)
* [FeedsLike](docs/FeedsLike.md)
* [FeesEvents](docs/FeesEvents.md)
* [FeeSharingCollector](docs/FeeSharingCollector.md)
* [FeeSharingCollectorProxy](docs/FeeSharingCollectorProxy.md)
* [FeeSharingCollectorStorage](docs/FeeSharingCollectorStorage.md)
* [FeesHelper](docs/FeesHelper.md)
* [FourYearVesting](docs/FourYearVesting.md)
* [FourYearVestingFactory](docs/FourYearVestingFactory.md)
* [FourYearVestingLogic](docs/FourYearVestingLogic.md)
* [FourYearVestingStorage](docs/FourYearVestingStorage.md)
* [GenericTokenSender](docs/GenericTokenSender.md)
* [GovernorAlpha](docs/GovernorAlpha.md)
* [GovernorVault](docs/GovernorVault.md)
* [IApproveAndCall](docs/IApproveAndCall.md)
* [IChai](docs/IChai.md)
* [IContractRegistry](docs/IContractRegistry.md)
* [IConverterAMM](docs/IConverterAMM.md)
* [IERC1820Registry](docs/IERC1820Registry.md)
* [IERC20_](docs/IERC20_.md)
* [IERC20](docs/IERC20.md)
* [IERC777](docs/IERC777.md)
* [IERC777Recipient](docs/IERC777Recipient.md)
* [IERC777Sender](docs/IERC777Sender.md)
* [IFeeSharingCollector](docs/IFeeSharingCollector.md)
* [IFourYearVesting](docs/IFourYearVesting.md)
* [IFourYearVestingFactory](docs/IFourYearVestingFactory.md)
* [IFunctionsList](docs/IFunctionsList.md)
* [ILiquidityMining](docs/ILiquidityMining.md)
* [ILiquidityPoolV1Converter](docs/ILiquidityPoolV1Converter.md)
* [ILoanPool](docs/ILoanPool.md)
* [ILoanToken](docs/ILoanToken.md)
* [ILoanTokenLogicBeacon](docs/ILoanTokenLogicBeacon.md)
* [ILoanTokenLogicModules](docs/ILoanTokenLogicModules.md)
* [ILoanTokenLogicProxy](docs/ILoanTokenLogicProxy.md)
* [ILoanTokenModules](docs/ILoanTokenModules.md)
* [ILoanTokenWRBTC](docs/ILoanTokenWRBTC.md)
* [ILockedSOV](docs/ILockedSOV.md)
* [IMoCState](docs/IMoCState.md)
* [IModulesProxyRegistry](docs/IModulesProxyRegistry.md)
* [Initializable](docs/Initializable.md)
* [InterestUser](docs/InterestUser.md)
* [IPot](docs/IPot.md)
* [IPriceFeeds](docs/IPriceFeeds.md)
* [IPriceFeedsExt](docs/IPriceFeedsExt.md)
* [IProtocol](docs/IProtocol.md)
* [IRSKOracle](docs/IRSKOracle.md)
* [ISovryn](docs/ISovryn.md)
* [ISovrynSwapNetwork](docs/ISovrynSwapNetwork.md)
* [IStaking](docs/IStaking.md)
* [ISwapsImpl](docs/ISwapsImpl.md)
* [ITeamVesting](docs/ITeamVesting.md)
* [ITimelock](docs/ITimelock.md)
* [IV1PoolOracle](docs/IV1PoolOracle.md)
* [IVesting](docs/IVesting.md)
* [IVestingFactory](docs/IVestingFactory.md)
* [IVestingRegistry](docs/IVestingRegistry.md)
* [IWrbtc](docs/IWrbtc.md)
* [IWrbtcERC20](docs/IWrbtcERC20.md)
* [LenderInterestStruct](docs/LenderInterestStruct.md)
* [LiquidationHelper](docs/LiquidationHelper.md)
* [LiquidityMining](docs/LiquidityMining.md)
* [LiquidityMiningConfigToken](docs/LiquidityMiningConfigToken.md)
* [LiquidityMiningProxy](docs/LiquidityMiningProxy.md)
* [LiquidityMiningStorage](docs/LiquidityMiningStorage.md)
* [LoanClosingsEvents](docs/LoanClosingsEvents.md)
* [LoanClosingsLiquidation](docs/LoanClosingsLiquidation.md)
* [LoanClosingsRollover](docs/LoanClosingsRollover.md)
* [LoanClosingsShared](docs/LoanClosingsShared.md)
* [LoanClosingsWith](docs/LoanClosingsWith.md)
* [LoanClosingsWithoutInvariantCheck](docs/LoanClosingsWithoutInvariantCheck.md)
* [LoanInterestStruct](docs/LoanInterestStruct.md)
* [LoanMaintenance](docs/LoanMaintenance.md)
* [LoanMaintenanceEvents](docs/LoanMaintenanceEvents.md)
* [LoanOpenings](docs/LoanOpenings.md)
* [LoanOpeningsEvents](docs/LoanOpeningsEvents.md)
* [LoanParamsStruct](docs/LoanParamsStruct.md)
* [LoanSettings](docs/LoanSettings.md)
* [LoanSettingsEvents](docs/LoanSettingsEvents.md)
* [LoanStruct](docs/LoanStruct.md)
* [LoanToken](docs/LoanToken.md)
* [LoanTokenBase](docs/LoanTokenBase.md)
* [LoanTokenLogicBeacon](docs/LoanTokenLogicBeacon.md)
* [LoanTokenLogicLM](docs/LoanTokenLogicLM.md)
* [LoanTokenLogicProxy](docs/LoanTokenLogicProxy.md)
* [LoanTokenLogicStandard](docs/LoanTokenLogicStandard.md)
* [LoanTokenLogicStorage](docs/LoanTokenLogicStorage.md)
* [LoanTokenLogicWrbtc](docs/LoanTokenLogicWrbtc.md)
* [LoanTokenSettingsLowerAdmin](docs/LoanTokenSettingsLowerAdmin.md)
* [LockedSOV](docs/LockedSOV.md)
* [MarginTradeStructHelpers](docs/MarginTradeStructHelpers.md)
* [Medianizer](docs/Medianizer.md)
* [ModuleCommonFunctionalities](docs/ModuleCommonFunctionalities.md)
* [ModulesCommonEvents](docs/ModulesCommonEvents.md)
* [ModulesProxy](docs/ModulesProxy.md)
* [ModulesProxyRegistry](docs/ModulesProxyRegistry.md)
* [MultiSigKeyHolders](docs/MultiSigKeyHolders.md)
* [MultiSigWallet](docs/MultiSigWallet.md)
* [Mutex](docs/Mutex.md)
* [Objects](docs/Objects.md)
* [OrderStruct](docs/OrderStruct.md)
* [OrigingVestingCreator](docs/OrigingVestingCreator.md)
* [OriginInvestorsClaim](docs/OriginInvestorsClaim.md)
* [Ownable](docs/Ownable.md)
* [Pausable](docs/Pausable.md)
* [PausableOz](docs/PausableOz.md)
* [PreviousLoanToken](docs/PreviousLoanToken.md)
* [PreviousLoanTokenSettingsLowerAdmin](docs/PreviousLoanTokenSettingsLowerAdmin.md)
* [PriceFeedRSKOracle](docs/PriceFeedRSKOracle.md)
* [PriceFeeds](docs/PriceFeeds.md)
* [PriceFeedsLocal](docs/PriceFeedsLocal.md)
* [PriceFeedsMoC](docs/PriceFeedsMoC.md)
* [PriceFeedV1PoolOracle](docs/PriceFeedV1PoolOracle.md)
* [ProtocolAffiliatesInterface](docs/ProtocolAffiliatesInterface.md)
* [ProtocolLike](docs/ProtocolLike.md)
* [ProtocolSettings](docs/ProtocolSettings.md)
* [ProtocolSettingsEvents](docs/ProtocolSettingsEvents.md)
* [ProtocolSettingsLike](docs/ProtocolSettingsLike.md)
* [ProtocolSwapExternalInterface](docs/ProtocolSwapExternalInterface.md)
* [ProtocolTokenUser](docs/ProtocolTokenUser.md)
* [Proxy](docs/Proxy.md)
* [ProxyOwnable](docs/ProxyOwnable.md)
* [ReentrancyGuard](docs/ReentrancyGuard.md)
* [RewardHelper](docs/RewardHelper.md)
* [RSKAddrValidator](docs/RSKAddrValidator.md)
* [SafeERC20](docs/SafeERC20.md)
* [SafeMath](docs/SafeMath.md)
* [SafeMath96](docs/SafeMath96.md)
* [setGet](docs/setGet.md)
* [SharedReentrancyGuard](docs/SharedReentrancyGuard.md)
* [SignedSafeMath](docs/SignedSafeMath.md)
* [SOV](docs/SOV.md)
* [sovrynProtocol](docs/sovrynProtocol.md)
* [StakingAdminModule](docs/StakingAdminModule.md)
* [StakingGovernanceModule](docs/StakingGovernanceModule.md)
* [StakingInterface](docs/StakingInterface.md)
* [StakingProxy](docs/StakingProxy.md)
* [StakingRewards](docs/StakingRewards.md)
* [StakingRewardsProxy](docs/StakingRewardsProxy.md)
* [StakingRewardsStorage](docs/StakingRewardsStorage.md)
* [StakingShared](docs/StakingShared.md)
* [StakingStakeModule](docs/StakingStakeModule.md)
* [StakingStorageModule](docs/StakingStorageModule.md)
* [StakingStorageShared](docs/StakingStorageShared.md)
* [StakingVestingModule](docs/StakingVestingModule.md)
* [StakingWithdrawModule](docs/StakingWithdrawModule.md)
* [State](docs/State.md)
* [SwapsEvents](docs/SwapsEvents.md)
* [SwapsExternal](docs/SwapsExternal.md)
* [SwapsImplLocal](docs/SwapsImplLocal.md)
* [SwapsImplSovrynSwap](docs/SwapsImplSovrynSwap.md)
* [SwapsUser](docs/SwapsUser.md)
* [TeamVesting](docs/TeamVesting.md)
* [Timelock](docs/Timelock.md)
* [TimelockHarness](docs/TimelockHarness.md)
* [TimelockInterface](docs/TimelockInterface.md)
* [TokenSender](docs/TokenSender.md)
* [UpgradableProxy](docs/UpgradableProxy.md)
* [USDTPriceFeed](docs/USDTPriceFeed.md)
* [Utils](docs/Utils.md)
* [VaultController](docs/VaultController.md)
* [Vesting](docs/Vesting.md)
* [VestingCreator](docs/VestingCreator.md)
* [VestingFactory](docs/VestingFactory.md)
* [VestingLogic](docs/VestingLogic.md)
* [VestingRegistry](docs/VestingRegistry.md)
* [VestingRegistry2](docs/VestingRegistry2.md)
* [VestingRegistry3](docs/VestingRegistry3.md)
* [VestingRegistryLogic](docs/VestingRegistryLogic.md)
* [VestingRegistryProxy](docs/VestingRegistryProxy.md)
* [VestingRegistryStorage](docs/VestingRegistryStorage.md)
* [VestingStorage](docs/VestingStorage.md)
* [WeightedStakingModule](docs/WeightedStakingModule.md)
* [WRBTC](docs/WRBTC.md)

[comment]: #solidoc (End)


## Contributing

<a href="https://github.com/DistributedCollective/Sovryn-smart-contracts/graphs/contributors">
Expand Down
14 changes: 7 additions & 7 deletions contracts/connectors/loantoken/LoanToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ contract LoanToken is AdvancedTokenStorage {
let ptr := mload(0x40)
returndatacopy(ptr, 0, size)
switch result
case 0 {
revert(ptr, size)
}
default {
return(ptr, size)
}
case 0 {
revert(ptr, size)
}
default {
return(ptr, size)
}
}
}

Expand Down Expand Up @@ -140,6 +140,6 @@ contract LoanToken is AdvancedTokenStorage {
symbol = _symbol;
decimals = IERC20(loanTokenAddress).decimals();

initialPrice = 10**18; /// starting price of 1
initialPrice = 10 ** 18; /// starting price of 1
}
}
6 changes: 3 additions & 3 deletions contracts/connectors/loantoken/LoanTokenBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ import "../../reentrancy/SharedReentrancyGuard.sol";
* use the BZRX tokens, which are only used to pay fees on the network currently.
* */
contract LoanTokenBase is ReentrancyGuard, SharedReentrancyGuard, Ownable, Pausable {
uint256 internal constant WEI_PRECISION = 10**18;
uint256 internal constant WEI_PERCENT_PRECISION = 10**20;
uint256 internal constant WEI_PRECISION = 10 ** 18;
uint256 internal constant WEI_PERCENT_PRECISION = 10 ** 20;

int256 internal constant sWEI_PRECISION = 10**18;
int256 internal constant sWEI_PRECISION = 10 ** 18;

/// @notice Standard ERC-20 properties
string public name;
Expand Down
Loading
Loading