Skip to content

Commit

Permalink
Merge pull request #30 from foilxyz/optimize-epoch
Browse files Browse the repository at this point in the history
optimize epoch
  • Loading branch information
leomassazza authored Aug 13, 2024
2 parents 312cdb1 + d15f3e3 commit b62e1da
Show file tree
Hide file tree
Showing 48 changed files with 1,841 additions and 1,235 deletions.
2 changes: 1 addition & 1 deletion packages/protocol/deployments/BondCurrency.Token.json
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
"linkedLibraries": {},
"deployTxnHash": "0x12ee0b194db4db0157edc1ecd4711e1b128110b845c2232c6b427b5749ddc7a5",
"deployTxnBlockNumber": "2",
"deployTimestamp": "1722798325",
"deployTimestamp": "1723484481",
"sourceName": "src/MintableTokenPermissionlessMint.sol",
"contractName": "MintableTokenPermissionlessMint",
"deployedOn": "contract.Token",
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/deployments/CollateralAsset.Token.json
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
"linkedLibraries": {},
"deployTxnHash": "0x6add4be37a653aaf5ba967fc8163d59e33e29d487ad632af66209495e5d42051",
"deployTxnBlockNumber": "2",
"deployTimestamp": "1722798325",
"deployTimestamp": "1723484481",
"sourceName": "src/MintableTokenPermissionlessMint.sol",
"contractName": "MintableTokenPermissionlessMint",
"deployedOn": "contract.Token",
Expand Down
230 changes: 28 additions & 202 deletions packages/protocol/deployments/EpochConfigurationModule.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"address": "0x6E3BB76f9994427aC4B2A02FAd946B9b155aF977",
"address": "0x00060724808860f78d8b9c794DACEc17BC8a47e9",
"abi": [
{
"type": "function",
Expand All @@ -24,201 +24,6 @@
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "getAccountData",
"inputs": [
{
"name": "accountId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "tuple",
"internalType": "struct FAccount.Data",
"components": [
{
"name": "tokenId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "collateralAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "borrowedGwei",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "borrowedGas",
"type": "uint256",
"internalType": "uint256"
}
]
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "getEpoch",
"inputs": [],
"outputs": [
{
"name": "startTime",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "endTime",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "pool",
"type": "address",
"internalType": "address"
},
{
"name": "ethToken",
"type": "address",
"internalType": "address"
},
{
"name": "gasToken",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getMarket",
"inputs": [],
"outputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
},
{
"name": "collateralAsset",
"type": "address",
"internalType": "address"
},
{
"name": "uniswapPositionManager",
"type": "address",
"internalType": "address"
},
{
"name": "uniswapQuoter",
"type": "address",
"internalType": "address"
},
{
"name": "uniswapSwapRouter",
"type": "address",
"internalType": "address"
},
{
"name": "optimisticOracleV3",
"type": "address",
"internalType": "address"
},
{
"name": "epochParams",
"type": "tuple",
"internalType": "struct Market.EpochParams",
"components": [
{
"name": "baseAssetMinPriceTick",
"type": "int24",
"internalType": "int24"
},
{
"name": "baseAssetMaxPriceTick",
"type": "int24",
"internalType": "int24"
},
{
"name": "feeRate",
"type": "uint24",
"internalType": "uint24"
},
{
"name": "assertionLiveness",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "bondCurrency",
"type": "address",
"internalType": "address"
},
{
"name": "bondAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "priceUnit",
"type": "bytes32",
"internalType": "bytes32"
}
]
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getPositionData",
"inputs": [
{
"name": "accountId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "tuple",
"internalType": "struct Position.Data",
"components": [
{
"name": "accountId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "vEthAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "vGasAmount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "currentTokenAmount",
"type": "int256",
"internalType": "int256"
}
]
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "initializeMarket",
Expand Down Expand Up @@ -256,7 +61,7 @@
{
"name": "epochParams",
"type": "tuple",
"internalType": "struct Market.EpochParams",
"internalType": "struct IFoilStructs.EpochParams",
"components": [
{
"name": "baseAssetMinPriceTick",
Expand Down Expand Up @@ -331,7 +136,7 @@
{
"name": "epochParms",
"type": "tuple",
"internalType": "struct Market.EpochParams",
"internalType": "struct IFoilStructs.EpochParams",
"components": [
{
"name": "baseAssetMinPriceTick",
Expand Down Expand Up @@ -379,6 +184,17 @@
"name": "EpochAlreadyStarted",
"inputs": []
},
{
"type": "error",
"name": "InvalidData",
"inputs": [
{
"name": "message",
"type": "string",
"internalType": "string"
}
]
},
{
"type": "error",
"name": "InvalidMarket",
Expand All @@ -389,6 +205,16 @@
"name": "MarketAlreadyCreated",
"inputs": []
},
{
"type": "error",
"name": "MarketNotInitialized",
"inputs": []
},
{
"type": "error",
"name": "OnlyOwner",
"inputs": []
},
{
"type": "error",
"name": "OverflowInt24ToUint256",
Expand All @@ -407,12 +233,12 @@
],
"constructorArgs": [],
"linkedLibraries": {},
"deployTxnHash": "0xecb1c4b1248d5ca55e59d6e5a1d336e10ecca04c4db705656a025335e34eb472",
"deployTxnHash": "0xeaa6aa4155fd89e0edd2ed87217d59ef4335035edf28c4bf2a946249d6d36e31",
"deployTxnBlockNumber": "3",
"deployTimestamp": "1722798191",
"deployTimestamp": "1723484429",
"sourceName": "src/contracts/modules/EpochConfigurationModule.sol",
"contractName": "EpochConfigurationModule",
"deployedOn": "deploy.EpochConfigurationModule",
"gasUsed": 2257070,
"gasCost": "1004662731"
"gasUsed": 2016415,
"gasCost": "1005326146"
}
Loading

0 comments on commit b62e1da

Please sign in to comment.