Skip to content

Commit

Permalink
Merge branch 'main' of github.com:SizeLending/size-v2-solidity
Browse files Browse the repository at this point in the history
  • Loading branch information
aviggiano committed Jan 10, 2024
2 parents 93da30c + a4aea89 commit 3fe4c90
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 21 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ Size V2 Solidity
| src/Size.sol | 100.00% (41/41) | 100.00% (41/41) | 100.00% (0/0) | 100.00% (17/17) |
| src/SizeView.sol | 100.00% (26/26) | 100.00% (37/37) | 100.00% (0/0) | 100.00% (24/24) |
| src/libraries/LoanLibrary.sol | 100.00% (3/3) | 100.00% (5/5) | 100.00% (0/0) | 100.00% (3/3) |
| src/libraries/MathLibrary.sol | 100.00% (5/5) | 100.00% (11/11) | 100.00% (0/0) | 100.00% (4/4) |
| src/libraries/MathLibrary.sol | 100.00% (18/18) | 100.00% (28/28) | 100.00% (6/6) | 100.00% (6/6) |
| src/libraries/OfferLibrary.sol | 100.00% (6/6) | 100.00% (18/18) | 100.00% (0/0) | 100.00% (4/4) |
| src/libraries/YieldCurveLibrary.sol | 100.00% (30/30) | 100.00% (46/46) | 83.33% (15/18) | 100.00% (2/2) |
| src/libraries/YieldCurveLibrary.sol | 100.00% (24/24) | 100.00% (37/37) | 78.57% (11/14) | 100.00% (2/2) |
| src/libraries/actions/BorrowAsLimitOrder.sol | 100.00% (5/5) | 100.00% (5/5) | 100.00% (2/2) | 100.00% (2/2) |
| src/libraries/actions/BorrowAsMarketOrder.sol | 100.00% (54/54) | 100.00% (69/69) | 90.91% (20/22) | 100.00% (4/4) |
| src/libraries/actions/BorrowerExit.sol | 96.30% (26/27) | 97.06% (33/34) | 80.00% (8/10) | 100.00% (2/2) |
| src/libraries/actions/Claim.sol | 100.00% (7/7) | 100.00% (8/8) | 100.00% (2/2) | 100.00% (2/2) |
| src/libraries/actions/Common.sol | 100.00% (58/58) | 98.82% (84/85) | 85.00% (17/20) | 86.67% (13/15) |
| src/libraries/actions/Compensate.sol | 100.00% (19/19) | 100.00% (25/25) | 100.00% (12/12) | 100.00% (2/2) |
| src/libraries/actions/Compensate.sol | 100.00% (20/20) | 100.00% (26/26) | 100.00% (12/12) | 100.00% (2/2) |
| src/libraries/actions/Deposit.sol | 100.00% (10/10) | 100.00% (17/17) | 100.00% (4/4) | 100.00% (2/2) |
| src/libraries/actions/Initialize.sol | 100.00% (22/22) | 100.00% (29/29) | 100.00% (14/14) | 100.00% (2/2) |
| src/libraries/actions/LendAsLimitOrder.sol | 100.00% (11/11) | 100.00% (12/12) | 87.50% (7/8) | 100.00% (2/2) |
| src/libraries/actions/LendAsMarketOrder.sol | 96.15% (25/26) | 96.55% (28/29) | 70.00% (7/10) | 100.00% (2/2) |
| src/libraries/actions/LiquidateLoan.sol | 100.00% (33/33) | 100.00% (39/39) | 58.33% (7/12) | 100.00% (2/2) |
| src/libraries/actions/LiquidateLoanWithReplacement.sol | 100.00% (22/22) | 100.00% (26/26) | 75.00% (3/4) | 100.00% (2/2) |
| src/libraries/actions/MoveToVariablePool.sol | 100.00% (13/13) | 100.00% (16/16) | 83.33% (5/6) | 100.00% (2/2) |
| src/libraries/actions/Repay.sol | 100.00% (14/14) | 100.00% (15/15) | 87.50% (7/8) | 100.00% (2/2) |
| src/libraries/actions/LiquidateLoanWithReplacement.sol | 100.00% (23/23) | 100.00% (27/27) | 75.00% (3/4) | 100.00% (2/2) |
| src/libraries/actions/MoveToVariablePool.sol | 100.00% (14/14) | 100.00% (17/17) | 83.33% (5/6) | 100.00% (2/2) |
| src/libraries/actions/Repay.sol | 100.00% (18/18) | 100.00% (22/22) | 80.00% (8/10) | 100.00% (2/2) |
| src/libraries/actions/SelfLiquidateLoan.sol | 100.00% (19/19) | 100.00% (23/23) | 75.00% (6/8) | 100.00% (2/2) |
| src/libraries/actions/UpdateConfig.sol | 100.00% (25/25) | 100.00% (28/28) | 100.00% (18/18) | 100.00% (2/2) |
| src/libraries/actions/Withdraw.sol | 100.00% (10/10) | 100.00% (17/17) | 100.00% (4/4) | 100.00% (2/2) |
Expand All @@ -53,13 +53,13 @@ Size V2 Solidity
│ LendAsMarketOrder │ 6 │
│ LiquidateLoanWithReplacement │ 5 │
│ LiquidateLoan │ 5 │
│ Math │ 6
│ Math │ 8
│ MoveToVariablePool │ 2 │
│ Multicall │ 2 │
│ NonTransferrableToken │ 7 │
│ Ownable2Step │ 4 │
│ PriceFeed │ 8 │
│ Repay │ 4
│ Repay │ 7
│ SelfLiquidateLoan │ 6 │
│ UpdateConfig │ 2 │
│ Upgrade │ 2 │
Expand Down
9 changes: 6 additions & 3 deletions types/ethers-contracts/Size.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,12 @@ export type MoveToVariablePoolParamsStructOutput = [BigNumber] & {
loanId: BigNumber;
};

export type RepayParamsStruct = { loanId: BigNumberish };
export type RepayParamsStruct = { loanId: BigNumberish; amount: BigNumberish };

export type RepayParamsStructOutput = [BigNumber] & { loanId: BigNumber };
export type RepayParamsStructOutput = [BigNumber, BigNumber] & {
loanId: BigNumber;
amount: BigNumber;
};

export type SelfLiquidateLoanParamsStruct = { loanId: BigNumberish };

Expand Down Expand Up @@ -444,7 +447,7 @@ export interface SizeInterface extends utils.Interface {
"pendingOwner()": FunctionFragment;
"proxiableUUID()": FunctionFragment;
"renounceOwnership()": FunctionFragment;
"repay((uint256))": FunctionFragment;
"repay((uint256,uint256))": FunctionFragment;
"selfLiquidateLoan((uint256))": FunctionFragment;
"state()": FunctionFragment;
"transferOwnership(address)": FunctionFragment;
Expand Down
2 changes: 1 addition & 1 deletion types/ethers-contracts/factories/PriceFeed__factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ const _abi = [
] as const;

const _bytecode =
"0x61016060405234801561001157600080fd5b50604051610aa9380380610aa983398101604081905261003091610206565b6001600160a01b038516158061004d57506001600160a01b038416155b1561006b5760405163de0ce17d60e01b815260040160405180910390fd5b60ff8316158061007e575060128360ff16115b156100a55760405163b094f61d60e01b815260ff8416600482015260240160405180910390fd5b8115806100b0575080155b156100ce576040516373f9226b60e11b815260040160405180910390fd5b6001600160a01b03808616608081905290851660a05260ff841660c0526101208390526101408290526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa158015610132573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610156919061025c565b60ff1660e08160ff168152505060a0516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c7919061025c565b60ff16610100525061027e9350505050565b80516001600160a01b03811681146101f057600080fd5b919050565b805160ff811681146101f057600080fd5b600080600080600060a0868803121561021e57600080fd5b610227866101d9565b9450610235602087016101d9565b9350610243604087016101f5565b6060870151608090970151959894975095949392505050565b60006020828403121561026e57600080fd5b610277826101f5565b9392505050565b60805160a05160c05160e0516101005161012051610140516107aa6102ff6000396000818161015d015261029a0152600081816101c101526102250152600060f70152600060d001526000818160920152818161024e015261047a01526000818161019a015261027901526000818161011e015261020401526107aa6000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80638e6d2bd01161005b5780638e6d2bd01461015857806398d5fdca1461018d578063999b93af14610195578063a4e413e4146101bc57600080fd5b8063313ce5671461008d57806333f76178146100cb5780633fd1e2bd146100f25780635001f3b514610119575b600080fd5b6100b47f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020015b60405180910390f35b6100b47f000000000000000000000000000000000000000000000000000000000000000081565b6100b47f000000000000000000000000000000000000000000000000000000000000000081565b6101407f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b61017f7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100c2565b61017f6101e3565b6101407f000000000000000000000000000000000000000000000000000000000000000081565b61017f7f000000000000000000000000000000000000000000000000000000000000000081565b600073__$4ff4c5ce550acbe5591598da4589533083$__63b67bee046102497f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610330565b6102747f0000000000000000000000000000000000000000000000000000000000000000600a610616565b6102be7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610330565b6040516001600160e01b031960e086901b168152600481019390935260248301919091526044820152606401602060405180830381865af4158015610307573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032b9190610625565b905090565b6000806000846001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610373573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610397919061065d565b50935050925050600082136103d657604051633e8ca01160e21b81526001600160a01b0386166004820152602481018390526044015b60405180910390fd5b836103e182426106ad565b111561041257604051632c4f4f3160e21b81526001600160a01b0386166004820152602481018290526044016103cd565b61049e82866001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047891906106c0565b7f00000000000000000000000000000000000000000000000000000000000000006104a9565b925050505b92915050565b60008160ff168360ff1610156104e2576104c383836106e3565b6104d19060ff16600a6106fc565b6104db9085610708565b9050610515565b8160ff168360ff161115610512576104fa82846106e3565b6105089060ff16600a6106fc565b6104db9085610738565b50825b9392505050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111561056d5781600019048211156105535761055361051c565b8085161561056057918102915b93841c9390800290610537565b509250929050565b600082610584575060016104a3565b81610591575060006104a3565b81600181146105a757600281146105b1576105cd565b60019150506104a3565b60ff8411156105c2576105c261051c565b50506001821b6104a3565b5060208310610133831016604e8410600b84101617156105f0575081810a6104a3565b6105fa8383610532565b806000190482111561060e5761060e61051c565b029392505050565b600061051560ff841683610575565b60006020828403121561063757600080fd5b5051919050565b805169ffffffffffffffffffff8116811461065857600080fd5b919050565b600080600080600060a0868803121561067557600080fd5b61067e8661063e565b94506020860151935060408601519250606086015191506106a16080870161063e565b90509295509295909350565b818103818111156104a3576104a361051c565b6000602082840312156106d257600080fd5b815160ff8116811461051557600080fd5b60ff82811682821603908111156104a3576104a361051c565b60006105158383610575565b80820260008212600160ff1b841416156107245761072461051c565b81810583148215176104a3576104a361051c565b60008261075557634e487b7160e01b600052601260045260246000fd5b600160ff1b82146000198414161561076f5761076f61051c565b50059056fea26469706673582212209230b0e283c1628bb972a9c852bb16d7adaff677aff017e0ba1a5f011a03e65864736f6c63430008140033";
"0x61016060405234801561001157600080fd5b50604051610aa9380380610aa983398101604081905261003091610206565b6001600160a01b038516158061004d57506001600160a01b038416155b1561006b5760405163de0ce17d60e01b815260040160405180910390fd5b60ff8316158061007e575060128360ff16115b156100a55760405163b094f61d60e01b815260ff8416600482015260240160405180910390fd5b8115806100b0575080155b156100ce576040516373f9226b60e11b815260040160405180910390fd5b6001600160a01b03808616608081905290851660a05260ff841660c0526101208390526101408290526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa158015610132573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610156919061025c565b60ff1660e08160ff168152505060a0516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c7919061025c565b60ff16610100525061027e9350505050565b80516001600160a01b03811681146101f057600080fd5b919050565b805160ff811681146101f057600080fd5b600080600080600060a0868803121561021e57600080fd5b610227866101d9565b9450610235602087016101d9565b9350610243604087016101f5565b6060870151608090970151959894975095949392505050565b60006020828403121561026e57600080fd5b610277826101f5565b9392505050565b60805160a05160c05160e0516101005161012051610140516107aa6102ff6000396000818161015d015261029a0152600081816101c101526102250152600060f70152600060d001526000818160920152818161024e015261047a01526000818161019a015261027901526000818161011e015261020401526107aa6000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80638e6d2bd01161005b5780638e6d2bd01461015857806398d5fdca1461018d578063999b93af14610195578063a4e413e4146101bc57600080fd5b8063313ce5671461008d57806333f76178146100cb5780633fd1e2bd146100f25780635001f3b514610119575b600080fd5b6100b47f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020015b60405180910390f35b6100b47f000000000000000000000000000000000000000000000000000000000000000081565b6100b47f000000000000000000000000000000000000000000000000000000000000000081565b6101407f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b61017f7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100c2565b61017f6101e3565b6101407f000000000000000000000000000000000000000000000000000000000000000081565b61017f7f000000000000000000000000000000000000000000000000000000000000000081565b600073__$4ff4c5ce550acbe5591598da4589533083$__63b67bee046102497f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610330565b6102747f0000000000000000000000000000000000000000000000000000000000000000600a610616565b6102be7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000610330565b6040516001600160e01b031960e086901b168152600481019390935260248301919091526044820152606401602060405180830381865af4158015610307573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032b9190610625565b905090565b6000806000846001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610373573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610397919061065d565b50935050925050600082136103d657604051633e8ca01160e21b81526001600160a01b0386166004820152602481018390526044015b60405180910390fd5b836103e182426106ad565b111561041257604051632c4f4f3160e21b81526001600160a01b0386166004820152602481018290526044016103cd565b61049e82866001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047891906106c0565b7f00000000000000000000000000000000000000000000000000000000000000006104a9565b925050505b92915050565b60008160ff168360ff1610156104e2576104c383836106e3565b6104d19060ff16600a6106fc565b6104db9085610708565b9050610515565b8160ff168360ff161115610512576104fa82846106e3565b6105089060ff16600a6106fc565b6104db9085610738565b50825b9392505050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111561056d5781600019048211156105535761055361051c565b8085161561056057918102915b93841c9390800290610537565b509250929050565b600082610584575060016104a3565b81610591575060006104a3565b81600181146105a757600281146105b1576105cd565b60019150506104a3565b60ff8411156105c2576105c261051c565b50506001821b6104a3565b5060208310610133831016604e8410600b84101617156105f0575081810a6104a3565b6105fa8383610532565b806000190482111561060e5761060e61051c565b029392505050565b600061051560ff841683610575565b60006020828403121561063757600080fd5b5051919050565b805169ffffffffffffffffffff8116811461065857600080fd5b919050565b600080600080600060a0868803121561067557600080fd5b61067e8661063e565b94506020860151935060408601519250606086015191506106a16080870161063e565b90509295509295909350565b818103818111156104a3576104a361051c565b6000602082840312156106d257600080fd5b815160ff8116811461051557600080fd5b60ff82811682821603908111156104a3576104a361051c565b60006105158383610575565b80820260008212600160ff1b841416156107245761072461051c565b81810583148215176104a3576104a361051c565b60008261075557634e487b7160e01b600052601260045260246000fd5b600160ff1b82146000198414161561076f5761076f61051c565b50059056fea264697066735822122005f60326afe6e535a86c337d620c58db16eb6febac2a64fe7e3f94fd76dbfd0164736f6c63430008140033";

type PriceFeedConstructorParams =
| [linkLibraryAddresses: PriceFeedLibraryAddresses, signer?: Signer]
Expand Down
23 changes: 14 additions & 9 deletions types/ethers-contracts/factories/Size__factory.ts

Large diffs are not rendered by default.

0 comments on commit 3fe4c90

Please sign in to comment.