Skip to content

Commit

Permalink
Rename keg -> pocket
Browse files Browse the repository at this point in the history
  • Loading branch information
telome committed Nov 7, 2023
1 parent 0d49f2d commit f280653
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions test/funnels/callees/SwapperCalleePsm.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ contract SwapperCalleePsmTest is DssTest {
deal(DAI, address(psm), 1_000_000 * WAD, true);
deal(DAI, address(psmUSDT), 1_000_000 * WAD, true);
deal(USDC, address(this), 1_000_000 * 10**6, true);
deal(USDC, psm.keg(), 1_000_000 * 10**6, true);
deal(USDC, psm.pocket(), 1_000_000 * 10**6, true);
deal(USDT, address(this), 1_000_000 * 10**6, true);
deal(USDT, psmUSDT.keg(), 1_000_000 * 10**6, true);
deal(USDT, psmUSDT.pocket(), 1_000_000 * 10**6, true);
}

function testConstructor() public {
Expand Down
10 changes: 5 additions & 5 deletions test/mocks/PsmMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface GemLike {
function decimals() external view returns (uint8);
}

contract KegMock {
contract PocketMock {
constructor(address gem) {
GemLike(gem).approve(msg.sender, type(uint256).max);
}
Expand All @@ -20,7 +20,7 @@ contract PsmMock {
address public immutable dai;
address public immutable gem;
uint256 public immutable to18ConversionFactor;
address public immutable keg;
address public immutable pocket;

event Rely(address indexed usr);
event Deny(address indexed usr);
Expand All @@ -36,7 +36,7 @@ contract PsmMock {
dai = dai_;
gem = gem_;
to18ConversionFactor = 10**(18 - GemLike(gem_).decimals());
keg = address(new KegMock(gem_));
pocket = address(new PocketMock(gem_));

wards[msg.sender] = 1;
emit Rely(msg.sender);
Expand All @@ -55,7 +55,7 @@ contract PsmMock {
function sellGemNoFee(address usr, uint256 gemAmt) external auth returns (uint256 daiOutWad) {
daiOutWad = gemAmt * to18ConversionFactor;

GemLike(gem).transferFrom(msg.sender, keg, gemAmt);
GemLike(gem).transferFrom(msg.sender, pocket, gemAmt);
GemLike(dai).transfer(usr, daiOutWad);

emit SellGem(usr, gemAmt, 0);
Expand All @@ -65,7 +65,7 @@ contract PsmMock {
daiInWad = gemAmt * to18ConversionFactor;

GemLike(dai).transferFrom(msg.sender, address(this), daiInWad);
GemLike(gem).transferFrom(keg, usr, gemAmt);
GemLike(gem).transferFrom(pocket, usr, gemAmt);

emit BuyGem(usr, gemAmt, 0);
}
Expand Down

0 comments on commit f280653

Please sign in to comment.