Skip to content

Conversation

@Zimtente
Copy link
Contributor

@Zimtente Zimtente requested a review from a team as a code owner July 14, 2025 07:24
@Zimtente Zimtente linked an issue Jul 14, 2025 that may be closed by this pull request
@changeset-bot
Copy link

changeset-bot bot commented Jul 14, 2025

🦋 Changeset detected

Latest commit: a78c927

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@ensnode/ensnode-schema Minor
@ensnode/datasources Minor
ensindexer Minor
ensadmin Minor
@ensnode/ensnode-sdk Minor
ensrainbow Minor
@ensnode/ensnode-react Minor
@ensnode/ensrainbow-sdk Minor
@ensnode/ponder-metadata Minor
@ensnode/ponder-subgraph Minor
@ensnode/shared-configs Minor
@docs/ensnode Minor
@docs/ensrainbow Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jul 14, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
admin.ensnode.io Ready Ready Preview Comment Aug 25, 2025 6:08am
ensnode.io Ready Ready Preview Comment Aug 25, 2025 6:08am
ensrainbow.io Ready Ready Preview Comment Aug 25, 2025 6:08am

@Zimtente Zimtente force-pushed the 832-seaport-sales-plugin branch from e552077 to 58e6ab0 Compare July 14, 2025 07:25
@Zimtente Zimtente force-pushed the 832-seaport-sales-plugin branch from f386e19 to bea6350 Compare July 14, 2025 07:29
@Zimtente Zimtente marked this pull request as draft July 14, 2025 07:29
@Zimtente Zimtente force-pushed the 832-seaport-sales-plugin branch from bea6350 to b493620 Compare July 14, 2025 07:30
@Zimtente Zimtente force-pushed the 832-seaport-sales-plugin branch from b493620 to 6219a6c Compare July 14, 2025 08:35
@Zimtente Zimtente force-pushed the 832-seaport-sales-plugin branch from 6219a6c to 8dbc1d6 Compare July 14, 2025 08:44
@Zimtente Zimtente force-pushed the 832-seaport-sales-plugin branch from 8dbc1d6 to 91f1088 Compare July 14, 2025 08:53
@Zimtente Zimtente changed the title added seaport orderfulfill event 832-seaport-sales-plugin Jul 14, 2025
Copy link
Member

@lightwalker-eth lightwalker-eth left a comment

Choose a reason for hiding this comment

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

@Zimtente Reviewed and shared feedback.

import { index, onchainTable } from "ponder";

const sharedEventColumns = (t: any) => ({
id: t.text().primaryKey(),
Copy link
Member

Choose a reason for hiding this comment

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

@Zimtente We need to document ideas like this in our code rather than in GitHub comments.

11155111-5584563-41

What are each of these values? Please document it all in detail. Thanks.

Copy link
Member

@lightwalker-eth lightwalker-eth left a comment

Choose a reason for hiding this comment

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

@Zimtente Thanks for updates. Reviewed and shared feedback

contractAddress: Address,
tokenId: string,
): Hex {
const tokenIdHex = `0x${BigInt(tokenId).toString(16).padStart(64, "0")}` as Hex;
Copy link
Member

Choose a reason for hiding this comment

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

Data conversion operations like this should be pushed "to the edge" of our I/O operations. Within our core "business logic" all types should already be "pure".

Therefore, the type of the tokenId param should be Hex and any necessary conversion operation should be moved close to the moment we capture the value through an I/O operation.

For operations like these, also best to:

  1. Build a named utility function for it. Consider adding it to one of our packages if you think it might be more broadly useful.
  2. Define unit tests.

Edit: Please also take a look at our uint256ToHex32 function. Perhaps this already does what you want?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What exactly do you want to be unit tested?

Copy link
Member

Choose a reason for hiding this comment

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

Any utility function that might be defined here.

return makeSubdomainNode(tokenIdHex, ETH_PARENT_NODE);
}

// for other names we for now assume it is already namehash
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 an important assumption for us to verify and guard against.

This datasources package is publicly published to NPM and aims to be one of the useful packages we're building for the ENS ecosystem. We therefore need to ensure everything inside of it is noobie-proof where possible and that we assume it will be used by others in contexts other than our own personal contexts.

It needs to be generally usable and accurate.

Therefore, a few suggestions:

  1. For safety, getDomainIdByTokenId should call isKnownTokenIssuingContract and throw a helpful error message if that function returns false.
  2. Update the docs for getDomainIdByTokenId to note this possible error case.
  3. For all possible values passed to isKnownTokenIssuingContract that might return true, can you please manually verify that this assumption of using namehash is correct?
  4. After this manual verification is completed, we should refine this comment since it should not be an assumption, it should be a guarantee that we have already verified. Anytime we expand the set of values that pass isKnownTokenIssuingContract we must also verify that the guarantee here holds.
  5. We should add docs to the isKnownTokenIssuingContract function to note that any time we expand the set of known token issuing contracts, we also need to verify getDomainIdByTokenId will continue to always return the correct results.

# Conflicts:
#	packages/ensnode-sdk/src/ens/constants.ts
#	packages/ensnode-sdk/src/ens/index.ts
#	packages/ensnode-sdk/src/ens/types.ts
#	packages/ensnode-sdk/src/index.ts
#	pnpm-lock.yaml
# Conflicts:
#	apps/ensindexer/.env.local.example
#	packages/datasources/src/index.ts
#	packages/datasources/src/mainnet.ts
#	packages/datasources/src/sepolia.ts
#	pnpm-lock.yaml
@lightwalker-eth
Copy link
Member

Superseded by #872

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.

Seaport Sales Plugin

4 participants