Skip to content

Commit

Permalink
docs: update proposal docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ashhanai committed Apr 24, 2024
1 parent 127f8b0 commit a70c015
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,24 @@ contract PWNSimpleLoanDutchAuctionProposal is PWNSimpleLoanProposal {
* @param collateralAddress Address of an asset used as a collateral.
* @param collateralId Token id of an asset used as a collateral, in case of ERC20 should be 0.
* @param collateralAmount Amount of tokens used as a collateral, in case of ERC721 should be 0.
* @param checkCollateralStateFingerprint If true, the collateral state fingerprint has to be checked.
* @param checkCollateralStateFingerprint If true, the collateral state fingerprint will be checked during proposal acceptance.
* @param collateralStateFingerprint Fingerprint of a collateral state defined by ERC5646.
* @param creditAddress Address of an asset which is lended to a borrower.
* @param minCreditAmount Minimum amount of tokens which is proposed as a loan to a borrower. If `isOffer` is true, auction will start with this amount, otherwise it will end with this amount.
* @param maxCreditAmount Maximum amount of tokens which is proposed as a loan to a borrower. If `isOffer` is true, auction will end with this amount, otherwise it will start with this amount.
* @param availableCreditLimit Available credit limit for the proposal. It is the maximum amount of tokens which can be borrowed using the proposal.
* @param availableCreditLimit Available credit limit for the proposal. It is the maximum amount of tokens which can be borrowed using the proposal. If non-zero, proposal can be accepted more than once, until the credit limit is reached.
* @param fixedInterestAmount Fixed interest amount in credit tokens. It is the minimum amount of interest which has to be paid by a borrower.
* @param accruingInterestAPR Accruing interest APR.
* @param accruingInterestAPR Accruing interest APR with 5 decimals.
* @param duration Loan duration in seconds.
* @param auctionStart Auction start timestamp in seconds.
* @param auctionDuration Auction duration in seconds.
* @param allowedAcceptor Address that is allowed to accept proposal. If the address is zero address, anybody can accept the proposal.
* @param proposer Address of a proposal signer. If `isOffer` is true, the proposer is the lender. If `isOffer` is false, the proposer is the borrower.
* @param proposerSpecHash Hash of a proposer specification. It is a hash of a proposer specific data, which must be provided during a loan creation.
* @param proposerSpecHash Hash of a proposer specific data, which must be provided during a loan creation.
* @param isOffer If true, the proposal is an offer. If false, the proposal is a request.
* @param refinancingLoanId Id of a loan which is refinanced by this proposal. If the id is 0 and `isOffer` is true, the proposal can refinance any loan.
* @param nonceSpace Nonce space of a proposal nonce. All nonces in the same space can be revoked at once.
* @param nonce Additional value to enable identical proposals in time. Without it, it would be impossible to make again proposal, which was once revoked.
* Can be used to create a group of proposals, where accepting one proposal will make other proposals in the group revoked.
* @param nonce Additional value to enable identical proposals in time. Without it, it would be impossible to make again proposal, which was once revoked. Can be used to create a group of proposals, where accepting one proposal will make other proposals in the group revoked.
* @param loanContract Address of a loan contract that will create a loan from the proposal.
*/
struct Proposal {
Expand Down
11 changes: 5 additions & 6 deletions src/loan/terms/simple/proposal/PWNSimpleLoanFungibleProposal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,22 @@ contract PWNSimpleLoanFungibleProposal is PWNSimpleLoanProposal {
* @param collateralAddress Address of an asset used as a collateral.
* @param collateralId Token id of an asset used as a collateral, in case of ERC20 should be 0.
* @param minCollateralAmount Minimal amount of tokens used as a collateral.
* @param checkCollateralStateFingerprint If true, collateral state fingerprint will be checked on loan terms creation.
* @param checkCollateralStateFingerprint If true, the collateral state fingerprint will be checked during proposal acceptance.
* @param collateralStateFingerprint Fingerprint of a collateral state. It is used to check if a collateral is in a valid state.
* @param creditAddress Address of an asset which is lended to a borrower.
* @param creditPerCollateralUnit Amount of tokens which are offered per collateral unit with 38 decimals.
* @param availableCreditLimit Available credit limit for the proposal. It is the maximum amount of tokens which can be borrowed using the proposal.
* @param availableCreditLimit Available credit limit for the proposal. It is the maximum amount of tokens which can be borrowed using the proposal. If non-zero, proposal can be accepted more than once, until the credit limit is reached.
* @param fixedInterestAmount Fixed interest amount in credit tokens. It is the minimum amount of interest which has to be paid by a borrower.
* @param accruingInterestAPR Accruing interest APR.
* @param accruingInterestAPR Accruing interest APR with 5 decimals.
* @param duration Loan duration in seconds.
* @param expiration Proposal expiration timestamp in seconds.
* @param allowedAcceptor Address that is allowed to accept proposal. If the address is zero address, anybody can accept the proposal.
* @param proposer Address of a proposal signer. If `isOffer` is true, the proposer is the lender. If `isOffer` is false, the proposer is the borrower.
* @param proposerSpecHash Hash of a proposer specification. It is a hash of a proposer specific data, which must be provided during a loan creation.
* @param proposerSpecHash Hash of a proposer specific data, which must be provided during a loan creation.
* @param isOffer If true, the proposal is an offer. If false, the proposal is a request.
* @param refinancingLoanId Id of a loan which is refinanced by this proposal. If the id is 0 and `isOffer` is true, the proposal can refinance any loan.
* @param nonceSpace Nonce space of a proposal nonce. All nonces in the same space can be revoked at once.
* @param nonce Additional value to enable identical proposals in time. Without it, it would be impossible to make again proposal, which was once revoked.
* Can be used to create a group of proposals, where accepting one will make others in the group invalid.
* @param nonce Additional value to enable identical proposals in time. Without it, it would be impossible to make again proposal, which was once revoked. Can be used to create a group of proposals, where accepting one will make others in the group invalid.
* @param loanContract Address of a loan contract that will create a loan from the proposal.
*/
struct Proposal {
Expand Down
11 changes: 5 additions & 6 deletions src/loan/terms/simple/proposal/PWNSimpleLoanListProposal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,22 @@ contract PWNSimpleLoanListProposal is PWNSimpleLoanProposal {
* @param collateralAddress Address of an asset used as a collateral.
* @param collateralIdsWhitelistMerkleRoot Merkle tree root of a set of whitelisted collateral ids.
* @param collateralAmount Amount of tokens used as a collateral, in case of ERC721 should be 0.
* @param checkCollateralStateFingerprint If true, the collateral state fingerprint has to be checked.
* @param checkCollateralStateFingerprint If true, the collateral state fingerprint will be checked during proposal acceptance.
* @param collateralStateFingerprint Fingerprint of a collateral state defined by ERC5646.
* @param creditAddress Address of an asset which is lender to a borrower.
* @param creditAmount Amount of tokens which is proposed as a loan to a borrower.
* @param availableCreditLimit Available credit limit for the proposal. It is the maximum amount of tokens which can be borrowed using the proposal.
* @param availableCreditLimit Available credit limit for the proposal. It is the maximum amount of tokens which can be borrowed using the proposal. If non-zero, proposal can be accepted more than once, until the credit limit is reached.
* @param fixedInterestAmount Fixed interest amount in credit tokens. It is the minimum amount of interest which has to be paid by a borrower.
* @param accruingInterestAPR Accruing interest APR.
* @param accruingInterestAPR Accruing interest APR with 5 decimals.
* @param duration Loan duration in seconds.
* @param expiration Proposal expiration timestamp in seconds.
* @param allowedAcceptor Address that is allowed to accept proposal. If the address is zero address, anybody can accept the proposal.
* @param proposer Address of a proposal signer. If `isOffer` is true, the proposer is the lender. If `isOffer` is false, the proposer is the borrower.
* @param proposerSpecHash Hash of a proposer specification. It is a hash of a proposer specific data, which must be provided during a loan creation.
* @param proposerSpecHash Hash of a proposer specific data, which must be provided during a loan creation.
* @param isOffer If true, the proposal is an offer. If false, the proposal is a request.
* @param refinancingLoanId Id of a loan which is refinanced by this proposal. If the id is 0 and `isOffer` is true, the proposal can refinance any loan.
* @param nonceSpace Nonce space of a proposal nonce. All nonces in the same space can be revoked at once.
* @param nonce Additional value to enable identical proposals in time. Without it, it would be impossible to make again proposal, which was once revoked.
* Can be used to create a group of proposals, where accepting one proposal will make other proposals in the group revoked.
* @param nonce Additional value to enable identical proposals in time. Without it, it would be impossible to make again proposal, which was once revoked. Can be used to create a group of proposals, where accepting one proposal will make other proposals in the group revoked.
* @param loanContract Address of a loan contract that will create a loan from the proposal.
*/
struct Proposal {
Expand Down
11 changes: 5 additions & 6 deletions src/loan/terms/simple/proposal/PWNSimpleLoanSimpleProposal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,22 @@ contract PWNSimpleLoanSimpleProposal is PWNSimpleLoanProposal {
* @param collateralAddress Address of an asset used as a collateral.
* @param collateralId Token id of an asset used as a collateral, in case of ERC20 should be 0.
* @param collateralAmount Amount of tokens used as a collateral, in case of ERC721 should be 0.
* @param checkCollateralStateFingerprint If true, the collateral state fingerprint has to be checked.
* @param checkCollateralStateFingerprint If true, the collateral state fingerprint will be checked during proposal acceptance.
* @param collateralStateFingerprint Fingerprint of a collateral state defined by ERC5646.
* @param creditAddress Address of an asset which is lended to a borrower.
* @param creditAmount Amount of tokens which is proposed as a loan to a borrower.
* @param availableCreditLimit Available credit limit for the proposal. It is the maximum amount of tokens which can be borrowed using the proposal.
* @param availableCreditLimit Available credit limit for the proposal. It is the maximum amount of tokens which can be borrowed using the proposal. If non-zero, proposal can be accepted more than once, until the credit limit is reached.
* @param fixedInterestAmount Fixed interest amount in credit tokens. It is the minimum amount of interest which has to be paid by a borrower.
* @param accruingInterestAPR Accruing interest APR.
* @param accruingInterestAPR Accruing interest APR with 5 decimals.
* @param duration Loan duration in seconds.
* @param expiration Proposal expiration timestamp in seconds.
* @param allowedAcceptor Address that is allowed to accept proposal. If the address is zero address, anybody can accept the proposal.
* @param proposer Address of a proposal signer. If `isOffer` is true, the proposer is the lender. If `isOffer` is false, the proposer is the borrower.
* @param proposerSpecHash Hash of a proposer specification. It is a hash of a proposer specific data, which must be provided during a loan creation.
* @param proposerSpecHash Hash of a proposer specific data, which must be provided during a loan creation.
* @param isOffer If true, the proposal is an offer. If false, the proposal is a request.
* @param refinancingLoanId Id of a loan which is refinanced by this proposal. If the id is 0 and `isOffer` is true, the proposal can refinance any loan.
* @param nonceSpace Nonce space of a proposal nonce. All nonces in the same space can be revoked at once.
* @param nonce Additional value to enable identical proposals in time. Without it, it would be impossible to make again proposal, which was once revoked.
* Can be used to create a group of proposals, where accepting one proposal will make other proposals in the group revoked.
* @param nonce Additional value to enable identical proposals in time. Without it, it would be impossible to make again proposal, which was once revoked. Can be used to create a group of proposals, where accepting one proposal will make other proposals in the group revoked.
* @param loanContract Address of a loan contract that will create a loan from the proposal.
*/
struct Proposal {
Expand Down

0 comments on commit a70c015

Please sign in to comment.