Blue Railroad mint submission improvements#343
Open
magent-cryptograss wants to merge 9 commits into
Open
Conversation
MediaWiki stores files in hash-based subdirectories, so we need to query the imageinfo API to get the actual URL rather than constructing it from the filename. This fixes 404s when fetching video files from PickiPedia submissions.
Moves wallet connection and minting logic from inline CDN imports to a proper bundled module. Benefits: - Better build-time error checking - Consistent dependency management via npm - Progress messages during pinning for better UX - Link to PickiPedia for updating submission status after mint Updates @wagmi/core and viem to current versions, and adds @reown/appkit dependencies for the wallet modal.
When the pinning service returns alreadyPinned: true, the UI now shows "Already pinned:" prefix with a success indicator instead of just the CID. Also updates progress messaging and extends the timer before showing the upload message to better reflect the download+check flow.
The issueTony contract call requires raw hex addresses, but recipients from PickiPedia may be ENS names like "justinholmes.eth". Now resolves ENS names via mainnet before calling the contract on Optimism.
Fetches additional token metadata for PickiPedia integration: - songId from tokenIdToSongId mapping - date from tokenIdToDate mapping (YYYYMMDD format) - ownerDisplay with ENS resolution (falls back to raw address)
Introduces enumerable_contracts.json as the source of truth for which contracts should be iterated during chain data fetch. Each contract specifies name, chainId, address, and can be disabled. The fetch_chaindata() function now: - Checks contract config before fetching each contract type - Includes list of fetched contracts in output for consumers - Logs which contracts are being fetched This allows PickiPedia and other consumers to know what chain data is available without hardcoding contract knowledge.
75ea432 to
1edde5c
Compare
Changed 'assert { type: json }' to 'with { type: json }' for
enumerable contracts JSON import. Node.js 23.x deprecated
the assert syntax in favor of the with keyword.
The getBlueRailroads() function performs ENS name resolution on mainnet (chainId 1), but fetch_video_metadata.js was only configuring the Optimism chain. This caused ChainNotConfiguredError when wagmi tried to resolve ENS names for token owners. Added mainnet to the chains array and its transport configuration.
The API key was being embedded in claim-ticket-stub.njk HTML, exposing it to anyone viewing page source. Replaced with public RPCs: - Arbitrum: arb1.arbitrum.io/rpc - Mainnet (ENS): cloudflare-eth.com Contract writes go through user's connected wallet anyway.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Commits
Test plan