Skip to contents

Constructs a data.table row for `app.artwork_opensea` by combining parsed OpenSea URL components with the artist's OpenSea account information. Used internally by [.upsert_nft_url()] before INSERT/UPDATE operations.

Usage

.build_opensea_row(url_os, artist, artwork, cn = NULL)

Arguments

url_os

Character. Full OpenSea URL to parse.

artist

Character. Artist UUID.

artwork

Character. Artwork UUID.

cn

Database connection. Passed to [artutils::get_artist_opensea()]. If `NULL`, that function opens and closes its own connection.

Value

A single-row `data.table` with columns: `art_uuid`, `artist_uuid`, `account`, `username`, `contract`, `chain`, `id`, `modified_utc`, `url_os`.

Details

This function combines data from two sources:

1. **URL parsing** via [artopensea::parseOpenseaURL()]: - `chain` (e.g., "ethereum", "matic") - `contract` (NFT contract address) - `id` (token ID)

2. **Artist account** via [artutils::get_artist_opensea()]: - `account` (OpenSea wallet address) - `username` (OpenSea username)

See also

* [.upsert_nft_url()] which calls this function * [artopensea::parseOpenseaURL()] for URL parsing logic