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

(chore): update developer documentation #25

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Jipperism
Copy link
Collaborator

@Jipperism Jipperism commented Dec 14, 2024

  • Updates developer documentation for contributing to the sdk.
  • Updates developer documentation for consuming the SDK.
  • Removes redundant references to env vars.
  • Removes redundant references to outdated package manager yarn.
  • Updates typedoc version and configuration to include handwritten guides in the generated docs.
  • Removes outdated github templates.
  • Updates JSDoc annotations.
  • Bump version number.

@Jipperism Jipperism self-assigned this Dec 14, 2024
@Jipperism Jipperism force-pushed the feature/developer-docs branch 4 times, most recently from b1c8fa0 to aff056d Compare December 14, 2024 17:48
.vscode/settings.json Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
doc/_media/cancelOrders.md Outdated Show resolved Hide resolved
@Jipperism Jipperism force-pushed the feature/developer-docs branch 20 times, most recently from f37c9fe to c75bfff Compare December 19, 2024 13:44
Copy link
Member

@pheuberger pheuberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you're not only removing old code, but also bumping the version number and changing some magic number. I would advocate for even more granular commits, because I don't know why you're doing any of that (except the version bump).

Copy link
Member

@pheuberger pheuberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff. Thank you so much for making this! It's mostly just nits and a couple of clarifying questions from my side. Being new to the project, I have big gaps in my knowledge and understanding which shows in my questions. Feel free to not elaborate on some of them if you think they're just too preposterous to cover hehe.

Please also don't be put off by the amount of comments. I was very thorough and highlighted very minor things. Generally this is great!

src/utils/api.ts Outdated Show resolved Hide resolved
src/utils/api.ts Outdated Show resolved Hide resolved
.gitignore Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
guides/orderValidity.md Outdated Show resolved Hide resolved
@@ -351,7 +319,7 @@ export class HypercertExchangeClient {
* @param maker Maker order
* @param taker Taker order
* @param signature Signature of the maker order
* @param merkleTree If the maker has been signed with a merkle tree
* @param merkleTree Optional merkle tree
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would the user use a Merkle tree? I think that would be a much better parameter description.

Copy link
Collaborator Author

@Jipperism Jipperism Dec 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a more in-depth look, and I originally misinterpreted what the merkleTree was referring to. It seems to only refer to the proofs that are obtained when using signMultipleMakerOrders() to create the orders. See https://docs.looksrare.org/developers/sdk/signMultipleMakerOrders for a more thorough explanation.

I thought we would use this for allowlist orders, but they are implemented using a strategy and the merkle tree proofs for the allowlist are provided using the additionalParams argument (contract implementation: https://github.com/hypercerts-org/hypercerts/blob/main/contracts/src/marketplace/executionStrategies/StrategyHypercertFractionOffer.sol#L169). So it looks like we will only need this in the foreseeable future, if we plan on supporting signing multiple sales (and buys) at once from the frontend. That would also include implementing the API endpoint for storing the tree and retrieving proofs (see https://docs.looksrare.org/developers/sdk/signMultipleMakerOrders again).

We could decide to remove the functionality, and that means we can get rid of all merkleTree parameters in HypercertExchangeClient. It would be a breaking change however, as the function signatures would change, but I think it might be worth it.

Looping in @bitbeckers and @holkexyz to weigh in on whether we are going to need this functionality in the future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the thorough explanation! Also waiting for @bitbeckers and @holkexyz to chime in here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't invest time in these kinda of refactors. Is we're going to invest significant amounts of time in the marketplace SDK it would be migrate it to viem in the regular SDK.

src/HypercertExchangeClient.ts Outdated Show resolved Hide resolved
src/utils/api.ts Outdated Show resolved Hide resolved
typedoc.json Outdated Show resolved Hide resolved
Updates outdated strategy IDs. As we aren't using
hypercertFractionAllowlist strategy currently, it wasn't noticed that
it's outdated. This fixes that already for when we decide to start using
it.

Removes outdated code that's related to:
- Batch transfers
- Subset nonces
- Remove amounts argument when creating a makerask, as in the case of
hypercerts it will always be an array of 1's.
- Bump version number
Updates developer documentation for contributing to the sdk.
Updates developer documentation for consuming the SDK.
Removes redundant references to env vars.
Removes redundant references to outdated package manager yarn.
Updates typedoc version and configuration to include handwritten guides
in the generated docs.
Removes outdated github templates.
Updates JSDoc annotations.
@Jipperism Jipperism force-pushed the feature/developer-docs branch from c75bfff to cbc28cc Compare December 26, 2024 14:08
@Jipperism
Copy link
Collaborator Author

@pheuberger Had a look at all the comments and implemented the feedback. Please close all conversations on the PR that you consider resolved.

Looks like you're not only removing old code, but also bumping the version number and changing some magic number. I would advocate for even more granular commits, because I don't know why you're doing any of that (except the version bump).

I updated the git commit description for fe6ed4b, hopefully that makes things clearer. I think splitting this up in more granular commits would also entail purposely releasing broken versions to NPM, as each commit would require a version bump (otherwise we have version on github that don't exist on NPM)? I can see both sides of the story but maybe that's not necessary for now, let me know what you think.

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
guides/cancelOrders.md Show resolved Hide resolved
"out": "./doc",
"githubPages": false,
"readme": "none",
"gitRemote": "https://github.com/hypercerts-org/marketplace-sdk",
"disableSources": true,
"cleanOutputDir": false,

"hideBreadcrumbs": true,
"hideInPageTOC": true
"projectDocuments": ["./guides/readme.md"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should also be all caps like above, shouldn't it?

@pheuberger
Copy link
Member

pheuberger commented Jan 3, 2025

@pheuberger Had a look at all the comments and implemented the feedback. Please close all conversations on the PR that you consider resolved.

Looks like you're not only removing old code, but also bumping the version number and changing some magic number. I would advocate for even more granular commits, because I don't know why you're doing any of that (except the version bump).

I updated the git commit description for fe6ed4b, hopefully that makes things clearer. I think splitting this up in more granular commits would also entail purposely releasing broken versions to NPM, as each commit would require a version bump (otherwise we have version on github that don't exist on NPM)? I can see both sides of the story but maybe that's not necessary for now, let me know what you think.

Thank you, @Jipperism! I closed all the conversations that are implemented/answered :)

Can you explain why we would need to release broken versions to NPM? Not every commit needs to be a release, nor have a version bump, unless I'm missing something?

cd marketplace-sdk
pnpm install && pnpm run build
cd ../your-project
pnpm link @hypercerts-org/marketplace-sdk
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually wrong. It needs to say

pnpm link <path to marketplace sdk on you local filesystem>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants