From f5ffb2f7132a78c1f386b5d3d5eef12260363b54 Mon Sep 17 00:00:00 2001 From: nourharidy Date: Tue, 28 Oct 2025 09:31:35 +0300 Subject: [PATCH 01/11] fix reserve setters --- src/Auction.sol | 10 ++++++---- test/Auction.t.sol | 30 ++++++++++++++++++++++++------ 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/Auction.sol b/src/Auction.sol index c65c7ba..2922215 100644 --- a/src/Auction.sol +++ b/src/Auction.sol @@ -99,16 +99,18 @@ contract Auction { function setDolaReserve(uint _dolaReserve) external onlyGov updateReserves { require(_dolaReserve > 0, "Dola reserve must be positive"); - uint K = dolaReserve * dbrReserve; + uint newDbrReserve = _dolaReserve * dbrReserve / dolaReserve; + require(newDbrReserve > 0, "Resulting DBR reserve must be positive"); dolaReserve = _dolaReserve; - dbrReserve = K / _dolaReserve; + dbrReserve = newDbrReserve; } function setDbrReserve(uint _dbrReserve) external onlyGov updateReserves { require(_dbrReserve > 0, "DBR reserve must be positive"); - uint K = dolaReserve * dbrReserve; + uint newDolaReserve = _dbrReserve * dolaReserve / dbrReserve; + require(newDolaReserve > 0, "Resulting DOLA reserve must be positive"); dbrReserve = _dbrReserve; - dolaReserve = K / _dbrReserve; + dolaReserve = newDolaReserve; } function overrideReserves(uint _dbrReserve, uint _dolaReserve) external onlyGov { diff --git a/test/Auction.t.sol b/test/Auction.t.sol index 8ba2f3c..6db961e 100644 --- a/test/Auction.t.sol +++ b/test/Auction.t.sol @@ -124,9 +124,18 @@ contract AuctionTest is Test { vm.startPrank(gov); vm.expectRevert("Dola reserve must be positive"); auction.setDolaReserve(0); - auction.setDolaReserve(1e19); - assertEq(auction.dolaReserve(), 1e19); - assertEq(auction.dbrReserve(), 1e17); + uint oldDolaReserve = auction.dolaReserve(); + uint oldDbrReserve = auction.dbrReserve(); + uint ratioMantissaBefore = oldDbrReserve * 1e18 / oldDolaReserve; + uint newDolaReserve = 1e19; + uint expectedDbrReserve = newDolaReserve * oldDbrReserve / oldDolaReserve; + auction.setDolaReserve(newDolaReserve); + uint updatedDolaReserve = auction.dolaReserve(); + uint updatedDbrReserve = auction.dbrReserve(); + assertEq(updatedDolaReserve, newDolaReserve); + assertEq(updatedDbrReserve, expectedDbrReserve); + uint ratioMantissaAfter = updatedDbrReserve * 1e18 / updatedDolaReserve; + assertEq(ratioMantissaAfter, ratioMantissaBefore); } function test_setDbrReserve() public { @@ -135,9 +144,18 @@ contract AuctionTest is Test { vm.startPrank(gov); vm.expectRevert("DBR reserve must be positive"); auction.setDbrReserve(0); - auction.setDbrReserve(1e19); - assertEq(auction.dolaReserve(), 1e17); - assertEq(auction.dbrReserve(), 1e19); + uint oldDolaReserve = auction.dolaReserve(); + uint oldDbrReserve = auction.dbrReserve(); + uint ratioMantissaBefore = oldDbrReserve * 1e18 / oldDolaReserve; + uint newDbrReserve = 1e19; + uint expectedDolaReserve = newDbrReserve * oldDolaReserve / oldDbrReserve; + auction.setDbrReserve(newDbrReserve); + uint updatedDbrReserve = auction.dbrReserve(); + uint updatedDolaReserve = auction.dolaReserve(); + assertEq(updatedDbrReserve, newDbrReserve); + assertEq(updatedDolaReserve, expectedDolaReserve); + uint ratioMantissaAfter = updatedDbrReserve * 1e18 / updatedDolaReserve; + assertEq(ratioMantissaAfter, ratioMantissaBefore); } function test_overrideReserves() public { From 06902a6072a72cbfc8cd8337ded11e4f8f287794 Mon Sep 17 00:00:00 2001 From: nourharidy Date: Tue, 28 Oct 2025 09:42:35 +0300 Subject: [PATCH 02/11] rename dola to asset --- ...yer.s.sol => AuctionMainnetDeployer.s.sol} | 27 ++--- .../DolaSaleHandlerMainnetDeployer.s copy.sol | 28 +++++ src/Auction.sol | 64 +++++------ src/{SaleHandler.sol => DolaSaleHandler.sol} | 14 +-- src/Helper.sol | 48 ++++---- test/Auction.t.sol | 108 +++++++++--------- ...aleHandler.t.sol => DolaSaleHandler.t.sol} | 20 ++-- test/Helper.t.sol | 64 +++++------ 8 files changed, 195 insertions(+), 178 deletions(-) rename script/{MainnetDeployer.s.sol => AuctionMainnetDeployer.s.sol} (51%) create mode 100644 script/DolaSaleHandlerMainnetDeployer.s copy.sol rename src/{SaleHandler.sol => DolaSaleHandler.sol} (82%) rename test/{SaleHandler.t.sol => DolaSaleHandler.t.sol} (82%) diff --git a/script/MainnetDeployer.s.sol b/script/AuctionMainnetDeployer.s.sol similarity index 51% rename from script/MainnetDeployer.s.sol rename to script/AuctionMainnetDeployer.s.sol index b89c50e..7df386d 100644 --- a/script/MainnetDeployer.s.sol +++ b/script/AuctionMainnetDeployer.s.sol @@ -2,11 +2,10 @@ pragma solidity 0.8.21; import {Script, console2} from "forge-std/Script.sol"; -import {SaleHandler} from "../src/SaleHandler.sol"; import {Auction} from "../src/Auction.sol"; import {Helper} from "../src/Helper.sol"; -contract MainnetDeployerScript is Script { +contract AuctionMainnetDeployerScript is Script { function setUp() public {} function run() public { @@ -14,36 +13,26 @@ contract MainnetDeployerScript is Script { address gov = 0x926dF14a23BE491164dCF93f4c468A50ef659D5B; address fedChair = 0x8F97cCA30Dbe80e7a8B462F1dD1a51C32accDfC8; - address anDola = 0x7Fcb7DAC61eE35b3D4a51117A7c58D53f0a8a670; - address dola = 0x865377367054516e17014CcdED1e7d814EDC9ce4; + address asset = 0x865377367054516e17014CcdED1e7d814EDC9ce4; address dbr = 0xAD038Eb671c44b853887A7E32528FaB35dC5D710; - address borrower1 = 0xf508c58ce37ce40a40997C715075172691F92e2D; - address borrower2 = 0xeA0c959BBb7476DDD6cD4204bDee82b790AA1562; // 5:1 ratio, implying a 20c DBR starting price - uint dolaReserve = 500_000 * 1e18; - uint dbrReserve = dolaReserve * 5; - - SaleHandler handler = new SaleHandler( - dola, - anDola, - borrower1, - borrower2 - ); + uint assetReserve = 500_000 * 1e18; + uint dbrReserve = assetReserve * 5; Auction auction = new Auction( gov, fedChair, dbr, - dola, - address(handler), - dolaReserve, + asset, + address(0), + assetReserve, dbrReserve ); new Helper( address(auction), - address(dola) + address(asset) ); } } diff --git a/script/DolaSaleHandlerMainnetDeployer.s copy.sol b/script/DolaSaleHandlerMainnetDeployer.s copy.sol new file mode 100644 index 0000000..1a4cf2c --- /dev/null +++ b/script/DolaSaleHandlerMainnetDeployer.s copy.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity 0.8.21; + +import {Script, console2} from "forge-std/Script.sol"; +import {DolaSaleHandler} from "../src/DolaSaleHandler.sol"; +import {Auction} from "../src/Auction.sol"; +import {Helper} from "../src/Helper.sol"; + +contract DolaSaleHandlerMainnetDeployerScript is Script { + function setUp() public {} + + function run() public { + vm.startBroadcast(); + + address anDola = 0x7Fcb7DAC61eE35b3D4a51117A7c58D53f0a8a670; + address asset = 0x865377367054516e17014CcdED1e7d814EDC9ce4; + address borrower1 = 0xf508c58ce37ce40a40997C715075172691F92e2D; + address borrower2 = 0xeA0c959BBb7476DDD6cD4204bDee82b790AA1562; + + DolaSaleHandler handler = new DolaSaleHandler( + asset, + anDola, + borrower1, + borrower2 + ); + + } +} diff --git a/src/Auction.sol b/src/Auction.sol index 2922215..fa1f340 100644 --- a/src/Auction.sol +++ b/src/Auction.sol @@ -21,9 +21,9 @@ contract Auction { address public gov; address public operator; IDBR public immutable dbr; - IERC20 public immutable dola; + IERC20 public immutable asset; ISaleHandler public saleHandler; - uint public dolaReserve; + uint public assetReserve; uint public dbrReserve; uint public dbrRatePerYear; uint public maxDbrRatePerYear; @@ -33,24 +33,24 @@ contract Auction { address _gov, address _operator, address _dbr, - address _dola, + address _asset, address handler, - uint _dolaReserve, + uint _assetReserve, uint _dbrReserve ) { - require(_dolaReserve > 0, "Dola reserve must be positive"); + require(_assetReserve > 0, "Asset reserve must be positive"); require(_dbrReserve > 0, "DBR reserve must be positive"); gov = _gov; operator = _operator; dbr = IDBR(_dbr); - dola = IERC20(_dola); + asset = IERC20(_asset); saleHandler = ISaleHandler(handler); - dolaReserve = _dolaReserve; + assetReserve = _assetReserve; dbrReserve = _dbrReserve; } modifier updateReserves { - (dolaReserve, dbrReserve) = getCurrentReserves(); + (assetReserve, dbrReserve) = getCurrentReserves(); lastUpdate = block.timestamp; _; } @@ -65,15 +65,15 @@ contract Auction { _; } - function getCurrentReserves() public view returns (uint _dolaReserve, uint _dbrReserve) { + function getCurrentReserves() public view returns (uint _assetReserve, uint _dbrReserve) { uint timeElapsed = block.timestamp - lastUpdate; if(timeElapsed > 0) { - uint K = dolaReserve * dbrReserve; + uint K = assetReserve * dbrReserve; uint DbrsIn = timeElapsed * dbrRatePerYear / 365 days; _dbrReserve = dbrReserve + DbrsIn; - _dolaReserve = K / _dbrReserve; + _assetReserve = K / _dbrReserve; } else { - _dolaReserve = dolaReserve; + _assetReserve = assetReserve; _dbrReserve = dbrReserve; } } @@ -97,47 +97,47 @@ contract Auction { emit RateUpdate(_rate); } - function setDolaReserve(uint _dolaReserve) external onlyGov updateReserves { - require(_dolaReserve > 0, "Dola reserve must be positive"); - uint newDbrReserve = _dolaReserve * dbrReserve / dolaReserve; + function setAssetReserve(uint _assetReserve) external onlyGov updateReserves { + require(_assetReserve > 0, "Asset reserve must be positive"); + uint newDbrReserve = _assetReserve * dbrReserve / assetReserve; require(newDbrReserve > 0, "Resulting DBR reserve must be positive"); - dolaReserve = _dolaReserve; + assetReserve = _assetReserve; dbrReserve = newDbrReserve; } function setDbrReserve(uint _dbrReserve) external onlyGov updateReserves { require(_dbrReserve > 0, "DBR reserve must be positive"); - uint newDolaReserve = _dbrReserve * dolaReserve / dbrReserve; - require(newDolaReserve > 0, "Resulting DOLA reserve must be positive"); + uint newAssetReserve = _dbrReserve * assetReserve / dbrReserve; + require(newAssetReserve > 0, "Resulting asset reserve must be positive"); dbrReserve = _dbrReserve; - dolaReserve = newDolaReserve; + assetReserve = newAssetReserve; } - function overrideReserves(uint _dbrReserve, uint _dolaReserve) external onlyGov { - require(_dolaReserve > 0, "Dola reserve must be positive"); + function overrideReserves(uint _dbrReserve, uint _assetReserve) external onlyGov { + require(_assetReserve > 0, "Asset reserve must be positive"); require(_dbrReserve > 0, "DBR reserve must be positive"); - dolaReserve = _dolaReserve; + assetReserve = _assetReserve; dbrReserve = _dbrReserve; lastUpdate = block.timestamp; } - function buyDBR(uint exactDolaIn, uint exactDbrOut, address to) external updateReserves { - uint K = dolaReserve * dbrReserve; - dolaReserve += exactDolaIn; + function buyDBR(uint exactAssetIn, uint exactDbrOut, address to) external updateReserves { + uint K = assetReserve * dbrReserve; + assetReserve += exactAssetIn; dbrReserve -= exactDbrOut; - require(dolaReserve * dbrReserve >= K, "Invariant"); - dola.transferFrom(msg.sender, address(this), exactDolaIn); + require(assetReserve * dbrReserve >= K, "Invariant"); + asset.transferFrom(msg.sender, address(this), exactAssetIn); dbr.mint(to, exactDbrOut); - emit Buy(msg.sender, to, exactDolaIn, exactDbrOut); + emit Buy(msg.sender, to, exactAssetIn, exactDbrOut); } function sendToSaleHandler() public { require(address(saleHandler) != address(0), "No sale handler"); - uint bal = dola.balanceOf(address(this)); - require(bal > 0, "No DOLA to send"); + uint bal = asset.balanceOf(address(this)); + require(bal > 0, "No asset to send"); uint capacity = saleHandler.getCapacity(); uint amount = bal > capacity ? capacity : bal; - dola.transfer(address(saleHandler), amount); + asset.transfer(address(saleHandler), amount); saleHandler.onReceive(); } @@ -145,7 +145,7 @@ contract Auction { IERC20(token).transfer(destination, amount); } - event Buy(address indexed caller, address indexed to, uint dolaIn, uint dbrOut); + event Buy(address indexed caller, address indexed to, uint assetIn, uint dbrOut); event RateUpdate(uint newRate); event MaxRateUpdate(uint newMaxRate); } diff --git a/src/SaleHandler.sol b/src/DolaSaleHandler.sol similarity index 82% rename from src/SaleHandler.sol rename to src/DolaSaleHandler.sol index 9e124f3..2b5524f 100644 --- a/src/SaleHandler.sol +++ b/src/DolaSaleHandler.sol @@ -11,28 +11,28 @@ interface IAnDola { function borrowBalanceStored(address account) external view returns (uint); // stored is good enough for our use case } -contract SaleHandler { +contract DolaSaleHandler { - IERC20 public immutable dola; + IERC20 public immutable asset; IAnDola public immutable anDola; address public immutable borrower1; address public immutable borrower2; constructor( - address _dola, + address _asset, address _anDola, address _borrower1, address _borrower2 ) { - dola = IERC20(_dola); + asset = IERC20(_asset); anDola = IAnDola(_anDola); borrower1 = _borrower1; borrower2 = _borrower2; - dola.approve(_anDola,type(uint).max); + asset.approve(_anDola,type(uint).max); } function onReceive() external { - uint bal = dola.balanceOf(address(this)); + uint bal = asset.balanceOf(address(this)); uint debt1 = getDebtOf(borrower1); uint debt2 = getDebtOf(borrower2); if(debt1 > debt2) { @@ -49,7 +49,7 @@ contract SaleHandler { } function getCapacity() external view returns (uint) { - return getDebtOf(borrower1) + getDebtOf(borrower2) - dola.balanceOf(address(this)); + return getDebtOf(borrower1) + getDebtOf(borrower2) - asset.balanceOf(address(this)); } } \ No newline at end of file diff --git a/src/Helper.sol b/src/Helper.sol index f80e114..e56323b 100644 --- a/src/Helper.sol +++ b/src/Helper.sol @@ -2,8 +2,8 @@ pragma solidity 0.8.21; interface IAuction { - function getCurrentReserves() external view returns (uint dolaReserve, uint dbrReserve); - function buyDBR(uint exactDolaIn, uint exactDbrOut, address to) external; + function getCurrentReserves() external view returns (uint assetReserve, uint dbrReserve); + function buyDBR(uint exactAssetIn, uint exactDbrOut, address to) external; } interface IERC20 { @@ -14,45 +14,45 @@ interface IERC20 { contract Helper { IAuction public immutable auction; - IERC20 public immutable dola; + IERC20 public immutable asset; constructor( address _auction, - address _dola + address _asset ) { auction = IAuction(_auction); - dola = IERC20(_dola); - dola.approve(_auction, type(uint).max); + asset = IERC20(_asset); + asset.approve(_auction, type(uint).max); } - function getDbrOut(uint dolaIn) public view returns (uint dbrOut) { - require(dolaIn > 0, "dolaIn must be positive"); - (uint dolaReserve, uint dbrReserve) = auction.getCurrentReserves(); - uint numerator = dolaIn * dbrReserve; - uint denominator = dolaReserve + dolaIn; + function getDbrOut(uint assetIn) public view returns (uint dbrOut) { + require(assetIn > 0, "assetIn must be positive"); + (uint assetReserve, uint dbrReserve) = auction.getCurrentReserves(); + uint numerator = assetIn * dbrReserve; + uint denominator = assetReserve + assetIn; dbrOut = numerator / denominator; } - function getDolaIn(uint dbrOut) public view returns (uint dolaIn) { + function getAssetIn(uint dbrOut) public view returns (uint assetIn) { require(dbrOut > 0, "dbrOut must be positive"); - (uint dolaReserve, uint dbrReserve) = auction.getCurrentReserves(); - uint numerator = dbrOut * dolaReserve; + (uint assetReserve, uint dbrReserve) = auction.getCurrentReserves(); + uint numerator = dbrOut * assetReserve; uint denominator = dbrReserve - dbrOut; - dolaIn = (numerator / denominator) + 1; + assetIn = (numerator / denominator) + 1; } - function swapExactDolaForDbr(uint dolaIn, uint dbrOutMin) external returns (uint dbrOut) { - dbrOut = getDbrOut(dolaIn); + function swapExactAssetForDbr(uint assetIn, uint dbrOutMin) external returns (uint dbrOut) { + dbrOut = getDbrOut(assetIn); require(dbrOut >= dbrOutMin, "dbrOut must be greater than dbrOutMin"); - dola.transferFrom(msg.sender, address(this), dolaIn); - auction.buyDBR(dolaIn, dbrOut, msg.sender); + asset.transferFrom(msg.sender, address(this), assetIn); + auction.buyDBR(assetIn, dbrOut, msg.sender); } - function swapDolaForExactDbr(uint dbrOut, uint dolaInMax) external returns (uint dolaIn) { - dolaIn = getDolaIn(dbrOut); - require(dolaIn <= dolaInMax, "dolaIn must be less than dolaInMax"); - dola.transferFrom(msg.sender, address(this), dolaIn); - auction.buyDBR(dolaIn, dbrOut, msg.sender); + function swapAssetForExactDbr(uint dbrOut, uint assetInMax) external returns (uint assetIn) { + assetIn = getAssetIn(dbrOut); + require(assetIn <= assetInMax, "assetIn must be less than assetInMax"); + asset.transferFrom(msg.sender, address(this), assetIn); + auction.buyDBR(assetIn, dbrOut, msg.sender); } } \ No newline at end of file diff --git a/test/Auction.t.sol b/test/Auction.t.sol index 6db961e..952c07a 100644 --- a/test/Auction.t.sol +++ b/test/Auction.t.sol @@ -23,17 +23,17 @@ contract AuctionTest is Test { address gov = address(1); address operator = address(2); ERC20 dbr; - ERC20 dola; + ERC20 asset; Auction auction; function setUp() public { dbr = new ERC20(); - dola = new ERC20(); + asset = new ERC20(); auction = new Auction( gov, operator, address(dbr), - address(dola), + address(asset), address(0), 1e18, 1e18 @@ -44,25 +44,25 @@ contract AuctionTest is Test { assertEq(auction.gov(), gov); assertEq(auction.operator(), operator); assertEq(address(auction.dbr()), address(dbr)); - assertEq(address(auction.dola()), address(dola)); - assertEq(auction.dolaReserve(), 1e18); + assertEq(address(auction.asset()), address(asset)); + assertEq(auction.assetReserve(), 1e18); assertEq(auction.dbrReserve(), 1e18); } function test_getCurrentReserves() public { - (uint _dolaReserve, uint _dbrReserve) = auction.getCurrentReserves(); - assertEq(_dolaReserve, 1e18); + (uint _assetReserve, uint _dbrReserve) = auction.getCurrentReserves(); + assertEq(_assetReserve, 1e18); assertEq(_dbrReserve, 1e18); vm.prank(gov); auction.setMaxDbrRatePerYear(1e18); vm.prank(gov); auction.setDbrRatePerYear(1e18); - (_dolaReserve, _dbrReserve) = auction.getCurrentReserves(); - assertEq(_dolaReserve, 1e18); + (_assetReserve, _dbrReserve) = auction.getCurrentReserves(); + assertEq(_assetReserve, 1e18); assertEq(_dbrReserve, 1e18); vm.warp(block.timestamp + 365 days); - (_dolaReserve, _dbrReserve) = auction.getCurrentReserves(); - assertApproxEqAbs(_dolaReserve, 0.5e18, 1e7); + (_assetReserve, _dbrReserve) = auction.getCurrentReserves(); + assertApproxEqAbs(_assetReserve, 0.5e18, 1e7); assertApproxEqAbs(_dbrReserve, 2 * 1e18, 1e8); } @@ -118,23 +118,23 @@ contract AuctionTest is Test { assertEq(auction.dbrRatePerYear(), 0); } - function test_setDolaReserve() public { + function test_setAssetReserve() public { vm.expectRevert("onlyGov"); - auction.setDolaReserve(1e19); + auction.setAssetReserve(1e19); vm.startPrank(gov); - vm.expectRevert("Dola reserve must be positive"); - auction.setDolaReserve(0); - uint oldDolaReserve = auction.dolaReserve(); + vm.expectRevert("Asset reserve must be positive"); + auction.setAssetReserve(0); + uint oldAssetReserve = auction.assetReserve(); uint oldDbrReserve = auction.dbrReserve(); - uint ratioMantissaBefore = oldDbrReserve * 1e18 / oldDolaReserve; - uint newDolaReserve = 1e19; - uint expectedDbrReserve = newDolaReserve * oldDbrReserve / oldDolaReserve; - auction.setDolaReserve(newDolaReserve); - uint updatedDolaReserve = auction.dolaReserve(); + uint ratioMantissaBefore = oldDbrReserve * 1e18 / oldAssetReserve; + uint newAssetReserve = 1e19; + uint expectedDbrReserve = newAssetReserve * oldDbrReserve / oldAssetReserve; + auction.setAssetReserve(newAssetReserve); + uint updatedAssetReserve = auction.assetReserve(); uint updatedDbrReserve = auction.dbrReserve(); - assertEq(updatedDolaReserve, newDolaReserve); + assertEq(updatedAssetReserve, newAssetReserve); assertEq(updatedDbrReserve, expectedDbrReserve); - uint ratioMantissaAfter = updatedDbrReserve * 1e18 / updatedDolaReserve; + uint ratioMantissaAfter = updatedDbrReserve * 1e18 / updatedAssetReserve; assertEq(ratioMantissaAfter, ratioMantissaBefore); } @@ -144,17 +144,17 @@ contract AuctionTest is Test { vm.startPrank(gov); vm.expectRevert("DBR reserve must be positive"); auction.setDbrReserve(0); - uint oldDolaReserve = auction.dolaReserve(); + uint oldAssetReserve = auction.assetReserve(); uint oldDbrReserve = auction.dbrReserve(); - uint ratioMantissaBefore = oldDbrReserve * 1e18 / oldDolaReserve; + uint ratioMantissaBefore = oldDbrReserve * 1e18 / oldAssetReserve; uint newDbrReserve = 1e19; - uint expectedDolaReserve = newDbrReserve * oldDolaReserve / oldDbrReserve; + uint expectedAssetReserve = newDbrReserve * oldAssetReserve / oldDbrReserve; auction.setDbrReserve(newDbrReserve); uint updatedDbrReserve = auction.dbrReserve(); - uint updatedDolaReserve = auction.dolaReserve(); + uint updatedAssetReserve = auction.assetReserve(); assertEq(updatedDbrReserve, newDbrReserve); - assertEq(updatedDolaReserve, expectedDolaReserve); - uint ratioMantissaAfter = updatedDbrReserve * 1e18 / updatedDolaReserve; + assertEq(updatedAssetReserve, expectedAssetReserve); + uint ratioMantissaAfter = updatedDbrReserve * 1e18 / updatedAssetReserve; assertEq(ratioMantissaAfter, ratioMantissaBefore); } @@ -162,7 +162,7 @@ contract AuctionTest is Test { vm.expectRevert("onlyGov"); auction.overrideReserves(0,0); vm.startPrank(gov); - vm.expectRevert("Dola reserve must be positive"); + vm.expectRevert("Asset reserve must be positive"); auction.overrideReserves(1,0); vm.expectRevert("DBR reserve must be positive"); auction.overrideReserves(0,1); @@ -170,55 +170,55 @@ contract AuctionTest is Test { vm.warp(newTimestamp); auction.overrideReserves(2,3); assertEq(auction.dbrReserve(), 2); - assertEq(auction.dolaReserve(), 3); + assertEq(auction.assetReserve(), 3); assertEq(auction.lastUpdate(), newTimestamp); } function test_sweep() public { vm.expectRevert("onlyGov"); auction.sweep(address(1), address(1), 1); - dola.mint(address(auction), 1); - assertEq(dola.balanceOf(address(auction)), 1); + asset.mint(address(auction), 1); + assertEq(asset.balanceOf(address(auction)), 1); vm.prank(gov); - auction.sweep(address(dola), address(this), 1); - assertEq(dola.balanceOf(address(auction)), 0); - assertEq(dola.balanceOf(address(this)), 1); + auction.sweep(address(asset), address(this), 1); + assertEq(asset.balanceOf(address(auction)), 0); + assertEq(asset.balanceOf(address(this)), 1); } - function test_sendToSaleHandler(uint dolaIn) public { - dolaIn = bound(dolaIn, 1, type(uint).max - 1e18); // max dola in = (max uint - dola reserve) + function test_sendToSaleHandler(uint assetIn) public { + assetIn = bound(assetIn, 1, type(uint).max - 1e18); // max asset in = (max uint - asset reserve) MockSaleHandler handler = new MockSaleHandler(); vm.expectRevert("No sale handler"); auction.sendToSaleHandler(); vm.prank(gov); auction.setSaleHandler(address(handler)); - dola.mint(address(auction), dolaIn); - handler.setCapacity(dolaIn - 1); + asset.mint(address(auction), assetIn); + handler.setCapacity(assetIn - 1); auction.sendToSaleHandler(); - assertEq(dola.balanceOf(address(auction)), 1); - assertEq(dola.balanceOf(address(handler)), dolaIn - 1); + assertEq(asset.balanceOf(address(auction)), 1); + assertEq(asset.balanceOf(address(handler)), assetIn - 1); assertEq(handler.received(), true); } - function test_buyDBR(uint exactDolaIn, uint exactDbrOut) public { + function test_buyDBR(uint exactAssetIn, uint exactDbrOut) public { exactDbrOut = bound(exactDbrOut, 1, auction.dbrReserve()); - exactDolaIn = bound(exactDolaIn, 0, (type(uint).max - auction.dolaReserve()) / auction.dbrReserve() - exactDbrOut); - dola.mint(address(this), exactDolaIn); - dola.approve(address(auction), exactDolaIn); - uint K = auction.dolaReserve() * auction.dbrReserve(); + exactAssetIn = bound(exactAssetIn, 0, (type(uint).max - auction.assetReserve()) / auction.dbrReserve() - exactDbrOut); + asset.mint(address(this), exactAssetIn); + asset.approve(address(auction), exactAssetIn); + uint K = auction.assetReserve() * auction.dbrReserve(); uint newDbrReserve = auction.dbrReserve() - exactDbrOut; - uint newDolaReserve = auction.dolaReserve() + exactDolaIn; - uint newK = newDolaReserve * newDbrReserve; + uint newAssetReserve = auction.assetReserve() + exactAssetIn; + uint newK = newAssetReserve * newDbrReserve; if(newK < K) { vm.expectRevert("Invariant"); - auction.buyDBR(exactDolaIn, exactDbrOut, address(1)); + auction.buyDBR(exactAssetIn, exactDbrOut, address(1)); } else { - auction.buyDBR(exactDolaIn, exactDbrOut, address(1)); - assertEq(dola.balanceOf(address(this)), 0); - assertEq(dola.balanceOf(address(auction)), exactDolaIn); + auction.buyDBR(exactAssetIn, exactDbrOut, address(1)); + assertEq(asset.balanceOf(address(this)), 0); + assertEq(asset.balanceOf(address(auction)), exactAssetIn); assertEq(dbr.balanceOf(address(1)), exactDbrOut); assertEq(auction.dbrReserve(), newDbrReserve); - assertEq(auction.dolaReserve(), newDolaReserve); + assertEq(auction.assetReserve(), newAssetReserve); } } diff --git a/test/SaleHandler.t.sol b/test/DolaSaleHandler.t.sol similarity index 82% rename from test/SaleHandler.t.sol rename to test/DolaSaleHandler.t.sol index 01bad50..3ca75d6 100644 --- a/test/SaleHandler.t.sol +++ b/test/DolaSaleHandler.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.21; import {Test, console2} from "forge-std/Test.sol"; -import {SaleHandler} from "../src/SaleHandler.sol"; +import {DolaSaleHandler} from "../src/DolaSaleHandler.sol"; import {ERC20} from "./mocks/ERC20.sol"; contract MockAnDola { @@ -27,15 +27,15 @@ contract MockAnDola { contract SaleHandlerTest is Test { - ERC20 dola; + ERC20 asset; MockAnDola anDola; - SaleHandler handler; + DolaSaleHandler handler; function setUp() public { - dola = new ERC20(); + asset = new ERC20(); anDola = new MockAnDola(); - handler = new SaleHandler( - address(dola), + handler = new DolaSaleHandler( + address(asset), address(anDola), address(1), address(2) @@ -43,16 +43,16 @@ contract SaleHandlerTest is Test { } function test_constructor() public { - assertEq(address(handler.dola()), address(dola)); + assertEq(address(handler.asset()), address(asset)); assertEq(address(handler.anDola()), address(anDola)); assertEq(handler.borrower1(), address(1)); assertEq(handler.borrower2(), address(2)); - assertEq(dola.allowance(address(handler), address(anDola)), type(uint).max); + assertEq(asset.allowance(address(handler), address(anDola)), type(uint).max); } function test_onReceiveBorrower1(uint amount) public { amount = bound(amount, 1, type(uint).max / 2); - dola.mint(address(handler), amount); + asset.mint(address(handler), amount); anDola.setBorrowBalance(address(1), amount); handler.onReceive(); assertEq(anDola.borrower(), address(1)); @@ -61,7 +61,7 @@ contract SaleHandlerTest is Test { function test_onReceiveBorrower2(uint amount) public { amount = bound(amount, 1, type(uint).max / 2); - dola.mint(address(handler), amount); + asset.mint(address(handler), amount); anDola.setBorrowBalance(address(2), amount); handler.onReceive(); assertEq(anDola.borrower(), address(2)); diff --git a/test/Helper.t.sol b/test/Helper.t.sol index f995fb8..cea4841 100644 --- a/test/Helper.t.sol +++ b/test/Helper.t.sol @@ -9,72 +9,72 @@ import {ERC20} from "./mocks/ERC20.sol"; contract HelperTest is Test { Auction auction; - ERC20 dola; + ERC20 asset; ERC20 dbr; Helper helper; function setUp() public { - dola = new ERC20(); + asset = new ERC20(); dbr = new ERC20(); auction = new Auction( address(1), address(2), address(dbr), - address(dola), + address(asset), address(0), 1e18, 1e18 ); - helper = new Helper(address(auction), address(dola)); + helper = new Helper(address(auction), address(asset)); } function test_constructor() public { assertEq(address(helper.auction()), address(auction)); - assertEq(address(helper.dola()), address(dola)); + assertEq(address(helper.asset()), address(asset)); } - function test_getDbrOut(uint dolaIn) public { - dolaIn = bound(dolaIn, 1, (type(uint).max - auction.dolaReserve()) / auction.dbrReserve()); - uint newDbrReserve = auction.dbrReserve() - helper.getDbrOut(dolaIn); - uint newDolaReserve = auction.dolaReserve() + dolaIn; - assertGe(newDbrReserve * newDolaReserve, auction.dbrReserve() * auction.dolaReserve()); + function test_getDbrOut(uint assetIn) public { + assetIn = bound(assetIn, 1, (type(uint).max - auction.assetReserve()) / auction.dbrReserve()); + uint newDbrReserve = auction.dbrReserve() - helper.getDbrOut(assetIn); + uint newAssetReserve = auction.assetReserve() + assetIn; + assertGe(newDbrReserve * newAssetReserve, auction.dbrReserve() * auction.assetReserve()); } - function test_getDolaIn(uint dbrOut) public { + function test_getAssetIn(uint dbrOut) public { dbrOut = bound(dbrOut, 1, auction.dbrReserve() - 1); uint newDbrReserve = auction.dbrReserve() - dbrOut; - uint newDolaReserve = auction.dolaReserve() + helper.getDolaIn(dbrOut); - assertGe(newDbrReserve * newDolaReserve, auction.dbrReserve() * auction.dolaReserve()); + uint newAssetReserve = auction.assetReserve() + helper.getAssetIn(dbrOut); + assertGe(newDbrReserve * newAssetReserve, auction.dbrReserve() * auction.assetReserve()); } - function test_swapExactDolaForDbr(uint dolaIn) public { - dolaIn = bound(dolaIn, 1, (type(uint).max - auction.dolaReserve()) / auction.dbrReserve()); - uint dbrOut = helper.getDbrOut(dolaIn); + function test_swapExactAssetForDbr(uint assetIn) public { + assetIn = bound(assetIn, 1, (type(uint).max - auction.assetReserve()) / auction.dbrReserve()); + uint dbrOut = helper.getDbrOut(assetIn); uint newDbrReserve = auction.dbrReserve() - dbrOut; - uint newDolaReserve = auction.dolaReserve() + dolaIn; - dola.mint(address(this), dolaIn); - dola.approve(address(helper), dolaIn); - helper.swapExactDolaForDbr(dolaIn, dbrOut); + uint newAssetReserve = auction.assetReserve() + assetIn; + asset.mint(address(this), assetIn); + asset.approve(address(helper), assetIn); + helper.swapExactAssetForDbr(assetIn, dbrOut); assertEq(auction.dbrReserve(), newDbrReserve); - assertEq(auction.dolaReserve(), newDolaReserve); + assertEq(auction.assetReserve(), newAssetReserve); assertEq(dbr.balanceOf(address(this)), dbrOut); - assertEq(dola.balanceOf(address(this)), 0); - assertEq(dola.balanceOf(address(auction)), dolaIn); + assertEq(asset.balanceOf(address(this)), 0); + assertEq(asset.balanceOf(address(auction)), assetIn); } - function test_swapDolaForExactDbr(uint dbrOut) public { + function test_swapAssetForExactDbr(uint dbrOut) public { dbrOut = bound(dbrOut, 1, auction.dbrReserve() - 1); - uint dolaIn = helper.getDolaIn(dbrOut); + uint assetIn = helper.getAssetIn(dbrOut); uint newDbrReserve = auction.dbrReserve() - dbrOut; - uint newDolaReserve = auction.dolaReserve() + dolaIn; - dola.mint(address(this), dolaIn); - dola.approve(address(helper), dolaIn); - helper.swapDolaForExactDbr(dbrOut, dolaIn); + uint newAssetReserve = auction.assetReserve() + assetIn; + asset.mint(address(this), assetIn); + asset.approve(address(helper), assetIn); + helper.swapAssetForExactDbr(dbrOut, assetIn); assertEq(auction.dbrReserve(), newDbrReserve); - assertEq(auction.dolaReserve(), newDolaReserve); + assertEq(auction.assetReserve(), newAssetReserve); assertEq(dbr.balanceOf(address(this)), dbrOut); - assertEq(dola.balanceOf(address(this)), 0); - assertEq(dola.balanceOf(address(auction)), dolaIn); + assertEq(asset.balanceOf(address(this)), 0); + assertEq(asset.balanceOf(address(auction)), assetIn); } } \ No newline at end of file From 3e577099fde9930c033f4c2105d30faae20fafc3 Mon Sep 17 00:00:00 2001 From: nourharidy Date: Tue, 28 Oct 2025 09:46:39 +0300 Subject: [PATCH 03/11] add minDbrRatePerYear --- src/Auction.sol | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Auction.sol b/src/Auction.sol index fa1f340..652b533 100644 --- a/src/Auction.sol +++ b/src/Auction.sol @@ -26,7 +26,8 @@ contract Auction { uint public assetReserve; uint public dbrReserve; uint public dbrRatePerYear; - uint public maxDbrRatePerYear; + uint public minDbrRatePerYear; + uint public maxDbrRatePerYear = type(uint).max; uint public lastUpdate; constructor ( @@ -83,6 +84,7 @@ contract Auction { function setSaleHandler(address _saleHandler) external onlyGov { saleHandler = ISaleHandler(_saleHandler); } function setMaxDbrRatePerYear(uint _maxRate) external onlyGov updateReserves { + require(_maxRate >= minDbrRatePerYear, "Max below min"); maxDbrRatePerYear = _maxRate; emit MaxRateUpdate(_maxRate); if(dbrRatePerYear > _maxRate) { @@ -91,12 +93,24 @@ contract Auction { } } + function setMinDbrRatePerYear(uint _minRate) external onlyGov updateReserves { + require(_minRate <= maxDbrRatePerYear, "Min above max"); + minDbrRatePerYear = _minRate; + emit MinRateUpdate(_minRate); + if(dbrRatePerYear < _minRate) { + dbrRatePerYear = _minRate; + emit RateUpdate(_minRate); + } + } + function setDbrRatePerYear(uint _rate) external onlyGovOrOperator updateReserves { require(_rate <= maxDbrRatePerYear, "Rate exceeds max"); + require(_rate >= minDbrRatePerYear, "Rate below min"); dbrRatePerYear = _rate; emit RateUpdate(_rate); } + // changes K to preserve the ratio (price) function setAssetReserve(uint _assetReserve) external onlyGov updateReserves { require(_assetReserve > 0, "Asset reserve must be positive"); uint newDbrReserve = _assetReserve * dbrReserve / assetReserve; @@ -105,6 +119,7 @@ contract Auction { dbrReserve = newDbrReserve; } + // changes K to preserve the ratio (price) function setDbrReserve(uint _dbrReserve) external onlyGov updateReserves { require(_dbrReserve > 0, "DBR reserve must be positive"); uint newAssetReserve = _dbrReserve * assetReserve / dbrReserve; @@ -148,4 +163,5 @@ contract Auction { event Buy(address indexed caller, address indexed to, uint assetIn, uint dbrOut); event RateUpdate(uint newRate); event MaxRateUpdate(uint newMaxRate); + event MinRateUpdate(uint newMinRate); } From 76bc5cf10bea1800752f26a00a1b7bfd8da2d517 Mon Sep 17 00:00:00 2001 From: nourharidy Date: Tue, 28 Oct 2025 09:50:54 +0300 Subject: [PATCH 04/11] add sendToGov() --- src/Auction.sol | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Auction.sol b/src/Auction.sol index 652b533..cb7a999 100644 --- a/src/Auction.sol +++ b/src/Auction.sol @@ -156,6 +156,14 @@ contract Auction { saleHandler.onReceive(); } + // only if no sale handler is set + function sendToGov() public { + require(address(saleHandler) == address(0), "Sale handler set"); + uint bal = asset.balanceOf(address(this)); + require(bal > 0, "No asset to send"); + asset.transfer(gov, bal); + } + function sweep(address token, address destination, uint amount) external onlyGov { IERC20(token).transfer(destination, amount); } From e11ecb3b3fdce446b3f0deed054cc6f2fdd622c3 Mon Sep 17 00:00:00 2001 From: nourharidy Date: Tue, 28 Oct 2025 16:57:08 +0300 Subject: [PATCH 05/11] fix tests and scripts --- script/AuctionMainnetDeployer.s.sol | 5 +- ...l => DolaSaleHandlerMainnetDeployer.s.sol} | 0 test/Auction.t.sol | 126 ++++++++++++++++-- 3 files changed, 122 insertions(+), 9 deletions(-) rename script/{DolaSaleHandlerMainnetDeployer.s copy.sol => DolaSaleHandlerMainnetDeployer.s.sol} (100%) diff --git a/script/AuctionMainnetDeployer.s.sol b/script/AuctionMainnetDeployer.s.sol index 7df386d..509619e 100644 --- a/script/AuctionMainnetDeployer.s.sol +++ b/script/AuctionMainnetDeployer.s.sol @@ -11,6 +11,9 @@ contract AuctionMainnetDeployerScript is Script { function run() public { vm.startBroadcast(); + // Optional: specify a handler address to deploy with + address handler = address(0); + address gov = 0x926dF14a23BE491164dCF93f4c468A50ef659D5B; address fedChair = 0x8F97cCA30Dbe80e7a8B462F1dD1a51C32accDfC8; address asset = 0x865377367054516e17014CcdED1e7d814EDC9ce4; @@ -25,7 +28,7 @@ contract AuctionMainnetDeployerScript is Script { fedChair, dbr, asset, - address(0), + handler, assetReserve, dbrReserve ); diff --git a/script/DolaSaleHandlerMainnetDeployer.s copy.sol b/script/DolaSaleHandlerMainnetDeployer.s.sol similarity index 100% rename from script/DolaSaleHandlerMainnetDeployer.s copy.sol rename to script/DolaSaleHandlerMainnetDeployer.s.sol diff --git a/test/Auction.t.sol b/test/Auction.t.sol index 952c07a..21b6c9d 100644 --- a/test/Auction.t.sol +++ b/test/Auction.t.sol @@ -47,6 +47,9 @@ contract AuctionTest is Test { assertEq(address(auction.asset()), address(asset)); assertEq(auction.assetReserve(), 1e18); assertEq(auction.dbrReserve(), 1e18); + assertEq(auction.dbrRatePerYear(), 0); + assertEq(auction.minDbrRatePerYear(), 0); + assertEq(auction.maxDbrRatePerYear(), type(uint).max); } function test_getCurrentReserves() public { @@ -94,30 +97,137 @@ contract AuctionTest is Test { vm.expectRevert("onlyGov"); auction.setMaxDbrRatePerYear(1e18); vm.startPrank(gov); + + // Test setting max rate auction.setMaxDbrRatePerYear(1e18); assertEq(auction.maxDbrRatePerYear(), 1e18); + + // Test that current rate can be set to max auction.setDbrRatePerYear(1e18); assertEq(auction.dbrRatePerYear(), 1e18); - auction.setMaxDbrRatePerYear(0); - assertEq(auction.maxDbrRatePerYear(), 0); - assertEq(auction.dbrRatePerYear(), 0); + + // Test that setting max below current rate adjusts current rate + auction.setMaxDbrRatePerYear(0.5e18); + assertEq(auction.maxDbrRatePerYear(), 0.5e18); + assertEq(auction.dbrRatePerYear(), 0.5e18); + + // Test that setting max below min rate fails + auction.setMinDbrRatePerYear(0.3e18); + vm.expectRevert("Max below min"); + auction.setMaxDbrRatePerYear(0.2e18); + } + + function test_setMinDbrRatePerYear() public { + vm.expectRevert("onlyGov"); + auction.setMinDbrRatePerYear(1e18); + vm.startPrank(gov); + + // Test setting min rate + auction.setMinDbrRatePerYear(0.1e18); + assertEq(auction.minDbrRatePerYear(), 0.1e18); + + // Test that setting min above current rate adjusts current rate + auction.setMinDbrRatePerYear(0.5e18); + assertEq(auction.minDbrRatePerYear(), 0.5e18); + assertEq(auction.dbrRatePerYear(), 0.5e18); + + // Test that setting min above max rate fails + auction.setMaxDbrRatePerYear(1e18); + vm.expectRevert("Min above max"); + auction.setMinDbrRatePerYear(2e18); + + // Test that setting min rate works when below max + auction.setMinDbrRatePerYear(0.3e18); + assertEq(auction.minDbrRatePerYear(), 0.3e18); } function test_setDbrRatePerYear() public { vm.expectRevert("onlyGov"); auction.setDbrRatePerYear(1e18); vm.startPrank(gov); - vm.expectRevert("Rate exceeds max"); - auction.setDbrRatePerYear(1e18); - assertEq(auction.dbrRatePerYear(), 0); + + // Set up min and max bounds + auction.setMinDbrRatePerYear(0.1e18); auction.setMaxDbrRatePerYear(1e18); - auction.setDbrRatePerYear(1e18); - assertEq(auction.dbrRatePerYear(), 1e18); + + // Test setting rate within bounds + auction.setDbrRatePerYear(0.5e18); + assertEq(auction.dbrRatePerYear(), 0.5e18); + + // Test setting rate above max fails + vm.expectRevert("Rate exceeds max"); + auction.setDbrRatePerYear(2e18); + + // Test setting rate below min fails + vm.expectRevert("Rate below min"); + auction.setDbrRatePerYear(0.05e18); + + // Test operator can also set rate vm.startPrank(operator); + auction.setDbrRatePerYear(0.8e18); + assertEq(auction.dbrRatePerYear(), 0.8e18); + + // Test operator cannot set rate above max + vm.expectRevert("Rate exceeds max"); + auction.setDbrRatePerYear(2e18); + + // Test operator cannot set rate below min + vm.expectRevert("Rate below min"); + auction.setDbrRatePerYear(0.05e18); + } + + function test_dbrRateBoundaryConditions() public { + vm.startPrank(gov); + + // Test setting min and max to same value + auction.setMinDbrRatePerYear(0.5e18); + auction.setMaxDbrRatePerYear(0.5e18); + assertEq(auction.minDbrRatePerYear(), 0.5e18); + assertEq(auction.maxDbrRatePerYear(), 0.5e18); + assertEq(auction.dbrRatePerYear(), 0.5e18); + + // Test that rate can only be set to the exact min/max value + auction.setDbrRatePerYear(0.5e18); + assertEq(auction.dbrRatePerYear(), 0.5e18); + + // Test that any other value fails + vm.expectRevert("Rate exceeds max"); + auction.setDbrRatePerYear(0.51e18); + vm.expectRevert("Rate below min"); + auction.setDbrRatePerYear(0.49e18); + + // Test that setting max to 0 fails when min is above 0 + vm.expectRevert("Max below min"); + auction.setMaxDbrRatePerYear(0); + + // Test that min can be set to 0 first + auction.setMinDbrRatePerYear(0); + assertEq(auction.minDbrRatePerYear(), 0); + + // Now test that max can be set to 0 + auction.setMaxDbrRatePerYear(0); + assertEq(auction.maxDbrRatePerYear(), 0); + assertEq(auction.dbrRatePerYear(), 0); + + // Test that rate can be set to 0 auction.setDbrRatePerYear(0); assertEq(auction.dbrRatePerYear(), 0); } + function test_dbrRateEvents() public { + vm.startPrank(gov); + + // Test that events are emitted (simplified test) + auction.setMinDbrRatePerYear(0.1e18); + auction.setMaxDbrRatePerYear(1e18); + auction.setDbrRatePerYear(0.5e18); + + // Verify the state changes + assertEq(auction.minDbrRatePerYear(), 0.1e18); + assertEq(auction.maxDbrRatePerYear(), 1e18); + assertEq(auction.dbrRatePerYear(), 0.5e18); + } + function test_setAssetReserve() public { vm.expectRevert("onlyGov"); auction.setAssetReserve(1e19); From 7c3a967de32b4e767718aa4efc7a13d08645b044 Mon Sep 17 00:00:00 2001 From: nourharidy Date: Tue, 28 Oct 2025 17:05:24 +0300 Subject: [PATCH 06/11] add solady --- .gitmodules | 3 +++ foundry.lock | 8 ++++++++ lib/solady | 1 + 3 files changed, 12 insertions(+) create mode 100644 .gitmodules create mode 100644 foundry.lock create mode 160000 lib/solady diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..27c16b2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/solady"] + path = lib/solady + url = https://github.com/vectorized/solady diff --git a/foundry.lock b/foundry.lock new file mode 100644 index 0000000..2b75296 --- /dev/null +++ b/foundry.lock @@ -0,0 +1,8 @@ +{ + "lib/solady": { + "tag": { + "name": "v0.1.26", + "rev": "acd959aa4bd04720d640bf4e6a5c71037510cc4b" + } + } +} \ No newline at end of file diff --git a/lib/solady b/lib/solady new file mode 160000 index 0000000..acd959a --- /dev/null +++ b/lib/solady @@ -0,0 +1 @@ +Subproject commit acd959aa4bd04720d640bf4e6a5c71037510cc4b From 005d88d965fec6ade791649e067e0de413c960dd Mon Sep 17 00:00:00 2001 From: nourharidy Date: Mon, 9 Feb 2026 14:59:41 +0400 Subject: [PATCH 07/11] use safeTransfer --- src/Auction.sol | 14 ++++++++------ src/DolaSaleHandler.sol | 7 +++++-- src/Helper.sol | 13 ++++++++----- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/Auction.sol b/src/Auction.sol index cb7a999..2234633 100644 --- a/src/Auction.sol +++ b/src/Auction.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.21; +import {SafeTransferLib} from "solady/utils/SafeTransferLib.sol"; + interface IERC20 { - function transfer(address,uint) external returns (bool); - function transferFrom(address,address,uint) external returns (bool); function balanceOf(address) external view returns (uint); } @@ -18,6 +18,8 @@ interface ISaleHandler { contract Auction { + using SafeTransferLib for address; + address public gov; address public operator; IDBR public immutable dbr; @@ -141,7 +143,7 @@ contract Auction { assetReserve += exactAssetIn; dbrReserve -= exactDbrOut; require(assetReserve * dbrReserve >= K, "Invariant"); - asset.transferFrom(msg.sender, address(this), exactAssetIn); + address(asset).safeTransferFrom(msg.sender, address(this), exactAssetIn); dbr.mint(to, exactDbrOut); emit Buy(msg.sender, to, exactAssetIn, exactDbrOut); } @@ -152,7 +154,7 @@ contract Auction { require(bal > 0, "No asset to send"); uint capacity = saleHandler.getCapacity(); uint amount = bal > capacity ? capacity : bal; - asset.transfer(address(saleHandler), amount); + address(asset).safeTransfer(address(saleHandler), amount); saleHandler.onReceive(); } @@ -161,11 +163,11 @@ contract Auction { require(address(saleHandler) == address(0), "Sale handler set"); uint bal = asset.balanceOf(address(this)); require(bal > 0, "No asset to send"); - asset.transfer(gov, bal); + address(asset).safeTransfer(gov, bal); } function sweep(address token, address destination, uint amount) external onlyGov { - IERC20(token).transfer(destination, amount); + token.safeTransfer(destination, amount); } event Buy(address indexed caller, address indexed to, uint assetIn, uint dbrOut); diff --git a/src/DolaSaleHandler.sol b/src/DolaSaleHandler.sol index 2b5524f..562be36 100644 --- a/src/DolaSaleHandler.sol +++ b/src/DolaSaleHandler.sol @@ -1,8 +1,9 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.21; +import {SafeTransferLib} from "solady/utils/SafeTransferLib.sol"; + interface IERC20 { - function approve(address,uint) external returns (bool); function balanceOf(address) external view returns (uint); } @@ -13,6 +14,8 @@ interface IAnDola { contract DolaSaleHandler { + using SafeTransferLib for address; + IERC20 public immutable asset; IAnDola public immutable anDola; address public immutable borrower1; @@ -28,7 +31,7 @@ contract DolaSaleHandler { anDola = IAnDola(_anDola); borrower1 = _borrower1; borrower2 = _borrower2; - asset.approve(_anDola,type(uint).max); + address(asset).safeApprove(_anDola, type(uint).max); } function onReceive() external { diff --git a/src/Helper.sol b/src/Helper.sol index e56323b..9248848 100644 --- a/src/Helper.sol +++ b/src/Helper.sol @@ -1,18 +1,21 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.21; +import {SafeTransferLib} from "solady/utils/SafeTransferLib.sol"; + interface IAuction { function getCurrentReserves() external view returns (uint assetReserve, uint dbrReserve); function buyDBR(uint exactAssetIn, uint exactDbrOut, address to) external; } interface IERC20 { - function approve(address,uint) external returns (bool); - function transferFrom(address,address,uint) external returns (bool); + function balanceOf(address) external view returns (uint); } contract Helper { + using SafeTransferLib for address; + IAuction public immutable auction; IERC20 public immutable asset; @@ -22,7 +25,7 @@ contract Helper { ) { auction = IAuction(_auction); asset = IERC20(_asset); - asset.approve(_auction, type(uint).max); + address(asset).safeApprove(_auction, type(uint).max); } function getDbrOut(uint assetIn) public view returns (uint dbrOut) { @@ -44,14 +47,14 @@ contract Helper { function swapExactAssetForDbr(uint assetIn, uint dbrOutMin) external returns (uint dbrOut) { dbrOut = getDbrOut(assetIn); require(dbrOut >= dbrOutMin, "dbrOut must be greater than dbrOutMin"); - asset.transferFrom(msg.sender, address(this), assetIn); + address(asset).safeTransferFrom(msg.sender, address(this), assetIn); auction.buyDBR(assetIn, dbrOut, msg.sender); } function swapAssetForExactDbr(uint dbrOut, uint assetInMax) external returns (uint assetIn) { assetIn = getAssetIn(dbrOut); require(assetIn <= assetInMax, "assetIn must be less than assetInMax"); - asset.transferFrom(msg.sender, address(this), assetIn); + address(asset).safeTransferFrom(msg.sender, address(this), assetIn); auction.buyDBR(assetIn, dbrOut, msg.sender); } From 130c03369983f7b438c05edcf117311440fda11e Mon Sep 17 00:00:00 2001 From: nourharidy Date: Mon, 9 Feb 2026 15:03:31 +0400 Subject: [PATCH 08/11] add events --- src/Auction.sol | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Auction.sol b/src/Auction.sol index 2234633..a58dc3d 100644 --- a/src/Auction.sol +++ b/src/Auction.sol @@ -119,6 +119,7 @@ contract Auction { require(newDbrReserve > 0, "Resulting DBR reserve must be positive"); assetReserve = _assetReserve; dbrReserve = newDbrReserve; + emit SetAssetReserve(_assetReserve, newDbrReserve); } // changes K to preserve the ratio (price) @@ -128,6 +129,7 @@ contract Auction { require(newAssetReserve > 0, "Resulting asset reserve must be positive"); dbrReserve = _dbrReserve; assetReserve = newAssetReserve; + emit SetDbrReserve(_dbrReserve, newAssetReserve); } function overrideReserves(uint _dbrReserve, uint _assetReserve) external onlyGov { @@ -136,6 +138,7 @@ contract Auction { assetReserve = _assetReserve; dbrReserve = _dbrReserve; lastUpdate = block.timestamp; + emit OverrideReserves(_assetReserve, _dbrReserve); } function buyDBR(uint exactAssetIn, uint exactDbrOut, address to) external updateReserves { @@ -156,6 +159,7 @@ contract Auction { uint amount = bal > capacity ? capacity : bal; address(asset).safeTransfer(address(saleHandler), amount); saleHandler.onReceive(); + emit SendToSaleHandler(amount); } // only if no sale handler is set @@ -164,6 +168,7 @@ contract Auction { uint bal = asset.balanceOf(address(this)); require(bal > 0, "No asset to send"); address(asset).safeTransfer(gov, bal); + emit SendToGov(bal); } function sweep(address token, address destination, uint amount) external onlyGov { @@ -171,6 +176,11 @@ contract Auction { } event Buy(address indexed caller, address indexed to, uint assetIn, uint dbrOut); + event SetAssetReserve(uint assetReserve, uint dbrReserve); + event SetDbrReserve(uint dbrReserve, uint assetReserve); + event OverrideReserves(uint assetReserve, uint dbrReserve); + event SendToSaleHandler(uint amount); + event SendToGov(uint amount); event RateUpdate(uint newRate); event MaxRateUpdate(uint newMaxRate); event MinRateUpdate(uint newMinRate); From 4a91bb494236f12a6e77c590fa34499446cdaf24 Mon Sep 17 00:00:00 2001 From: nourharidy Date: Mon, 9 Feb 2026 15:25:44 +0400 Subject: [PATCH 09/11] update deploy script and add deploy shell scripts --- .env.example | 3 +++ deploy-mainnet.sh | 12 ++++++++++++ deploy-sepolia.sh | 12 ++++++++++++ script/AuctionMainnetDeployer.s.sol | 12 ++++++------ 4 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 .env.example create mode 100755 deploy-mainnet.sh create mode 100755 deploy-sepolia.sh diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..9298fca --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +MAINNET_RPC_URL= +SEPOLIA_RPC_URL= +ETHERSCAN_API_KEY= diff --git a/deploy-mainnet.sh b/deploy-mainnet.sh new file mode 100755 index 0000000..95016ed --- /dev/null +++ b/deploy-mainnet.sh @@ -0,0 +1,12 @@ +#!/bin/bash +source .env + +read -p "Enter keystore account name: " KEYSTORE_NAME + +forge script script/AuctionMainnetDeployer.s.sol:AuctionMainnetDeployerScript \ + --rpc-url "$MAINNET_RPC_URL" \ + --account "$KEYSTORE_NAME" \ + --broadcast \ + --verify \ + --etherscan-api-key "$ETHERSCAN_API_KEY" \ + -vvvv diff --git a/deploy-sepolia.sh b/deploy-sepolia.sh new file mode 100755 index 0000000..eeeb000 --- /dev/null +++ b/deploy-sepolia.sh @@ -0,0 +1,12 @@ +#!/bin/bash +source .env + +read -p "Enter keystore account name: " KEYSTORE_NAME + +forge script script/AuctionMainnetDeployer.s.sol:AuctionMainnetDeployerScript \ + --rpc-url "$SEPOLIA_RPC_URL" \ + --account "$KEYSTORE_NAME" \ + --broadcast \ + --verify \ + --etherscan-api-key "$ETHERSCAN_API_KEY" \ + -vvvv diff --git a/script/AuctionMainnetDeployer.s.sol b/script/AuctionMainnetDeployer.s.sol index 509619e..e7759c9 100644 --- a/script/AuctionMainnetDeployer.s.sol +++ b/script/AuctionMainnetDeployer.s.sol @@ -15,17 +15,17 @@ contract AuctionMainnetDeployerScript is Script { address handler = address(0); address gov = 0x926dF14a23BE491164dCF93f4c468A50ef659D5B; - address fedChair = 0x8F97cCA30Dbe80e7a8B462F1dD1a51C32accDfC8; - address asset = 0x865377367054516e17014CcdED1e7d814EDC9ce4; + address twg = 0x9D5Df30F475CEA915b1ed4C0CCa59255C897b61B; + address asset = 0x41D5D79431A913C4aE7d69a668ecdfE5fF9DFB68; address dbr = 0xAD038Eb671c44b853887A7E32528FaB35dC5D710; - // 5:1 ratio, implying a 20c DBR starting price - uint assetReserve = 500_000 * 1e18; - uint dbrReserve = assetReserve * 5; + // 400:1 ratio, implying a 5c DBR starting price ($20 INV / 400 = $0.05 DBR) + uint assetReserve = 1_250 * 1e18; + uint dbrReserve = assetReserve * 400; // 500_000 DBR Auction auction = new Auction( gov, - fedChair, + twg, dbr, asset, handler, From c60b552d88c858b4231cf9afa76fe4af839587d3 Mon Sep 17 00:00:00 2001 From: nourharidy Date: Mon, 9 Feb 2026 15:27:05 +0400 Subject: [PATCH 10/11] move deploy scripts to sh directory --- deploy-mainnet.sh => sh/deploy-mainnet.sh | 0 deploy-sepolia.sh => sh/deploy-sepolia.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename deploy-mainnet.sh => sh/deploy-mainnet.sh (100%) rename deploy-sepolia.sh => sh/deploy-sepolia.sh (100%) diff --git a/deploy-mainnet.sh b/sh/deploy-mainnet.sh similarity index 100% rename from deploy-mainnet.sh rename to sh/deploy-mainnet.sh diff --git a/deploy-sepolia.sh b/sh/deploy-sepolia.sh similarity index 100% rename from deploy-sepolia.sh rename to sh/deploy-sepolia.sh From e7c4f2d08f2803603288959aca8e6c7ae92191ee Mon Sep 17 00:00:00 2001 From: nourharidy Date: Mon, 9 Feb 2026 15:30:36 +0400 Subject: [PATCH 11/11] mainnet deploy --- .../1/run-1770636532051.json | 108 ++++++++++++++++++ .../1/run-latest.json | 108 ++++++++++++++++++ 2 files changed, 216 insertions(+) create mode 100644 broadcast/AuctionMainnetDeployer.s.sol/1/run-1770636532051.json create mode 100644 broadcast/AuctionMainnetDeployer.s.sol/1/run-latest.json diff --git a/broadcast/AuctionMainnetDeployer.s.sol/1/run-1770636532051.json b/broadcast/AuctionMainnetDeployer.s.sol/1/run-1770636532051.json new file mode 100644 index 0000000..5b708c3 --- /dev/null +++ b/broadcast/AuctionMainnetDeployer.s.sol/1/run-1770636532051.json @@ -0,0 +1,108 @@ +{ + "transactions": [ + { + "hash": "0xbb310bf14648181e86abc1f567e5dea30407bc2da05cc50d307acbb7bf0277a1", + "transactionType": "CREATE", + "contractName": "Auction", + "contractAddress": "0x7cac7f6be1f74d00d874bbacb98b531fa889d613", + "function": null, + "arguments": [ + "0x926dF14a23BE491164dCF93f4c468A50ef659D5B", + "0x9D5Df30F475CEA915b1ed4C0CCa59255C897b61B", + "0xAD038Eb671c44b853887A7E32528FaB35dC5D710", + "0x41D5D79431A913C4aE7d69a668ecdfE5fF9DFB68", + "0x0000000000000000000000000000000000000000", + "1250000000000000000000", + "500000000000000000000000" + ], + "transaction": { + "from": "0x3fcb35a1cbfb6007f9bc638d388958bc4550cb28", + "gas": "0x2b98d3", + "value": "0x0", + "input": "0x60c06040527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60075534801562000034575f80fd5b50604051620029413803806200294183398181016040528101906200005a9190620002c3565b5f82116200009f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200009690620003cf565b60405180910390fd5b5f8111620000e4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000db906200043d565b60405180910390fd5b865f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508473ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508373ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508260025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160038190555080600481905550505050505050506200045d565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000255826200022a565b9050919050565b620002678162000249565b811462000272575f80fd5b50565b5f8151905062000285816200025c565b92915050565b5f819050919050565b6200029f816200028b565b8114620002aa575f80fd5b50565b5f81519050620002bd8162000294565b92915050565b5f805f805f805f60e0888a031215620002e157620002e062000226565b5b5f620002f08a828b0162000275565b9750506020620003038a828b0162000275565b9650506040620003168a828b0162000275565b9550506060620003298a828b0162000275565b94505060806200033c8a828b0162000275565b93505060a06200034f8a828b01620002ad565b92505060c0620003628a828b01620002ad565b91505092959891949750929550565b5f82825260208201905092915050565b7f41737365742072657365727665206d75737420626520706f73697469766500005f82015250565b5f620003b7601e8362000371565b9150620003c48262000381565b602082019050919050565b5f6020820190508181035f830152620003e881620003a9565b9050919050565b7f4442522072657365727665206d75737420626520706f736974697665000000005f82015250565b5f62000425601c8362000371565b91506200043282620003ef565b602082019050919050565b5f6020820190508181035f830152620004568162000417565b9050919050565b60805160a051612498620004a95f395f81816104e1015281816105e1015281816107fc01528181610e960152818161103b01526112cb01525f818161131201526114e301526124985ff3fe608060405234801561000f575f80fd5b5060043610610171575f3560e01c8063703b801f116100dc578063c046371111610095578063d0164fef1161006f578063d0164fef146103b2578063d5cccb0f146103d0578063df5d7b63146103ec578063f08ff7db1461040a57610171565b8063c04637111461035a578063c7ed69cd14610378578063cfad57a21461039657610171565b8063703b801f146102c057806377607fa5146102ca57806391f3f522146102e6578063b23adea614610304578063b3ab15fb14610320578063b5a361fd1461033c57610171565b8063416dab161161012e578063416dab161461021157806354901c381461022d578063570ca7351461024c5780635a466bf71461026a57806362c06767146102885780636a438303146102a457610171565b806305f47cbb1461017557806312d43a51146101935780632df6b265146101b157806337e60313146101bb57806338d52e0f146101d7578063413d37a0146101f5575b5f80fd5b61017d610426565b60405161018a9190611a1d565b60405180910390f35b61019b61042c565b6040516101a89190611a75565b60405180910390f35b6101b961044f565b005b6101d560048036038101906101d09190611abc565b61065f565b005b6101df6107fa565b6040516101ec9190611b42565b60405180910390f35b61020f600480360381019061020a9190611abc565b61081e565b005b61022b60048036038101906102269190611b5b565b61099b565b005b610235610afe565b604051610243929190611b99565b60405180910390f35b610254610b81565b6040516102619190611a75565b60405180910390f35b610272610ba6565b60405161027f9190611a1d565b60405180910390f35b6102a2600480360381019061029d9190611bea565b610bac565b005b6102be60048036038101906102b99190611abc565b610c69565b005b6102c8610e04565b005b6102e460048036038101906102df9190611c3a565b611137565b005b6102ee611207565b6040516102fb9190611a1d565b60405180910390f35b61031e60048036038101906103199190611c65565b61120d565b005b61033a60048036038101906103359190611c3a565b611405565b005b6103446114d5565b6040516103519190611a1d565b60405180910390f35b6103626114db565b60405161036f9190611a1d565b60405180910390f35b6103806114e1565b60405161038d9190611cd5565b60405180910390f35b6103b060048036038101906103ab9190611c3a565b611505565b005b6103ba6115d4565b6040516103c79190611a1d565b60405180910390f35b6103ea60048036038101906103e59190611abc565b6115da565b005b6103f4611757565b6040516104019190611d0e565b60405180910390f35b610424600480360381019061041f9190611abc565b61177c565b005b60075481565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f73ffffffffffffffffffffffffffffffffffffffff1660025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d590611d81565b60405180910390fd5b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016105389190611a75565b602060405180830381865afa158015610553573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105779190611db3565b90505f81116105bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105b290611e28565b60405180910390fd5b6106255f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff16827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661194c9092919063ffffffff16565b7fea4657ed563e7d90e806a1a0ce85479d0f9bc3d55ab97c3d028de8a3d61fa617816040516106549190611a1d565b60405180910390a150565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106e390611e90565b60405180910390fd5b6106f4610afe565b60035f60045f849190505583919050555050426008819055505f811161074f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074690611ef8565b60405180910390fd5b5f600454600354836107619190611f43565b61076b9190611fb1565b90505f81116107af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a690612051565b60405180910390fd5b81600481905550806003819055507f5a32a6502605e65028c8c287a06abec9a14ed8abbe07d8d0ad110aedf2b7478e82826040516107ee929190611b99565b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108a290611e90565b60405180910390fd5b6108b3610afe565b60035f60045f84919050558391905055505042600881905550600654811015610911576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610908906120b9565b60405180910390fd5b806007819055507fdd48935a72c29480e95e6fadc0d41e9c9550f94c828712180492c41b59082f7c816040516109479190611a1d565b60405180910390a180600554111561099857806005819055507f9b831dcbec52dfe52b187da18aae08651dfb726e9baf49d5d9eae6fa264db3a18160405161098f9190611a1d565b60405180910390a15b50565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1f90611e90565b60405180910390fd5b5f8111610a6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6190612121565b60405180910390fd5b5f8211610aac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa390611ef8565b60405180910390fd5b8060038190555081600481905550426008819055507f5efbc472ac5a825fbb622f6fd2b4cda0368529483d3228a9469166d1325a32838183604051610af2929190611b99565b60405180910390a15050565b5f805f60085442610b0f919061213f565b90505f811115610b71575f600454600354610b2a9190611f43565b90505f6301e1338060055484610b409190611f43565b610b4a9190611fb1565b905080600454610b5a9190612172565b93508382610b689190611fb1565b94505050610b7c565b600354925060045491505b509091565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3090611e90565b60405180910390fd5b610c6482828573ffffffffffffffffffffffffffffffffffffffff1661194c9092919063ffffffff16565b505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610cf6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ced90611e90565b60405180910390fd5b610cfe610afe565b60035f60045f849190505583919050555050426008819055505f8111610d59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5090612121565b60405180910390fd5b5f60035460045483610d6b9190611f43565b610d759190611fb1565b90505f8111610db9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db090612215565b60405180910390fd5b81600381905550806004819055507f409590ec4a20118aa5aeb48f1dd7faedfb3107610b9c3d73ca74a789c12d0c038282604051610df8929190611b99565b60405180910390a15050565b5f73ffffffffffffffffffffffffffffffffffffffff1660025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610e93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e8a9061227d565b60405180910390fd5b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610eed9190611a75565b602060405180830381865afa158015610f08573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f2c9190611db3565b90505f8111610f70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6790611e28565b60405180910390fd5b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c40000d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fdb573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fff9190611db3565b90505f81831161100f5782611011565b815b905061107f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661194c9092919063ffffffff16565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638e708bca6040518163ffffffff1660e01b81526004015f604051808303815f87803b1580156110e5575f80fd5b505af11580156110f7573d5f803e3d5ffd5b505050507f2dcffc787cbeebfd1d32f24b27ee595c3707424d0b7c9a61b85101ad67555c5a8160405161112a9190611a1d565b60405180910390a1505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146111c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111bb90611e90565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60055481565b611215610afe565b60035f60045f849190505583919050555050426008819055505f60045460035461123f9190611f43565b90508360035f8282546112529190612172565b925050819055508260045f82825461126a919061213f565b92505081905550806004546003546112829190611f43565b10156112c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ba906122e5565b60405180910390fd5b6113103330867f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166119a0909392919063ffffffff16565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166340c10f1983856040518363ffffffff1660e01b815260040161136b929190612303565b5f604051808303815f87803b158015611382575f80fd5b505af1158015611394573d5f803e3d5ffd5b505050508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f89f5adc174562e07c9c9b1cae7109bbecb21cf9d1b2847e550042b8653c54a0e86866040516113f7929190611b99565b60405180910390a350505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611492576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148990611e90565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60065481565b60085481565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158990611e90565b60405180910390fd5b805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60045481565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611667576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165e90611e90565b60405180910390fd5b61166f610afe565b60035f60045f849190505583919050555050426008819055506007548111156116cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116c490612374565b60405180910390fd5b806006819055507f408c934f5091ad6adaf7bab95e60fcd8e2331da00d7da7dce1c2bea352c997d3816040516117039190611a1d565b60405180910390a180600554101561175457806005819055507f9b831dcbec52dfe52b187da18aae08651dfb726e9baf49d5d9eae6fa264db3a18160405161174b9190611a1d565b60405180910390a15b50565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061182157505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611860576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161185790611e90565b60405180910390fd5b611868610afe565b60035f60045f849190505583919050555050426008819055506007548111156118c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bd906123dc565b60405180910390fd5b60065481101561190b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190290612444565b60405180910390fd5b806005819055507f9b831dcbec52dfe52b187da18aae08651dfb726e9baf49d5d9eae6fa264db3a1816040516119419190611a1d565b60405180910390a150565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f51141661199657803d853b151710611995576390b8ec185f526004601cfd5b5b5f60345250505050565b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f5114166119f557803d873b1517106119f457637939f4245f526004601cfd5b5b5f60605281604052505050505050565b5f819050919050565b611a1781611a05565b82525050565b5f602082019050611a305f830184611a0e565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611a5f82611a36565b9050919050565b611a6f81611a55565b82525050565b5f602082019050611a885f830184611a66565b92915050565b5f80fd5b611a9b81611a05565b8114611aa5575f80fd5b50565b5f81359050611ab681611a92565b92915050565b5f60208284031215611ad157611ad0611a8e565b5b5f611ade84828501611aa8565b91505092915050565b5f819050919050565b5f611b0a611b05611b0084611a36565b611ae7565b611a36565b9050919050565b5f611b1b82611af0565b9050919050565b5f611b2c82611b11565b9050919050565b611b3c81611b22565b82525050565b5f602082019050611b555f830184611b33565b92915050565b5f8060408385031215611b7157611b70611a8e565b5b5f611b7e85828601611aa8565b9250506020611b8f85828601611aa8565b9150509250929050565b5f604082019050611bac5f830185611a0e565b611bb96020830184611a0e565b9392505050565b611bc981611a55565b8114611bd3575f80fd5b50565b5f81359050611be481611bc0565b92915050565b5f805f60608486031215611c0157611c00611a8e565b5b5f611c0e86828701611bd6565b9350506020611c1f86828701611bd6565b9250506040611c3086828701611aa8565b9150509250925092565b5f60208284031215611c4f57611c4e611a8e565b5b5f611c5c84828501611bd6565b91505092915050565b5f805f60608486031215611c7c57611c7b611a8e565b5b5f611c8986828701611aa8565b9350506020611c9a86828701611aa8565b9250506040611cab86828701611bd6565b9150509250925092565b5f611cbf82611b11565b9050919050565b611ccf81611cb5565b82525050565b5f602082019050611ce85f830184611cc6565b92915050565b5f611cf882611b11565b9050919050565b611d0881611cee565b82525050565b5f602082019050611d215f830184611cff565b92915050565b5f82825260208201905092915050565b7f53616c652068616e646c657220736574000000000000000000000000000000005f82015250565b5f611d6b601083611d27565b9150611d7682611d37565b602082019050919050565b5f6020820190508181035f830152611d9881611d5f565b9050919050565b5f81519050611dad81611a92565b92915050565b5f60208284031215611dc857611dc7611a8e565b5b5f611dd584828501611d9f565b91505092915050565b7f4e6f20617373657420746f2073656e64000000000000000000000000000000005f82015250565b5f611e12601083611d27565b9150611e1d82611dde565b602082019050919050565b5f6020820190508181035f830152611e3f81611e06565b9050919050565b7f6f6e6c79476f76000000000000000000000000000000000000000000000000005f82015250565b5f611e7a600783611d27565b9150611e8582611e46565b602082019050919050565b5f6020820190508181035f830152611ea781611e6e565b9050919050565b7f4442522072657365727665206d75737420626520706f736974697665000000005f82015250565b5f611ee2601c83611d27565b9150611eed82611eae565b602082019050919050565b5f6020820190508181035f830152611f0f81611ed6565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611f4d82611a05565b9150611f5883611a05565b9250828202611f6681611a05565b91508282048414831517611f7d57611f7c611f16565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f611fbb82611a05565b9150611fc683611a05565b925082611fd657611fd5611f84565b5b828204905092915050565b7f526573756c74696e672061737365742072657365727665206d757374206265205f8201527f706f736974697665000000000000000000000000000000000000000000000000602082015250565b5f61203b602883611d27565b915061204682611fe1565b604082019050919050565b5f6020820190508181035f8301526120688161202f565b9050919050565b7f4d61782062656c6f77206d696e000000000000000000000000000000000000005f82015250565b5f6120a3600d83611d27565b91506120ae8261206f565b602082019050919050565b5f6020820190508181035f8301526120d081612097565b9050919050565b7f41737365742072657365727665206d75737420626520706f73697469766500005f82015250565b5f61210b601e83611d27565b9150612116826120d7565b602082019050919050565b5f6020820190508181035f830152612138816120ff565b9050919050565b5f61214982611a05565b915061215483611a05565b925082820390508181111561216c5761216b611f16565b5b92915050565b5f61217c82611a05565b915061218783611a05565b925082820190508082111561219f5761219e611f16565b5b92915050565b7f526573756c74696e67204442522072657365727665206d75737420626520706f5f8201527f7369746976650000000000000000000000000000000000000000000000000000602082015250565b5f6121ff602683611d27565b915061220a826121a5565b604082019050919050565b5f6020820190508181035f83015261222c816121f3565b9050919050565b7f4e6f2073616c652068616e646c657200000000000000000000000000000000005f82015250565b5f612267600f83611d27565b915061227282612233565b602082019050919050565b5f6020820190508181035f8301526122948161225b565b9050919050565b7f496e76617269616e7400000000000000000000000000000000000000000000005f82015250565b5f6122cf600983611d27565b91506122da8261229b565b602082019050919050565b5f6020820190508181035f8301526122fc816122c3565b9050919050565b5f6040820190506123165f830185611a66565b6123236020830184611a0e565b9392505050565b7f4d696e2061626f7665206d6178000000000000000000000000000000000000005f82015250565b5f61235e600d83611d27565b91506123698261232a565b602082019050919050565b5f6020820190508181035f83015261238b81612352565b9050919050565b7f526174652065786365656473206d6178000000000000000000000000000000005f82015250565b5f6123c6601083611d27565b91506123d182612392565b602082019050919050565b5f6020820190508181035f8301526123f3816123ba565b9050919050565b7f526174652062656c6f77206d696e0000000000000000000000000000000000005f82015250565b5f61242e600e83611d27565b9150612439826123fa565b602082019050919050565b5f6020820190508181035f83015261245b81612422565b905091905056fea2646970667358221220d2b4d16967f9ea5e129e0e175b9185de3ba493e32fa0e0bd7fa72d3e4d72fc6464736f6c63430008150033000000000000000000000000926df14a23be491164dcf93f4c468a50ef659d5b0000000000000000000000009d5df30f475cea915b1ed4c0cca59255c897b61b000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d71000000000000000000000000041d5d79431a913c4ae7d69a668ecdfe5ff9dfb680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043c33c1937564800000000000000000000000000000000000000000000000069e10de76676d0800000", + "nonce": "0x588", + "chainId": "0x1" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x35ceb594ae7609944f90c676984554068d3a2c84c92ab7a864c547369da85159", + "transactionType": "CREATE", + "contractName": "Helper", + "contractAddress": "0x658890f633b6892c1ba13247502791ad6da1c266", + "function": null, + "arguments": [ + "0x7Cac7f6BE1f74D00d874BBAcb98b531FA889D613", + "0x41D5D79431A913C4aE7d69a668ecdfE5fF9DFB68" + ], + "transaction": { + "from": "0x3fcb35a1cbfb6007f9bc638d388958bc4550cb28", + "gas": "0xf03ca", + "value": "0x0", + "input": "0x60c060405234801562000010575f80fd5b5060405162000e6438038062000e648339818101604052810190620000369190620001b0565b8173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1681525050620000ed827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60a05173ffffffffffffffffffffffffffffffffffffffff16620000f560201b9092919060201c565b5050620001f5565b81601452806034526f095ea7b30000000000000000000000005f5260205f604460105f875af18060015f5114166200014157803d853b1517106200014057633e3f8f735f526004601cfd5b5b5f60345250505050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6200017a826200014f565b9050919050565b6200018c816200016e565b811462000197575f80fd5b50565b5f81519050620001aa8162000181565b92915050565b5f8060408385031215620001c957620001c86200014b565b5b5f620001d8858286016200019a565b9250506020620001eb858286016200019a565b9150509250929050565b60805160a051610c23620002415f395f8181610162015281816101db015261030701525f81816102220152818161034e015281816103de01528181610447015261055d0152610c235ff3fe608060405234801561000f575f80fd5b5060043610610060575f3560e01c806338d52e0f146100645780634640558d14610082578063618ae953146100b25780637d9f6db5146100e2578063d12d5cb814610100578063f002a44814610130575b5f80fd5b61006c610160565b60405161007991906106ff565b60405180910390f35b61009c6004803603810190610097919061074f565b610184565b6040516100a9919061079c565b60405180910390f35b6100cc60048036038101906100c7919061074f565b6102b0565b6040516100d9919061079c565b60405180910390f35b6100ea6103dc565b6040516100f791906107d5565b60405180910390f35b61011a600480360381019061011591906107ee565b610400565b604051610127919061079c565b60405180910390f35b61014a600480360381019061014591906107ee565b610516565b604051610157919061079c565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5f61018e83610516565b9050818110156101d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ca90610899565b60405180910390fd5b6102203330857f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610620909392919063ffffffff16565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b23adea68483336040518463ffffffff1660e01b815260040161027d939291906108d7565b5f604051808303815f87803b158015610294575f80fd5b505af11580156102a6573d5f803e3d5ffd5b5050505092915050565b5f6102ba83610400565b9050818111156102ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f69061097c565b60405180910390fd5b61034c3330837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610620909392919063ffffffff16565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b23adea68285336040518463ffffffff1660e01b81526004016103a9939291906108d7565b5f604051808303815f87803b1580156103c0575f80fd5b505af11580156103d2573d5f803e3d5ffd5b5050505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f808211610443576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043a906109e4565b60405180910390fd5b5f807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166354901c386040518163ffffffff1660e01b81526004016040805180830381865afa1580156104ad573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104d19190610a16565b915091505f82856104e29190610a81565b90505f85836104f19190610ac2565b9050600181836105019190610b22565b61050b9190610b52565b945050505050919050565b5f808211610559576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055090610bcf565b60405180910390fd5b5f807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166354901c386040518163ffffffff1660e01b81526004016040805180830381865afa1580156105c3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105e79190610a16565b915091505f81856105f89190610a81565b90505f85846106079190610b52565b905080826106159190610b22565b945050505050919050565b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f51141661067557803d873b15171061067457637939f4245f526004601cfd5b5b5f60605281604052505050505050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f6106c76106c26106bd84610685565b6106a4565b610685565b9050919050565b5f6106d8826106ad565b9050919050565b5f6106e9826106ce565b9050919050565b6106f9816106df565b82525050565b5f6020820190506107125f8301846106f0565b92915050565b5f80fd5b5f819050919050565b61072e8161071c565b8114610738575f80fd5b50565b5f8135905061074981610725565b92915050565b5f806040838503121561076557610764610718565b5b5f6107728582860161073b565b92505060206107838582860161073b565b9150509250929050565b6107968161071c565b82525050565b5f6020820190506107af5f83018461078d565b92915050565b5f6107bf826106ce565b9050919050565b6107cf816107b5565b82525050565b5f6020820190506107e85f8301846107c6565b92915050565b5f6020828403121561080357610802610718565b5b5f6108108482850161073b565b91505092915050565b5f82825260208201905092915050565b7f6462724f7574206d7573742062652067726561746572207468616e206462724f5f8201527f75744d696e000000000000000000000000000000000000000000000000000000602082015250565b5f610883602583610819565b915061088e82610829565b604082019050919050565b5f6020820190508181035f8301526108b081610877565b9050919050565b5f6108c182610685565b9050919050565b6108d1816108b7565b82525050565b5f6060820190506108ea5f83018661078d565b6108f7602083018561078d565b61090460408301846108c8565b949350505050565b7f6173736574496e206d757374206265206c657373207468616e206173736574495f8201527f6e4d617800000000000000000000000000000000000000000000000000000000602082015250565b5f610966602483610819565b91506109718261090c565b604082019050919050565b5f6020820190508181035f8301526109938161095a565b9050919050565b7f6462724f7574206d75737420626520706f7369746976650000000000000000005f82015250565b5f6109ce601783610819565b91506109d98261099a565b602082019050919050565b5f6020820190508181035f8301526109fb816109c2565b9050919050565b5f81519050610a1081610725565b92915050565b5f8060408385031215610a2c57610a2b610718565b5b5f610a3985828601610a02565b9250506020610a4a85828601610a02565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610a8b8261071c565b9150610a968361071c565b9250828202610aa48161071c565b91508282048414831517610abb57610aba610a54565b5b5092915050565b5f610acc8261071c565b9150610ad78361071c565b9250828203905081811115610aef57610aee610a54565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f610b2c8261071c565b9150610b378361071c565b925082610b4757610b46610af5565b5b828204905092915050565b5f610b5c8261071c565b9150610b678361071c565b9250828201905080821115610b7f57610b7e610a54565b5b92915050565b7f6173736574496e206d75737420626520706f73697469766500000000000000005f82015250565b5f610bb9601883610819565b9150610bc482610b85565b602082019050919050565b5f6020820190508181035f830152610be681610bad565b905091905056fea2646970667358221220b6739e31b770bcd2512d81f6c8ede2e7fc566f5148f2cf987bf2b98eedaf908164736f6c634300081500330000000000000000000000007cac7f6be1f74d00d874bbacb98b531fa889d61300000000000000000000000041d5d79431a913c4ae7d69a668ecdfe5ff9dfb68", + "nonce": "0x589", + "chainId": "0x1" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x136f987", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x35ceb594ae7609944f90c676984554068d3a2c84c92ab7a864c547369da85159", + "transactionIndex": "0x11d", + "blockHash": "0xab0062b2cddfa0f127cd766007355f8a25e593e5a60b318a72229afde2257f48", + "blockNumber": "0x1749a59", + "gasUsed": "0x218940", + "effectiveGasPrice": "0x46d743b", + "from": "0x3fcb35a1cbfb6007f9bc638d388958bc4550cb28", + "to": null, + "contractAddress": "0x7cac7f6be1f74d00d874bbacb98b531fa889d613" + }, + { + "status": "0x1", + "cumulativeGasUsed": "0x161b2fe", + "logs": [ + { + "address": "0x41d5d79431a913c4ae7d69a668ecdfe5ff9dfb68", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000658890f633b6892c1ba13247502791ad6da1c266", + "0x0000000000000000000000007cac7f6be1f74d00d874bbacb98b531fa889d613" + ], + "data": "0x0000000000000000000000000000000000000000ffffffffffffffffffffffff", + "blockHash": "0x8e08f0103b26d7f7b5ecda6a456569e2748e00f185644825a8f8eef5405d8f0d", + "blockNumber": "0x1749a5a", + "blockTimestamp": "0x6989c4cb", + "transactionHash": "0xbb310bf14648181e86abc1f567e5dea30407bc2da05cc50d307acbb7bf0277a1", + "transactionIndex": "0xc8", + "logIndex": "0x24d", + "removed": false + } + ], + "logsBloom": "0x00000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000004000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000002000000000000010000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000002000000000000000000110000000000002000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0xbb310bf14648181e86abc1f567e5dea30407bc2da05cc50d307acbb7bf0277a1", + "transactionIndex": "0xc8", + "blockHash": "0x8e08f0103b26d7f7b5ecda6a456569e2748e00f185644825a8f8eef5405d8f0d", + "blockNumber": "0x1749a5a", + "gasUsed": "0xb8cc3", + "effectiveGasPrice": "0x44bc8ed", + "from": "0x3fcb35a1cbfb6007f9bc638d388958bc4550cb28", + "to": null, + "contractAddress": "0x658890f633b6892c1ba13247502791ad6da1c266" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1770636532051, + "chain": 1, + "commit": "c60b552" +} \ No newline at end of file diff --git a/broadcast/AuctionMainnetDeployer.s.sol/1/run-latest.json b/broadcast/AuctionMainnetDeployer.s.sol/1/run-latest.json new file mode 100644 index 0000000..5b708c3 --- /dev/null +++ b/broadcast/AuctionMainnetDeployer.s.sol/1/run-latest.json @@ -0,0 +1,108 @@ +{ + "transactions": [ + { + "hash": "0xbb310bf14648181e86abc1f567e5dea30407bc2da05cc50d307acbb7bf0277a1", + "transactionType": "CREATE", + "contractName": "Auction", + "contractAddress": "0x7cac7f6be1f74d00d874bbacb98b531fa889d613", + "function": null, + "arguments": [ + "0x926dF14a23BE491164dCF93f4c468A50ef659D5B", + "0x9D5Df30F475CEA915b1ed4C0CCa59255C897b61B", + "0xAD038Eb671c44b853887A7E32528FaB35dC5D710", + "0x41D5D79431A913C4aE7d69a668ecdfE5fF9DFB68", + "0x0000000000000000000000000000000000000000", + "1250000000000000000000", + "500000000000000000000000" + ], + "transaction": { + "from": "0x3fcb35a1cbfb6007f9bc638d388958bc4550cb28", + "gas": "0x2b98d3", + "value": "0x0", + "input": "0x60c06040527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60075534801562000034575f80fd5b50604051620029413803806200294183398181016040528101906200005a9190620002c3565b5f82116200009f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200009690620003cf565b60405180910390fd5b5f8111620000e4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000db906200043d565b60405180910390fd5b865f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508473ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508373ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508260025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160038190555080600481905550505050505050506200045d565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000255826200022a565b9050919050565b620002678162000249565b811462000272575f80fd5b50565b5f8151905062000285816200025c565b92915050565b5f819050919050565b6200029f816200028b565b8114620002aa575f80fd5b50565b5f81519050620002bd8162000294565b92915050565b5f805f805f805f60e0888a031215620002e157620002e062000226565b5b5f620002f08a828b0162000275565b9750506020620003038a828b0162000275565b9650506040620003168a828b0162000275565b9550506060620003298a828b0162000275565b94505060806200033c8a828b0162000275565b93505060a06200034f8a828b01620002ad565b92505060c0620003628a828b01620002ad565b91505092959891949750929550565b5f82825260208201905092915050565b7f41737365742072657365727665206d75737420626520706f73697469766500005f82015250565b5f620003b7601e8362000371565b9150620003c48262000381565b602082019050919050565b5f6020820190508181035f830152620003e881620003a9565b9050919050565b7f4442522072657365727665206d75737420626520706f736974697665000000005f82015250565b5f62000425601c8362000371565b91506200043282620003ef565b602082019050919050565b5f6020820190508181035f830152620004568162000417565b9050919050565b60805160a051612498620004a95f395f81816104e1015281816105e1015281816107fc01528181610e960152818161103b01526112cb01525f818161131201526114e301526124985ff3fe608060405234801561000f575f80fd5b5060043610610171575f3560e01c8063703b801f116100dc578063c046371111610095578063d0164fef1161006f578063d0164fef146103b2578063d5cccb0f146103d0578063df5d7b63146103ec578063f08ff7db1461040a57610171565b8063c04637111461035a578063c7ed69cd14610378578063cfad57a21461039657610171565b8063703b801f146102c057806377607fa5146102ca57806391f3f522146102e6578063b23adea614610304578063b3ab15fb14610320578063b5a361fd1461033c57610171565b8063416dab161161012e578063416dab161461021157806354901c381461022d578063570ca7351461024c5780635a466bf71461026a57806362c06767146102885780636a438303146102a457610171565b806305f47cbb1461017557806312d43a51146101935780632df6b265146101b157806337e60313146101bb57806338d52e0f146101d7578063413d37a0146101f5575b5f80fd5b61017d610426565b60405161018a9190611a1d565b60405180910390f35b61019b61042c565b6040516101a89190611a75565b60405180910390f35b6101b961044f565b005b6101d560048036038101906101d09190611abc565b61065f565b005b6101df6107fa565b6040516101ec9190611b42565b60405180910390f35b61020f600480360381019061020a9190611abc565b61081e565b005b61022b60048036038101906102269190611b5b565b61099b565b005b610235610afe565b604051610243929190611b99565b60405180910390f35b610254610b81565b6040516102619190611a75565b60405180910390f35b610272610ba6565b60405161027f9190611a1d565b60405180910390f35b6102a2600480360381019061029d9190611bea565b610bac565b005b6102be60048036038101906102b99190611abc565b610c69565b005b6102c8610e04565b005b6102e460048036038101906102df9190611c3a565b611137565b005b6102ee611207565b6040516102fb9190611a1d565b60405180910390f35b61031e60048036038101906103199190611c65565b61120d565b005b61033a60048036038101906103359190611c3a565b611405565b005b6103446114d5565b6040516103519190611a1d565b60405180910390f35b6103626114db565b60405161036f9190611a1d565b60405180910390f35b6103806114e1565b60405161038d9190611cd5565b60405180910390f35b6103b060048036038101906103ab9190611c3a565b611505565b005b6103ba6115d4565b6040516103c79190611a1d565b60405180910390f35b6103ea60048036038101906103e59190611abc565b6115da565b005b6103f4611757565b6040516104019190611d0e565b60405180910390f35b610424600480360381019061041f9190611abc565b61177c565b005b60075481565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f73ffffffffffffffffffffffffffffffffffffffff1660025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d590611d81565b60405180910390fd5b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016105389190611a75565b602060405180830381865afa158015610553573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105779190611db3565b90505f81116105bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105b290611e28565b60405180910390fd5b6106255f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff16827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661194c9092919063ffffffff16565b7fea4657ed563e7d90e806a1a0ce85479d0f9bc3d55ab97c3d028de8a3d61fa617816040516106549190611a1d565b60405180910390a150565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106e390611e90565b60405180910390fd5b6106f4610afe565b60035f60045f849190505583919050555050426008819055505f811161074f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074690611ef8565b60405180910390fd5b5f600454600354836107619190611f43565b61076b9190611fb1565b90505f81116107af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a690612051565b60405180910390fd5b81600481905550806003819055507f5a32a6502605e65028c8c287a06abec9a14ed8abbe07d8d0ad110aedf2b7478e82826040516107ee929190611b99565b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108a290611e90565b60405180910390fd5b6108b3610afe565b60035f60045f84919050558391905055505042600881905550600654811015610911576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610908906120b9565b60405180910390fd5b806007819055507fdd48935a72c29480e95e6fadc0d41e9c9550f94c828712180492c41b59082f7c816040516109479190611a1d565b60405180910390a180600554111561099857806005819055507f9b831dcbec52dfe52b187da18aae08651dfb726e9baf49d5d9eae6fa264db3a18160405161098f9190611a1d565b60405180910390a15b50565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1f90611e90565b60405180910390fd5b5f8111610a6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6190612121565b60405180910390fd5b5f8211610aac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa390611ef8565b60405180910390fd5b8060038190555081600481905550426008819055507f5efbc472ac5a825fbb622f6fd2b4cda0368529483d3228a9469166d1325a32838183604051610af2929190611b99565b60405180910390a15050565b5f805f60085442610b0f919061213f565b90505f811115610b71575f600454600354610b2a9190611f43565b90505f6301e1338060055484610b409190611f43565b610b4a9190611fb1565b905080600454610b5a9190612172565b93508382610b689190611fb1565b94505050610b7c565b600354925060045491505b509091565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3090611e90565b60405180910390fd5b610c6482828573ffffffffffffffffffffffffffffffffffffffff1661194c9092919063ffffffff16565b505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610cf6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ced90611e90565b60405180910390fd5b610cfe610afe565b60035f60045f849190505583919050555050426008819055505f8111610d59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5090612121565b60405180910390fd5b5f60035460045483610d6b9190611f43565b610d759190611fb1565b90505f8111610db9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db090612215565b60405180910390fd5b81600381905550806004819055507f409590ec4a20118aa5aeb48f1dd7faedfb3107610b9c3d73ca74a789c12d0c038282604051610df8929190611b99565b60405180910390a15050565b5f73ffffffffffffffffffffffffffffffffffffffff1660025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610e93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e8a9061227d565b60405180910390fd5b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610eed9190611a75565b602060405180830381865afa158015610f08573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f2c9190611db3565b90505f8111610f70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6790611e28565b60405180910390fd5b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c40000d46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fdb573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fff9190611db3565b90505f81831161100f5782611011565b815b905061107f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661194c9092919063ffffffff16565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638e708bca6040518163ffffffff1660e01b81526004015f604051808303815f87803b1580156110e5575f80fd5b505af11580156110f7573d5f803e3d5ffd5b505050507f2dcffc787cbeebfd1d32f24b27ee595c3707424d0b7c9a61b85101ad67555c5a8160405161112a9190611a1d565b60405180910390a1505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146111c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111bb90611e90565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60055481565b611215610afe565b60035f60045f849190505583919050555050426008819055505f60045460035461123f9190611f43565b90508360035f8282546112529190612172565b925050819055508260045f82825461126a919061213f565b92505081905550806004546003546112829190611f43565b10156112c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ba906122e5565b60405180910390fd5b6113103330867f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166119a0909392919063ffffffff16565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166340c10f1983856040518363ffffffff1660e01b815260040161136b929190612303565b5f604051808303815f87803b158015611382575f80fd5b505af1158015611394573d5f803e3d5ffd5b505050508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f89f5adc174562e07c9c9b1cae7109bbecb21cf9d1b2847e550042b8653c54a0e86866040516113f7929190611b99565b60405180910390a350505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611492576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148990611e90565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60065481565b60085481565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158990611e90565b60405180910390fd5b805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60045481565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611667576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165e90611e90565b60405180910390fd5b61166f610afe565b60035f60045f849190505583919050555050426008819055506007548111156116cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116c490612374565b60405180910390fd5b806006819055507f408c934f5091ad6adaf7bab95e60fcd8e2331da00d7da7dce1c2bea352c997d3816040516117039190611a1d565b60405180910390a180600554101561175457806005819055507f9b831dcbec52dfe52b187da18aae08651dfb726e9baf49d5d9eae6fa264db3a18160405161174b9190611a1d565b60405180910390a15b50565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061182157505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611860576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161185790611e90565b60405180910390fd5b611868610afe565b60035f60045f849190505583919050555050426008819055506007548111156118c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bd906123dc565b60405180910390fd5b60065481101561190b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190290612444565b60405180910390fd5b806005819055507f9b831dcbec52dfe52b187da18aae08651dfb726e9baf49d5d9eae6fa264db3a1816040516119419190611a1d565b60405180910390a150565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f51141661199657803d853b151710611995576390b8ec185f526004601cfd5b5b5f60345250505050565b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f5114166119f557803d873b1517106119f457637939f4245f526004601cfd5b5b5f60605281604052505050505050565b5f819050919050565b611a1781611a05565b82525050565b5f602082019050611a305f830184611a0e565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611a5f82611a36565b9050919050565b611a6f81611a55565b82525050565b5f602082019050611a885f830184611a66565b92915050565b5f80fd5b611a9b81611a05565b8114611aa5575f80fd5b50565b5f81359050611ab681611a92565b92915050565b5f60208284031215611ad157611ad0611a8e565b5b5f611ade84828501611aa8565b91505092915050565b5f819050919050565b5f611b0a611b05611b0084611a36565b611ae7565b611a36565b9050919050565b5f611b1b82611af0565b9050919050565b5f611b2c82611b11565b9050919050565b611b3c81611b22565b82525050565b5f602082019050611b555f830184611b33565b92915050565b5f8060408385031215611b7157611b70611a8e565b5b5f611b7e85828601611aa8565b9250506020611b8f85828601611aa8565b9150509250929050565b5f604082019050611bac5f830185611a0e565b611bb96020830184611a0e565b9392505050565b611bc981611a55565b8114611bd3575f80fd5b50565b5f81359050611be481611bc0565b92915050565b5f805f60608486031215611c0157611c00611a8e565b5b5f611c0e86828701611bd6565b9350506020611c1f86828701611bd6565b9250506040611c3086828701611aa8565b9150509250925092565b5f60208284031215611c4f57611c4e611a8e565b5b5f611c5c84828501611bd6565b91505092915050565b5f805f60608486031215611c7c57611c7b611a8e565b5b5f611c8986828701611aa8565b9350506020611c9a86828701611aa8565b9250506040611cab86828701611bd6565b9150509250925092565b5f611cbf82611b11565b9050919050565b611ccf81611cb5565b82525050565b5f602082019050611ce85f830184611cc6565b92915050565b5f611cf882611b11565b9050919050565b611d0881611cee565b82525050565b5f602082019050611d215f830184611cff565b92915050565b5f82825260208201905092915050565b7f53616c652068616e646c657220736574000000000000000000000000000000005f82015250565b5f611d6b601083611d27565b9150611d7682611d37565b602082019050919050565b5f6020820190508181035f830152611d9881611d5f565b9050919050565b5f81519050611dad81611a92565b92915050565b5f60208284031215611dc857611dc7611a8e565b5b5f611dd584828501611d9f565b91505092915050565b7f4e6f20617373657420746f2073656e64000000000000000000000000000000005f82015250565b5f611e12601083611d27565b9150611e1d82611dde565b602082019050919050565b5f6020820190508181035f830152611e3f81611e06565b9050919050565b7f6f6e6c79476f76000000000000000000000000000000000000000000000000005f82015250565b5f611e7a600783611d27565b9150611e8582611e46565b602082019050919050565b5f6020820190508181035f830152611ea781611e6e565b9050919050565b7f4442522072657365727665206d75737420626520706f736974697665000000005f82015250565b5f611ee2601c83611d27565b9150611eed82611eae565b602082019050919050565b5f6020820190508181035f830152611f0f81611ed6565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611f4d82611a05565b9150611f5883611a05565b9250828202611f6681611a05565b91508282048414831517611f7d57611f7c611f16565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f611fbb82611a05565b9150611fc683611a05565b925082611fd657611fd5611f84565b5b828204905092915050565b7f526573756c74696e672061737365742072657365727665206d757374206265205f8201527f706f736974697665000000000000000000000000000000000000000000000000602082015250565b5f61203b602883611d27565b915061204682611fe1565b604082019050919050565b5f6020820190508181035f8301526120688161202f565b9050919050565b7f4d61782062656c6f77206d696e000000000000000000000000000000000000005f82015250565b5f6120a3600d83611d27565b91506120ae8261206f565b602082019050919050565b5f6020820190508181035f8301526120d081612097565b9050919050565b7f41737365742072657365727665206d75737420626520706f73697469766500005f82015250565b5f61210b601e83611d27565b9150612116826120d7565b602082019050919050565b5f6020820190508181035f830152612138816120ff565b9050919050565b5f61214982611a05565b915061215483611a05565b925082820390508181111561216c5761216b611f16565b5b92915050565b5f61217c82611a05565b915061218783611a05565b925082820190508082111561219f5761219e611f16565b5b92915050565b7f526573756c74696e67204442522072657365727665206d75737420626520706f5f8201527f7369746976650000000000000000000000000000000000000000000000000000602082015250565b5f6121ff602683611d27565b915061220a826121a5565b604082019050919050565b5f6020820190508181035f83015261222c816121f3565b9050919050565b7f4e6f2073616c652068616e646c657200000000000000000000000000000000005f82015250565b5f612267600f83611d27565b915061227282612233565b602082019050919050565b5f6020820190508181035f8301526122948161225b565b9050919050565b7f496e76617269616e7400000000000000000000000000000000000000000000005f82015250565b5f6122cf600983611d27565b91506122da8261229b565b602082019050919050565b5f6020820190508181035f8301526122fc816122c3565b9050919050565b5f6040820190506123165f830185611a66565b6123236020830184611a0e565b9392505050565b7f4d696e2061626f7665206d6178000000000000000000000000000000000000005f82015250565b5f61235e600d83611d27565b91506123698261232a565b602082019050919050565b5f6020820190508181035f83015261238b81612352565b9050919050565b7f526174652065786365656473206d6178000000000000000000000000000000005f82015250565b5f6123c6601083611d27565b91506123d182612392565b602082019050919050565b5f6020820190508181035f8301526123f3816123ba565b9050919050565b7f526174652062656c6f77206d696e0000000000000000000000000000000000005f82015250565b5f61242e600e83611d27565b9150612439826123fa565b602082019050919050565b5f6020820190508181035f83015261245b81612422565b905091905056fea2646970667358221220d2b4d16967f9ea5e129e0e175b9185de3ba493e32fa0e0bd7fa72d3e4d72fc6464736f6c63430008150033000000000000000000000000926df14a23be491164dcf93f4c468a50ef659d5b0000000000000000000000009d5df30f475cea915b1ed4c0cca59255c897b61b000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d71000000000000000000000000041d5d79431a913c4ae7d69a668ecdfe5ff9dfb680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043c33c1937564800000000000000000000000000000000000000000000000069e10de76676d0800000", + "nonce": "0x588", + "chainId": "0x1" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x35ceb594ae7609944f90c676984554068d3a2c84c92ab7a864c547369da85159", + "transactionType": "CREATE", + "contractName": "Helper", + "contractAddress": "0x658890f633b6892c1ba13247502791ad6da1c266", + "function": null, + "arguments": [ + "0x7Cac7f6BE1f74D00d874BBAcb98b531FA889D613", + "0x41D5D79431A913C4aE7d69a668ecdfE5fF9DFB68" + ], + "transaction": { + "from": "0x3fcb35a1cbfb6007f9bc638d388958bc4550cb28", + "gas": "0xf03ca", + "value": "0x0", + "input": "0x60c060405234801562000010575f80fd5b5060405162000e6438038062000e648339818101604052810190620000369190620001b0565b8173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1681525050620000ed827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60a05173ffffffffffffffffffffffffffffffffffffffff16620000f560201b9092919060201c565b5050620001f5565b81601452806034526f095ea7b30000000000000000000000005f5260205f604460105f875af18060015f5114166200014157803d853b1517106200014057633e3f8f735f526004601cfd5b5b5f60345250505050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6200017a826200014f565b9050919050565b6200018c816200016e565b811462000197575f80fd5b50565b5f81519050620001aa8162000181565b92915050565b5f8060408385031215620001c957620001c86200014b565b5b5f620001d8858286016200019a565b9250506020620001eb858286016200019a565b9150509250929050565b60805160a051610c23620002415f395f8181610162015281816101db015261030701525f81816102220152818161034e015281816103de01528181610447015261055d0152610c235ff3fe608060405234801561000f575f80fd5b5060043610610060575f3560e01c806338d52e0f146100645780634640558d14610082578063618ae953146100b25780637d9f6db5146100e2578063d12d5cb814610100578063f002a44814610130575b5f80fd5b61006c610160565b60405161007991906106ff565b60405180910390f35b61009c6004803603810190610097919061074f565b610184565b6040516100a9919061079c565b60405180910390f35b6100cc60048036038101906100c7919061074f565b6102b0565b6040516100d9919061079c565b60405180910390f35b6100ea6103dc565b6040516100f791906107d5565b60405180910390f35b61011a600480360381019061011591906107ee565b610400565b604051610127919061079c565b60405180910390f35b61014a600480360381019061014591906107ee565b610516565b604051610157919061079c565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5f61018e83610516565b9050818110156101d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ca90610899565b60405180910390fd5b6102203330857f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610620909392919063ffffffff16565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b23adea68483336040518463ffffffff1660e01b815260040161027d939291906108d7565b5f604051808303815f87803b158015610294575f80fd5b505af11580156102a6573d5f803e3d5ffd5b5050505092915050565b5f6102ba83610400565b9050818111156102ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f69061097c565b60405180910390fd5b61034c3330837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610620909392919063ffffffff16565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b23adea68285336040518463ffffffff1660e01b81526004016103a9939291906108d7565b5f604051808303815f87803b1580156103c0575f80fd5b505af11580156103d2573d5f803e3d5ffd5b5050505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f808211610443576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043a906109e4565b60405180910390fd5b5f807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166354901c386040518163ffffffff1660e01b81526004016040805180830381865afa1580156104ad573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104d19190610a16565b915091505f82856104e29190610a81565b90505f85836104f19190610ac2565b9050600181836105019190610b22565b61050b9190610b52565b945050505050919050565b5f808211610559576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055090610bcf565b60405180910390fd5b5f807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166354901c386040518163ffffffff1660e01b81526004016040805180830381865afa1580156105c3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105e79190610a16565b915091505f81856105f89190610a81565b90505f85846106079190610b52565b905080826106159190610b22565b945050505050919050565b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f51141661067557803d873b15171061067457637939f4245f526004601cfd5b5b5f60605281604052505050505050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f6106c76106c26106bd84610685565b6106a4565b610685565b9050919050565b5f6106d8826106ad565b9050919050565b5f6106e9826106ce565b9050919050565b6106f9816106df565b82525050565b5f6020820190506107125f8301846106f0565b92915050565b5f80fd5b5f819050919050565b61072e8161071c565b8114610738575f80fd5b50565b5f8135905061074981610725565b92915050565b5f806040838503121561076557610764610718565b5b5f6107728582860161073b565b92505060206107838582860161073b565b9150509250929050565b6107968161071c565b82525050565b5f6020820190506107af5f83018461078d565b92915050565b5f6107bf826106ce565b9050919050565b6107cf816107b5565b82525050565b5f6020820190506107e85f8301846107c6565b92915050565b5f6020828403121561080357610802610718565b5b5f6108108482850161073b565b91505092915050565b5f82825260208201905092915050565b7f6462724f7574206d7573742062652067726561746572207468616e206462724f5f8201527f75744d696e000000000000000000000000000000000000000000000000000000602082015250565b5f610883602583610819565b915061088e82610829565b604082019050919050565b5f6020820190508181035f8301526108b081610877565b9050919050565b5f6108c182610685565b9050919050565b6108d1816108b7565b82525050565b5f6060820190506108ea5f83018661078d565b6108f7602083018561078d565b61090460408301846108c8565b949350505050565b7f6173736574496e206d757374206265206c657373207468616e206173736574495f8201527f6e4d617800000000000000000000000000000000000000000000000000000000602082015250565b5f610966602483610819565b91506109718261090c565b604082019050919050565b5f6020820190508181035f8301526109938161095a565b9050919050565b7f6462724f7574206d75737420626520706f7369746976650000000000000000005f82015250565b5f6109ce601783610819565b91506109d98261099a565b602082019050919050565b5f6020820190508181035f8301526109fb816109c2565b9050919050565b5f81519050610a1081610725565b92915050565b5f8060408385031215610a2c57610a2b610718565b5b5f610a3985828601610a02565b9250506020610a4a85828601610a02565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610a8b8261071c565b9150610a968361071c565b9250828202610aa48161071c565b91508282048414831517610abb57610aba610a54565b5b5092915050565b5f610acc8261071c565b9150610ad78361071c565b9250828203905081811115610aef57610aee610a54565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f610b2c8261071c565b9150610b378361071c565b925082610b4757610b46610af5565b5b828204905092915050565b5f610b5c8261071c565b9150610b678361071c565b9250828201905080821115610b7f57610b7e610a54565b5b92915050565b7f6173736574496e206d75737420626520706f73697469766500000000000000005f82015250565b5f610bb9601883610819565b9150610bc482610b85565b602082019050919050565b5f6020820190508181035f830152610be681610bad565b905091905056fea2646970667358221220b6739e31b770bcd2512d81f6c8ede2e7fc566f5148f2cf987bf2b98eedaf908164736f6c634300081500330000000000000000000000007cac7f6be1f74d00d874bbacb98b531fa889d61300000000000000000000000041d5d79431a913c4ae7d69a668ecdfe5ff9dfb68", + "nonce": "0x589", + "chainId": "0x1" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x136f987", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x35ceb594ae7609944f90c676984554068d3a2c84c92ab7a864c547369da85159", + "transactionIndex": "0x11d", + "blockHash": "0xab0062b2cddfa0f127cd766007355f8a25e593e5a60b318a72229afde2257f48", + "blockNumber": "0x1749a59", + "gasUsed": "0x218940", + "effectiveGasPrice": "0x46d743b", + "from": "0x3fcb35a1cbfb6007f9bc638d388958bc4550cb28", + "to": null, + "contractAddress": "0x7cac7f6be1f74d00d874bbacb98b531fa889d613" + }, + { + "status": "0x1", + "cumulativeGasUsed": "0x161b2fe", + "logs": [ + { + "address": "0x41d5d79431a913c4ae7d69a668ecdfe5ff9dfb68", + "topics": [ + "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", + "0x000000000000000000000000658890f633b6892c1ba13247502791ad6da1c266", + "0x0000000000000000000000007cac7f6be1f74d00d874bbacb98b531fa889d613" + ], + "data": "0x0000000000000000000000000000000000000000ffffffffffffffffffffffff", + "blockHash": "0x8e08f0103b26d7f7b5ecda6a456569e2748e00f185644825a8f8eef5405d8f0d", + "blockNumber": "0x1749a5a", + "blockTimestamp": "0x6989c4cb", + "transactionHash": "0xbb310bf14648181e86abc1f567e5dea30407bc2da05cc50d307acbb7bf0277a1", + "transactionIndex": "0xc8", + "logIndex": "0x24d", + "removed": false + } + ], + "logsBloom": "0x00000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000004000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000002000000000000010000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000002000000000000000000110000000000002000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0xbb310bf14648181e86abc1f567e5dea30407bc2da05cc50d307acbb7bf0277a1", + "transactionIndex": "0xc8", + "blockHash": "0x8e08f0103b26d7f7b5ecda6a456569e2748e00f185644825a8f8eef5405d8f0d", + "blockNumber": "0x1749a5a", + "gasUsed": "0xb8cc3", + "effectiveGasPrice": "0x44bc8ed", + "from": "0x3fcb35a1cbfb6007f9bc638d388958bc4550cb28", + "to": null, + "contractAddress": "0x658890f633b6892c1ba13247502791ad6da1c266" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1770636532051, + "chain": 1, + "commit": "c60b552" +} \ No newline at end of file