-
Notifications
You must be signed in to change notification settings - Fork 8
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
base: develop
Are you sure you want to change the base?
Conversation
packages/contracts/contracts/bundle/interfaces/ICollateralBundle.sol
Outdated
Show resolved
Hide resolved
IERC165(_token._collateralAddress).supportsInterface(0x80ac58cd) | ||
returns (bool supported721) { | ||
require(supported721, "TokenBundle: ERC721 Interface Not Supported"); | ||
} catch { | ||
revert("TokenBundle: ERC721 Interface Not Supported"); | ||
} | ||
} else if (_token._collateralType == CollateralType.ERC1155) { | ||
try | ||
IERC165(_token._collateralAddress).supportsInterface(0xd9b67a26) | ||
returns (bool supported1155) { | ||
require(supported1155, "TokenBundle: ERC1155 Interface Not Supported"); | ||
} catch { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm worried that there are several tokens that don't implement the supportsInterface
function that would cause this to fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just the way that thirdweb contract was written. So we can either choose to change it or leave it as is based on this info. i agree w you. I wonder why they did this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we leave it for now and if we have any issues try to come up with a solution but not sure there is a good one
i.e. I wanted to figure out the token type to know which transfer
function I have to call but this was the best I found
https://chat.openai.com/share/5fb9afbf-9d4b-4704-9359-145898ea906f
Uses thirdweb's token bundling contracts to simplify collateral management and reduce gas costs for submit bid by ~50%
Note: the thirdweb contracts variable names were changed to match the way we named them in CollateralManagerV1 but the logic has not been modified significantly.