Skip to content

Commit

Permalink
deployed group contract for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ethereumdegen committed Aug 28, 2024
1 parent 8176061 commit 18dcd34
Show file tree
Hide file tree
Showing 7 changed files with 1,205 additions and 96 deletions.
314 changes: 314 additions & 0 deletions packages/contracts/.openzeppelin/polygon.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@
"address": "0x0EfD3E33Ba2EdE028e50a3E7f81E084996d161aa",
"txHash": "0x720bd1cad23ecd8720865cdf5099e98988ba04579e76ef6d99dbf2204f82952c",
"kind": "transparent"
},
{
"address": "0x128BB34BBe1E9A6Ac07268dfA475459334500E89",
"txHash": "0x71e24542dbaf69a5884a954ce2f702ed1073ab05a461169494548f198105e3b0",
"kind": "transparent"
}
],
"impls": {
Expand Down Expand Up @@ -6444,6 +6449,315 @@
},
"namespaces": {}
}
},
"0c504fcdb20e30a9f838b26b776fdcea109768b11a6bba98f1ddf23edfaa8737": {
"address": "0xE9D02C0e0449A396A09A42fE03Ff06300C972Db5",
"txHash": "0xc8a77a053c63ff5683f3280bb207e43d83d9e1638aa86d25456edad0e44d9fa5",
"layout": {
"solcVersion": "0.8.9",
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67"
},
{
"label": "__gap",
"offset": 0,
"slot": "1",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"label": "_owner",
"offset": 0,
"slot": "51",
"type": "t_address",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
},
{
"label": "__gap",
"offset": 0,
"slot": "52",
"type": "t_array(t_uint256)49_storage",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94"
},
{
"label": "_paused",
"offset": 0,
"slot": "101",
"type": "t_bool",
"contract": "PausableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29"
},
{
"label": "__gap",
"offset": 0,
"slot": "102",
"type": "t_array(t_uint256)49_storage",
"contract": "PausableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116"
},
{
"label": "UNISWAP_V3_POOL",
"offset": 0,
"slot": "151",
"type": "t_address",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:86"
},
{
"label": "poolSharesToken",
"offset": 0,
"slot": "152",
"type": "t_contract(LenderCommitmentGroupShares)19934",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:88"
},
{
"label": "principalToken",
"offset": 0,
"slot": "153",
"type": "t_contract(IERC20)5810",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:90"
},
{
"label": "collateralToken",
"offset": 0,
"slot": "154",
"type": "t_contract(IERC20)5810",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:91"
},
{
"label": "uniswapPoolFee",
"offset": 20,
"slot": "154",
"type": "t_uint24",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:92"
},
{
"label": "marketId",
"offset": 0,
"slot": "155",
"type": "t_uint256",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:94"
},
{
"label": "totalPrincipalTokensCommitted",
"offset": 0,
"slot": "156",
"type": "t_uint256",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:97"
},
{
"label": "totalPrincipalTokensWithdrawn",
"offset": 0,
"slot": "157",
"type": "t_uint256",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:98"
},
{
"label": "totalPrincipalTokensLended",
"offset": 0,
"slot": "158",
"type": "t_uint256",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:100"
},
{
"label": "totalPrincipalTokensRepaid",
"offset": 0,
"slot": "159",
"type": "t_uint256",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:101"
},
{
"label": "totalInterestCollected",
"offset": 0,
"slot": "160",
"type": "t_uint256",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:105"
},
{
"label": "liquidityThresholdPercent",
"offset": 0,
"slot": "161",
"type": "t_uint16",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:107"
},
{
"label": "collateralRatio",
"offset": 2,
"slot": "161",
"type": "t_uint16",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:108"
},
{
"label": "twapInterval",
"offset": 4,
"slot": "161",
"type": "t_uint32",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:110"
},
{
"label": "maxLoanDuration",
"offset": 8,
"slot": "161",
"type": "t_uint32",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:111"
},
{
"label": "interestRateLowerBound",
"offset": 12,
"slot": "161",
"type": "t_uint16",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:112"
},
{
"label": "interestRateUpperBound",
"offset": 14,
"slot": "161",
"type": "t_uint16",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:113"
},
{
"label": "poolSharesPreparedToWithdrawForLender",
"offset": 0,
"slot": "162",
"type": "t_mapping(t_address,t_uint256)",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:118"
},
{
"label": "poolSharesPreparedTimestamp",
"offset": 0,
"slot": "163",
"type": "t_mapping(t_address,t_uint256)",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:119"
},
{
"label": "activeBids",
"offset": 0,
"slot": "164",
"type": "t_mapping(t_uint256,t_bool)",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:124"
},
{
"label": "tokenDifferenceFromLiquidations",
"offset": 0,
"slot": "165",
"type": "t_int256",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:128"
},
{
"label": "firstDepositMade",
"offset": 0,
"slot": "166",
"type": "t_bool",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:130"
},
{
"label": "withdrawlDelayTimeSeconds",
"offset": 0,
"slot": "167",
"type": "t_uint256",
"contract": "LenderCommitmentGroup_Smart",
"src": "contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol:131"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]",
"numberOfBytes": "1568"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]",
"numberOfBytes": "1600"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_contract(IERC20)5810": {
"label": "contract IERC20",
"numberOfBytes": "20"
},
"t_contract(LenderCommitmentGroupShares)19934": {
"label": "contract LenderCommitmentGroupShares",
"numberOfBytes": "20"
},
"t_int256": {
"label": "int256",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_uint256)": {
"label": "mapping(address => uint256)",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_bool)": {
"label": "mapping(uint256 => bool)",
"numberOfBytes": "32"
},
"t_uint16": {
"label": "uint16",
"numberOfBytes": "2"
},
"t_uint24": {
"label": "uint24",
"numberOfBytes": "3"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint32": {
"label": "uint32",
"numberOfBytes": "4"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
},
"namespaces": {}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ const deployFn: DeployFunction = async (hre) => {

//created pool https://sepolia.etherscan.io/tx/0x8ea20095c821f6066252457d7f0438030bc65bb441e1bea56c6ae0efd63016f0

const principalTokenAddress = '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359' //usdc
const collateralTokenAddress = '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619' //weth
const principalTokenAddress = '0x2791bca1f2de4661ed88a30c99a7a9449aa84174' //usdc
const collateralTokenAddress = '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270' //weth
const uniswapPoolFee = 500

const marketId = 44 //for polygon
const marketId = 46 //for polygon
const minInterestRate = 400
const maxInterestRate = 800
const maxLoanDuration = 10368000
Expand Down Expand Up @@ -85,4 +85,4 @@ deployFn.dependencies = [
deployFn.skip = async (hre) => {
return !hre.network.live || !['sepolia', 'polygon'].includes(hre.network.name)
}
export default deployFn
export default deployFn
Loading

0 comments on commit 18dcd34

Please sign in to comment.