Skip to content

Commit d808dca

Browse files
authored
Merge pull request #533 from VenusProtocol/feat/VEN-3260
[VEN-3260]: block rate update on BNB phase 2
2 parents ad8d2ab + a3bf295 commit d808dca

17 files changed

+1133
-382
lines changed

contracts/Shortfall/Shortfall.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// @notice SPDX-License-Identifier: BSD-3-Clause
1+
// SPDX-License-Identifier: BSD-3-Clause
22
pragma solidity 0.8.25;
33

44
import { Ownable2StepUpgradeable } from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol";

deploy/014-shortfall-Impl-protocolshare.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
2222
};
2323
func.tags = ["Shortfall-impl", "il"];
2424

25-
// RiskFund not deployed on these networks
26-
func.skip = async hre =>
27-
hre.getNetworkName() === "sepolia" ||
28-
hre.getNetworkName() === "opbnbtestnet" ||
29-
hre.getNetworkName() === "opbnbmainnet" ||
30-
hre.getNetworkName() === "ethereum";
25+
func.skip = async hre => hre.getNetworkName() !== "bscmainnet" && hre.getNetworkName() !== "bsctestnet";
3126

3227
export default func;

deployments/bscmainnet.json

Lines changed: 95 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23443,7 +23443,7 @@
2344323443
]
2344423444
},
2344523445
"PoolLens": {
23446-
"address": "0xA179d2f1Fd53D15Bc790bE91d5fF4a0108E29621",
23446+
"address": "0x59a96A6f463d57dA20bcc15359e55310D1CAD8B0",
2344723447
"abi": [
2344823448
{
2344923449
"inputs": [
@@ -53743,10 +53743,31 @@
5374353743
]
5374453744
},
5374553745
"Shortfall_Implementation": {
53746-
"address": "0x916e607AF3250ECB2Fd4ea82A37Eb2756A20e1fC",
53746+
"address": "0x4F41EcAce160f6ef893102D64f84E8040c06d8B0",
5374753747
"abi": [
5374853748
{
53749-
"inputs": [],
53749+
"inputs": [
53750+
{
53751+
"internalType": "bool",
53752+
"name": "timeBased_",
53753+
"type": "bool"
53754+
},
53755+
{
53756+
"internalType": "uint256",
53757+
"name": "blocksPerYear_",
53758+
"type": "uint256"
53759+
},
53760+
{
53761+
"internalType": "uint256",
53762+
"name": "nextBidderBlockOrTimestampLimit_",
53763+
"type": "uint256"
53764+
},
53765+
{
53766+
"internalType": "uint256",
53767+
"name": "waitForFirstBidder_",
53768+
"type": "uint256"
53769+
}
53770+
],
5375053771
"stateMutability": "nonpayable",
5375153772
"type": "constructor"
5375253773
},
@@ -53802,6 +53823,16 @@
5380253823
"name": "InsufficientDebt",
5380353824
"type": "error"
5380453825
},
53826+
{
53827+
"inputs": [],
53828+
"name": "InvalidBlocksPerYear",
53829+
"type": "error"
53830+
},
53831+
{
53832+
"inputs": [],
53833+
"name": "InvalidTimeBasedConfiguration",
53834+
"type": "error"
53835+
},
5380553836
{
5380653837
"inputs": [
5380753838
{
@@ -53828,6 +53859,11 @@
5382853859
"name": "ZeroAddressNotAllowed",
5382953860
"type": "error"
5383053861
},
53862+
{
53863+
"inputs": [],
53864+
"name": "ZeroValueNotAllowed",
53865+
"type": "error"
53866+
},
5383153867
{
5383253868
"anonymous": false,
5383353869
"inputs": [
@@ -53840,7 +53876,7 @@
5384053876
{
5384153877
"indexed": false,
5384253878
"internalType": "uint256",
53843-
"name": "auctionStartBlock",
53879+
"name": "auctionStartBlockOrTimestamp",
5384453880
"type": "uint256"
5384553881
},
5384653882
{
@@ -53889,7 +53925,7 @@
5388953925
{
5389053926
"indexed": false,
5389153927
"internalType": "uint256",
53892-
"name": "auctionStartBlock",
53928+
"name": "auctionStartBlockOrTimestamp",
5389353929
"type": "uint256"
5389453930
}
5389553931
],
@@ -53908,12 +53944,12 @@
5390853944
{
5390953945
"indexed": false,
5391053946
"internalType": "uint256",
53911-
"name": "auctionStartBlock",
53947+
"name": "auctionStartBlockOrTimestamp",
5391253948
"type": "uint256"
5391353949
},
5391453950
{
5391553951
"indexed": false,
53916-
"internalType": "enum Shortfall.AuctionType",
53952+
"internalType": "enum ShortfallStorage.AuctionType",
5391753953
"name": "auctionType",
5391853954
"type": "uint8"
5391953955
},
@@ -53983,7 +54019,7 @@
5398354019
{
5398454020
"indexed": false,
5398554021
"internalType": "uint256",
53986-
"name": "auctionStartBlock",
54022+
"name": "auctionStartBlockOrTimestamp",
5398754023
"type": "uint256"
5398854024
},
5398954025
{
@@ -54078,13 +54114,13 @@
5407854114
{
5407954115
"indexed": false,
5408054116
"internalType": "uint256",
54081-
"name": "oldNextBidderBlockLimit",
54117+
"name": "oldNextBidderBlockOrTimestampLimit",
5408254118
"type": "uint256"
5408354119
},
5408454120
{
5408554121
"indexed": false,
5408654122
"internalType": "uint256",
54087-
"name": "newNextBidderBlockLimit",
54123+
"name": "newNextBidderBlockOrTimestampLimit",
5408854124
"type": "uint256"
5408954125
}
5409054126
],
@@ -54249,16 +54285,16 @@
5424954285
"outputs": [
5425054286
{
5425154287
"internalType": "uint256",
54252-
"name": "startBlock",
54288+
"name": "startBlockOrTimestamp",
5425354289
"type": "uint256"
5425454290
},
5425554291
{
54256-
"internalType": "enum Shortfall.AuctionType",
54292+
"internalType": "enum ShortfallStorage.AuctionType",
5425754293
"name": "auctionType",
5425854294
"type": "uint8"
5425954295
},
5426054296
{
54261-
"internalType": "enum Shortfall.AuctionStatus",
54297+
"internalType": "enum ShortfallStorage.AuctionStatus",
5426254298
"name": "status",
5426354299
"type": "uint8"
5426454300
},
@@ -54279,7 +54315,7 @@
5427954315
},
5428054316
{
5428154317
"internalType": "uint256",
54282-
"name": "highestBidBlock",
54318+
"name": "highestBidBlockOrTimestamp",
5428354319
"type": "uint256"
5428454320
},
5428554321
{
@@ -54304,6 +54340,19 @@
5430454340
"stateMutability": "view",
5430554341
"type": "function"
5430654342
},
54343+
{
54344+
"inputs": [],
54345+
"name": "blocksOrSecondsPerYear",
54346+
"outputs": [
54347+
{
54348+
"internalType": "uint256",
54349+
"name": "",
54350+
"type": "uint256"
54351+
}
54352+
],
54353+
"stateMutability": "view",
54354+
"type": "function"
54355+
},
5430754356
{
5430854357
"inputs": [
5430954358
{
@@ -54335,6 +54384,19 @@
5433554384
"stateMutability": "nonpayable",
5433654385
"type": "function"
5433754386
},
54387+
{
54388+
"inputs": [],
54389+
"name": "getBlockNumberOrTimestamp",
54390+
"outputs": [
54391+
{
54392+
"internalType": "uint256",
54393+
"name": "",
54394+
"type": "uint256"
54395+
}
54396+
],
54397+
"stateMutability": "view",
54398+
"type": "function"
54399+
},
5433854400
{
5433954401
"inputs": [],
5434054402
"name": "incentiveBps",
@@ -54371,6 +54433,19 @@
5437154433
"stateMutability": "nonpayable",
5437254434
"type": "function"
5437354435
},
54436+
{
54437+
"inputs": [],
54438+
"name": "isTimeBased",
54439+
"outputs": [
54440+
{
54441+
"internalType": "bool",
54442+
"name": "",
54443+
"type": "bool"
54444+
}
54445+
],
54446+
"stateMutability": "view",
54447+
"type": "function"
54448+
},
5437454449
{
5437554450
"inputs": [],
5437654451
"name": "minimumPoolBadDebt",
@@ -54444,7 +54519,7 @@
5444454519
},
5444554520
{
5444654521
"internalType": "uint256",
54447-
"name": "auctionStartBlock",
54522+
"name": "auctionStartBlockOrTimestamp",
5444854523
"type": "uint256"
5444954524
}
5445054525
],
@@ -54592,7 +54667,7 @@
5459254667
"inputs": [
5459354668
{
5459454669
"internalType": "uint256",
54595-
"name": "_incentiveBps",
54670+
"name": "incentiveBps_",
5459654671
"type": "uint256"
5459754672
}
5459854673
],
@@ -54605,7 +54680,7 @@
5460554680
"inputs": [
5460654681
{
5460754682
"internalType": "uint256",
54608-
"name": "_minimumPoolBadDebt",
54683+
"name": "minimumPoolBadDebt_",
5460954684
"type": "uint256"
5461054685
}
5461154686
],
@@ -54618,7 +54693,7 @@
5461854693
"inputs": [
5461954694
{
5462054695
"internalType": "uint256",
54621-
"name": "_nextBidderBlockLimit",
54696+
"name": "nextBidderBlockOrTimestampLimit_",
5462254697
"type": "uint256"
5462354698
}
5462454699
],
@@ -54644,7 +54719,7 @@
5464454719
"inputs": [
5464554720
{
5464654721
"internalType": "uint256",
54647-
"name": "_waitForFirstBidder",
54722+
"name": "waitForFirstBidder_",
5464854723
"type": "uint256"
5464954724
}
5465054725
],
@@ -68525,7 +68600,7 @@
6852568600
]
6852668601
},
6852768602
"VTokenImpl": {
68528-
"address": "0x2c36397dF3BC5Ea9CD710eEe273006Ab9D1ECAd4",
68603+
"address": "0x228Ea224d62D14a2e2cb9B43083aE43954C39B67",
6852968604
"abi": [
6853068605
{
6853168606
"inputs": [

deployments/bscmainnet/PoolLens.json

Lines changed: 10 additions & 10 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)