Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #10 from equilibria-xyz/arjun/forwarder-rounding
Browse files Browse the repository at this point in the history
Fix forwarder rounding
  • Loading branch information
arjun-io authored Jun 3, 2022
2 parents eddbc9f + 5ec61bf commit 33edb6c
Show file tree
Hide file tree
Showing 5 changed files with 368 additions and 29 deletions.
2 changes: 1 addition & 1 deletion packages/perennial/contracts/forwarder/Forwarder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ contract Forwarder is IForwarder {
IProduct product,
UFixed18 amount
) external {
USDC.pull(msg.sender, amount);
USDC.pull(msg.sender, amount, true);
batcher.wrap(amount, address(this));
collateral.depositTo(account, product, amount);
emit WrapAndDeposit(account, product, amount);
Expand Down
4 changes: 2 additions & 2 deletions packages/perennial/contracts/interfaces/IForwarder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import "./ICollateral.sol";
interface IForwarder {
event WrapAndDeposit(address indexed account, IProduct indexed product, UFixed18 amount);

function USDC() external view returns (Token6);
function DSU() external view returns (Token18);
function USDC() external view returns (Token6); // solhint-disable-line func-name-mixedcase
function DSU() external view returns (Token18); // solhint-disable-line func-name-mixedcase
function batcher() external view returns (IBatcher);
function collateral() external view returns (ICollateral);
function wrapAndDeposit(address account, IProduct product, UFixed18 amount) external;
Expand Down
63 changes: 37 additions & 26 deletions packages/perennial/deployments/kovan/Forwarder.json

Large diffs are not rendered by default.

Loading

0 comments on commit 33edb6c

Please sign in to comment.