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

Collateral Manager V2 #116

Open
wants to merge 73 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
9c4b2bb
adding
ethereumdegen Jul 6, 2023
3a7a7fa
changing tellerv2 sol
ethereumdegen Jul 7, 2023
a0a4d19
adding collateral v2 to tellersol
ethereumdegen Jul 7, 2023
679b534
implementing if/then switch for collateral managers
ethereumdegen Jul 7, 2023
9f72321
fix }
ethereumdegen Jul 7, 2023
121134e
fixing issues
ethereumdegen Jul 7, 2023
9f61210
fixing issues
ethereumdegen Jul 7, 2023
13ac69b
fixing collateral manager v2
ethereumdegen Jul 7, 2023
6ea038e
harmonizing types in the bundle lib to be more similar to v1
ethereumdegen Jul 7, 2023
11f36b3
fixing types
ethereumdegen Jul 7, 2023
9741d34
contracts compile
ethereumdegen Jul 7, 2023
8000727
fixing types
ethereumdegen Jul 7, 2023
595b968
fixing up
ethereumdegen Jul 7, 2023
0330c32
fix interface
ethereumdegen Jul 7, 2023
1a41490
need to fix tests
ethereumdegen Jul 7, 2023
59d5667
compiles !
ethereumdegen Jul 7, 2023
41c626b
remove unused file
ethereumdegen Jul 7, 2023
afee9cd
update
ethereumdegen Jul 7, 2023
2bd34d1
fixing tests
ethereumdegen Jul 7, 2023
d5081a3
fixing test
ethereumdegen Jul 7, 2023
6de9cb5
fixing tests
ethereumdegen Jul 8, 2023
96833fd
need to make more unit testy
ethereumdegen Jul 8, 2023
0f73823
all tests pass
ethereumdegen Jul 8, 2023
8b7e4eb
format
ethereumdegen Jul 8, 2023
5db82c0
fixing up tests
ethereumdegen Jul 8, 2023
d141b14
merge
ethereumdegen Sep 26, 2023
77cdaef
store collateral mgr for bid in mapping
ethereumdegen Sep 26, 2023
54c72b4
fixing tests
ethereumdegen Sep 26, 2023
1e2cd0b
fixing tests
ethereumdegen Sep 26, 2023
3b7f79e
tests compile but fail
ethereumdegen Sep 26, 2023
5ba4f1c
fix tests
ethereumdegen Sep 26, 2023
9f4d59c
fixing tests
ethereumdegen Sep 26, 2023
0b33af1
trying to fix test
ethereumdegen Sep 26, 2023
1f7217c
fixed commit collateral for test
ethereumdegen Sep 27, 2023
c77b0ad
fixed more tests
ethereumdegen Sep 27, 2023
b6402cb
tests pass
ethereumdegen Sep 27, 2023
f161741
add
ethereumdegen Oct 2, 2023
3df663d
update collateral manager to use bundle id mapping
ethereumdegen Oct 2, 2023
eba557d
add withdraw fn
ethereumdegen Oct 2, 2023
314e612
adding deploy script for collateral mgr v2
ethereumdegen Oct 3, 2023
06dc2e9
trying todeploy
ethereumdegen Oct 4, 2023
2612de6
get upgrade unsafe error
ethereumdegen Oct 4, 2023
1004989
notes
ethereumdegen Oct 4, 2023
46403e3
remove unnecessary constant
ethereumdegen Oct 4, 2023
7ecdc0d
clean comments
ethereumdegen Oct 4, 2023
62ed652
merge
ethereumdegen Oct 10, 2023
9b2b0e1
adding manifests for cm v2
ethereumdegen Oct 10, 2023
f58ed3f
improve foundry config
ethereumdegen Oct 10, 2023
4d34e52
adding fork test helper
ethereumdegen Oct 10, 2023
b86727f
adding test
ethereumdegen Oct 10, 2023
ec1ae42
adding more to test
ethereumdegen Oct 10, 2023
942f57f
imports
ethereumdegen Oct 10, 2023
d5966ff
Merge branch 'develop' into feature/collateral-manager-v2
ethereumdegen Oct 10, 2023
81901d3
edit events for withdraw
ethereumdegen Oct 10, 2023
d20214d
fixing tests
ethereumdegen Oct 10, 2023
d42a159
tests compile
ethereumdegen Oct 10, 2023
a9c6dbd
formatting
passabilities Oct 11, 2023
4a3b4a6
remove new subgraph mappings
passabilities Oct 11, 2023
6593a43
fix tests
Oct 11, 2023
98906cb
add
Oct 11, 2023
1b92d2d
add to test
Oct 12, 2023
a3e95d9
test fails
ethereumdegen Oct 12, 2023
95e9d0a
fix test
ethereumdegen Oct 12, 2023
260f3e9
fix tests
ethereumdegen Oct 12, 2023
85e9471
testing nft as collateral
Oct 12, 2023
6b711b5
more assertions
Oct 12, 2023
a2c57a0
added test that proves that tokens are released to proper bundle id
Oct 12, 2023
f90b557
add to test
Oct 12, 2023
52a86c7
clean up
ethereumdegen Oct 13, 2023
baa088f
comments
ethereumdegen Oct 13, 2023
58ba248
emit event
ethereumdegen Oct 24, 2023
0ae6840
update script
ethereumdegen Oct 24, 2023
3e7ce98
goerli deployment
ethereumdegen Oct 24, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol";
import "./interfaces/ICollateralManager.sol";
import { Collateral, CollateralType, ICollateralEscrowV1 } from "./interfaces/escrow/ICollateralEscrowV1.sol";
import "./interfaces/ICollateralManagerV1.sol";
import { ICollateralEscrowV1 } from "./interfaces/escrow/ICollateralEscrowV1.sol";
import { Collateral, CollateralType } from "./bundle/interfaces/ICollateralBundle.sol";

import "./interfaces/ITellerV2.sol";

contract CollateralManager is OwnableUpgradeable, ICollateralManager {
contract CollateralManagerV1 is OwnableUpgradeable, ICollateralManagerV1 {
/* Storage */
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
ITellerV2 public tellerV2;
Expand Down Expand Up @@ -133,6 +135,7 @@ contract CollateralManager is OwnableUpgradeable, ICollateralManager {
}
}

//this is not used for anything
/**
* @notice Checks the validity of a borrower's collateral balance and commits it to a bid.
* @param _bidId The id of the associated bid.
Expand Down
Loading