Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc, naming, ordering, copyrights #157

Merged
merged 5 commits into from
Dec 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 82 additions & 69 deletions src/OptionSettlementEngine.sol

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/TokenURIGenerator.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: BUSL 1.1
// Valorem Labs Inc. (c) 2022.
pragma solidity 0.8.16;

import "base64/Base64.sol";
Expand Down
32 changes: 20 additions & 12 deletions src/interfaces/IOptionSettlementEngine.sol
Original file line number Diff line number Diff line change
Expand Up @@ -289,19 +289,34 @@ interface IOptionSettlementEngine {
// Accessors
//////////////////////////////////////////////////////////////*/

//
// Option Information
//

/**
* @notice Gets option type information for a given tokenId.
* @param optionId The tokenId of the option.
* @return optionInfo The Option struct for tokenId if the optionKey for tokenId is initialized.
neodaoist marked this conversation as resolved.
Show resolved Hide resolved
*/
function option(uint256 optionId) external view returns (Option memory optionInfo);

/**
* @notice Gets information for a given claim token id.
* @param claimId The id of the claim
* @param claimId The tokenId of the claim.
* @return claimInfo The Claim struct for claimId if the tokenId is Type.Claim.
*/
function claim(uint256 claimId) external view returns (Claim memory claimInfo);

/**
* @notice Gets option type information for a given tokenId.
* @param tokenId The token id for which to get option inf.
* @return optionInfo The Option struct for tokenId if the optionKey for tokenId is initialized.
* @notice Gets information about the ERC20 token positions represented by a tokenId.
* @param tokenId The token id for which to retrieve the Underlying position.
* @return position The Underlying struct for the supplied tokenId.
neodaoist marked this conversation as resolved.
Show resolved Hide resolved
*/
function option(uint256 tokenId) external view returns (Option memory optionInfo);
function underlying(uint256 tokenId) external view returns (Underlying memory position);

//
// Token Information
//

/**
* @notice Gets the TokenType for a given tokenId.
Expand Down Expand Up @@ -329,13 +344,6 @@ interface IOptionSettlementEngine {
*/
function tokenURIGenerator() external view returns (ITokenURIGenerator uriGenerator);

/**
* @notice Gets information about the ERC20 token positions represented by a tokenId.
* @param tokenId The token id for which to retrieve the Underlying position.
* @return position The Underlying struct for the supplied tokenId.
*/
function underlying(uint256 tokenId) external view returns (Underlying memory position);

//
// Fee Information
//
Expand Down
1 change: 1 addition & 0 deletions src/interfaces/ITokenURIGenerator.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: BUSL 1.1
// Valorem Labs Inc. (c) 2022.
pragma solidity 0.8.16;

import "./IOptionSettlementEngine.sol";
Expand Down
1 change: 1 addition & 0 deletions test/OptionSettlementEngine.fuzz.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: BUSL 1.1
// Valorem Labs Inc. (c) 2022.
pragma solidity 0.8.16;

import "./utils/BaseEngineTest.sol";
Expand Down
1 change: 1 addition & 0 deletions test/OptionSettlementEngine.integration.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: BUSL 1.1
// Valorem Labs Inc. (c) 2022.
pragma solidity 0.8.16;

import "./utils/BaseEngineTest.sol";
Expand Down
1 change: 1 addition & 0 deletions test/OptionSettlementEngine.invariant.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: BUSL 1.1
// Valorem Labs Inc. (c) 2022.
pragma solidity 0.8.16;

import "./utils/BaseEngineTest.sol";
Expand Down
1 change: 1 addition & 0 deletions test/utils/BaseEngineTest.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: BUSL 1.1
// Valorem Labs Inc. (c) 2022.
pragma solidity 0.8.16;

import "forge-std/Test.sol";
Expand Down
3 changes: 2 additions & 1 deletion test/utils/MockERC20.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL 1.1
// Valorem Labs Inc. (c) 2022.
pragma solidity 0.8.16;

import "solmate/tokens/ERC20.sol";
Expand Down