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

Cooler V2 #3275

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file added public/assets/images/ethereum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/images/give/ethereum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/images/grants/entropy/ethereum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
865 changes: 171 additions & 694 deletions src/abi/CoolerClearingHouse.json

Large diffs are not rendered by default.

152 changes: 152 additions & 0 deletions src/abi/CoolerV2Composites.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
{
"abi": [
{
"inputs": [
{ "internalType": "contract IMonoCooler", "name": "_cooler", "type": "address" },
{ "internalType": "contract ERC20", "name": "_gohm", "type": "address" },
{ "internalType": "contract ERC20", "name": "_usds", "type": "address" }
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "COOLER",
"outputs": [{ "internalType": "contract IMonoCooler", "name": "", "type": "address" }]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "GOHM",
"outputs": [{ "internalType": "contract ERC20", "name": "", "type": "address" }]
},
{
"inputs": [],
"stateMutability": "view",
"type": "function",
"name": "USDS",
"outputs": [{ "internalType": "contract ERC20", "name": "", "type": "address" }]
},
{
"inputs": [
{
"internalType": "struct IMonoCooler.Authorization",
"name": "authorization",
"type": "tuple",
"components": [
{ "internalType": "address", "name": "account", "type": "address" },
{ "internalType": "address", "name": "authorized", "type": "address" },
{ "internalType": "uint96", "name": "authorizationDeadline", "type": "uint96" },
{ "internalType": "uint256", "name": "nonce", "type": "uint256" },
{ "internalType": "uint256", "name": "signatureDeadline", "type": "uint256" }
]
},
{
"internalType": "struct IMonoCooler.Signature",
"name": "signature",
"type": "tuple",
"components": [
{ "internalType": "uint8", "name": "v", "type": "uint8" },
{ "internalType": "bytes32", "name": "r", "type": "bytes32" },
{ "internalType": "bytes32", "name": "s", "type": "bytes32" }
]
},
{ "internalType": "uint128", "name": "collateralAmount", "type": "uint128" },
{ "internalType": "uint128", "name": "borrowAmount", "type": "uint128" },
{
"internalType": "struct DLGTEv1.DelegationRequest[]",
"name": "delegationRequests",
"type": "tuple[]",
"components": [
{ "internalType": "address", "name": "delegate", "type": "address" },
{ "internalType": "int256", "name": "amount", "type": "int256" }
]
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "addCollateralAndBorrow"
},
{
"inputs": [
{
"internalType": "struct IMonoCooler.Authorization",
"name": "authorization",
"type": "tuple",
"components": [
{ "internalType": "address", "name": "account", "type": "address" },
{ "internalType": "address", "name": "authorized", "type": "address" },
{ "internalType": "uint96", "name": "authorizationDeadline", "type": "uint96" },
{ "internalType": "uint256", "name": "nonce", "type": "uint256" },
{ "internalType": "uint256", "name": "signatureDeadline", "type": "uint256" }
]
},
{
"internalType": "struct IMonoCooler.Signature",
"name": "signature",
"type": "tuple",
"components": [
{ "internalType": "uint8", "name": "v", "type": "uint8" },
{ "internalType": "bytes32", "name": "r", "type": "bytes32" },
{ "internalType": "bytes32", "name": "s", "type": "bytes32" }
]
},
{ "internalType": "uint128", "name": "repayAmount", "type": "uint128" },
{ "internalType": "uint128", "name": "collateralAmount", "type": "uint128" },
{
"internalType": "struct DLGTEv1.DelegationRequest[]",
"name": "delegationRequests",
"type": "tuple[]",
"components": [
{ "internalType": "address", "name": "delegate", "type": "address" },
{ "internalType": "int256", "name": "amount", "type": "int256" }
]
}
],
"stateMutability": "nonpayable",
"type": "function",
"name": "repayAndRemoveCollateral"
}
],
"devdoc": {
"kind": "dev",
"methods": {
"addCollateralAndBorrow((address,address,uint96,uint256,uint256),(uint8,bytes32,bytes32),uint128,uint128,(address,int256)[])": {
"details": "user must provide authorization signature before using function",
"params": {
"authorization": "authorization info",
"borrowAmount": "amount of USDS to borrow",
"collateralAmount": "amount of gOHM collateral to deposit",
"delegationRequests": "resulting collateral delegation",
"signature": "offchain auth signature"
}
},
"repayAndRemoveCollateral((address,address,uint96,uint256,uint256),(uint8,bytes32,bytes32),uint128,uint128,(address,int256)[])": {
"details": "user must provide authorization signature before using function",
"params": {
"authorization": "authorization info",
"collateralAmount": "amount of gOHM collateral to withdraw",
"delegationRequests": "resulting collateral delegation",
"repayAmount": "amount of USDS to repay",
"signature": "offchain auth signature"
}
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"addCollateralAndBorrow((address,address,uint96,uint256,uint256),(uint8,bytes32,bytes32),uint128,uint128,(address,int256)[])": {
"notice": "allow user to add collateral and borrow from Cooler V2"
},
"repayAndRemoveCollateral((address,address,uint96,uint256,uint256),(uint8,bytes32,bytes32),uint128,uint128,(address,int256)[])": {
"notice": "allow user to add collateral and borrow from Cooler V2"
}
},
"version": 1
}
}
Loading
Loading