diff --git a/.env b/.env index d804633..6b39e94 100644 --- a/.env +++ b/.env @@ -1,39 +1,26 @@ -NEXT_PUBLIC_APP_NAME=FACINGS Creator -NEXT_PUBLIC_APP_DESCRIPTION=The FACINGS Creator is a platform for managing AtomicAssets NFT collections, based upon the open source collection-manager project. -NEXT_PUBLIC_FAVICON=https://facings.fra1.cdn.digitaloceanspaces.com/FACINGS%20Logo%20MASK_Negative%20RGB.svg -NEXT_PUBLIC_META_ICON=https://cdn.facings.io/FACINGS_Logo_mask_negative.png -NEXT_PUBLIC_APP_URL=https://creator.facings.io +NEXT_PUBLIC_APP_NAME=NFT Manager +NEXT_PUBLIC_APP_DESCRIPTION=Create and update your NFT collections on XPR Network. Easily airdrop NFTs to a set of recipients or put existing NFTs on sale! +NEXT_PUBLIC_FAVICON=https://soon.market/favicon.png +NEXT_PUBLIC_META_ICON=https://media.soon.market/images/soon-logo.png +NEXT_PUBLIC_APP_URL=https://manager.soon.market -NEXT_PUBLIC_CHAIN_KEY_DEFAULT=eos +NEXT_PUBLIC_CHAIN_KEY_DEFAULT=xpr #IPFS -NEXT_PUBLIC_IPFS_ENDPOINT=https://facings.mypinata.cloud/ipfs -NEXT_PUBLIC_IPFS_API_JWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySW5mb3JtYXRpb24iOnsiaWQiOiJmYTk1YzM5MS01ZDlkLTQyNDgtYWZlYS0xMjJhNzVhMjNhZjkiLCJlbWFpbCI6InJvYkBlb3NkZXRyb2l0LmlvIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsInBpbl9wb2xpY3kiOnsicmVnaW9ucyI6W3siaWQiOiJOWUMxIiwiZGVzaXJlZFJlcGxpY2F0aW9uQ291bnQiOjF9XSwidmVyc2lvbiI6MX0sIm1mYV9lbmFibGVkIjpmYWxzZSwic3RhdHVzIjoiQUNUSVZFIn0sImF1dGhlbnRpY2F0aW9uVHlwZSI6InNjb3BlZEtleSIsInNjb3BlZEtleUtleSI6ImZjMmU0ZGI2NGJiYjRjNjZmNWFkIiwic2NvcGVkS2V5U2VjcmV0IjoiYTRhNWU4OThhMDE2YTVjYjVjNTI2ZTU0NTBmMTI2Y2RlZWYzODIzYTM2Y2FhNjIxZDRmYmU1YjYwNTNjZjBjMSIsImlhdCI6MTY3Nzc5NTkwMX0.ap-Y4EAuWB5b0FjxiXVsHSdV1ZjFMg3FEVp-lZ2BWSE +NEXT_PUBLIC_IPFS_ENDPOINT=https://ipfs-gateway.soon.market/ipfs -#WAX CHAIN -NEXT_PUBLIC_WAX_MAINNET_AA_ENDPOINT=https://api.facings4ever.detroitledger.tech -NEXT_PUBLIC_WAX_MAINNET_CHAIN_ID=1064487b3cd1a897ce03ae5b6a865651747e2e152090f99c1d19d44e01aea5a4 -NEXT_PUBLIC_WAX_MAINNET_PROTOCOL=https -NEXT_PUBLIC_WAX_MAINNET_HOST=api.facings4ever.detroitledger.tech -NEXT_PUBLIC_WAX_MAINNET_PORT=443 +#XPR NETWORK +NEXT_PUBLIC_XPR_NETWORK_MAINNET_AA_ENDPOINT=https://api.soon.market +NEXT_PUBLIC_XPR_NETWORK_MAINNET_CHAIN_ID=384da888112027f0321850a169f737c33e53b388aad48b5adace4bab97f437e0 +NEXT_PUBLIC_XPR_NETWORK_MAINNET_PROTOCOL=https +NEXT_PUBLIC_XPR_NETWORK_MAINNET_HOST=metal-proton-rpc.global.binfra.one +NEXT_PUBLIC_XPR_NETWORK_MAINNET_PORT=443 -#WAX TESTNET CHAIN -NEXT_PUBLIC_WAX_TESTNET_AA_ENDPOINT=https://atomic.testnet.wax.detroitledger.tech -NEXT_PUBLIC_WAX_TESTNET_CHAIN_ID=f16b1833c747c43682f4386fca9cbb327929334a762755ebec17f6f23c9b8a12 -NEXT_PUBLIC_WAX_TESTNET_PROTOCOL=https -NEXT_PUBLIC_WAX_TESTNET_HOST=testnet.wax.detroitledger.tech -NEXT_PUBLIC_WAX_TESTNET_PORT=443 +#XPR_NETWORK TESTNET CHAIN +NEXT_PUBLIC_XPR_NETWORK_TESTNET_AA_ENDPOINT=https://test.proton.api.atomicassets.io +NEXT_PUBLIC_XPR_NETWORK_TESTNET_CHAIN_ID=71ee83bcf52142d61019d95f9cc5427ba6a0d7ff8accd9e2088ae2abeaf3d3dd +NEXT_PUBLIC_XPR_NETWORK_TESTNET_PROTOCOL=https +NEXT_PUBLIC_XPR_NETWORK_TESTNET_HOST=metal-protontest-rpc.global.binfra.one +NEXT_PUBLIC_XPR_NETWORK_TESTNET_PORT=443 -#EOS MAINNET CHAIN -NEXT_PUBLIC_EOS_MAINNET_AA_ENDPOINT=https://api.eos.detroitledger.tech -NEXT_PUBLIC_EOS_MAINNET_CHAIN_ID=aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906 -NEXT_PUBLIC_EOS_MAINNET_PROTOCOL=https -NEXT_PUBLIC_EOS_MAINNET_HOST=api.eos.detroitledger.tech -NEXT_PUBLIC_EOS_MAINNET_PORT=443 - -#EOS JUNGLE4 CHAIN -NEXT_PUBLIC_EOS_JUNGLE4_AA_ENDPOINT=https://api.jungle.detroitledger.tech -NEXT_PUBLIC_EOS_JUNGLE4_CHAIN_ID=73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d -NEXT_PUBLIC_EOS_JUNGLE4_PROTOCOL=https -NEXT_PUBLIC_EOS_JUNGLE4_HOST=api.jungle.detroitledger.tech -NEXT_PUBLIC_EOS_JUNGLE4_PORT=443 +NEXT_PUBLIC_REQUEST_ACCOUNT=soonmarket \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 27ea16d..deb051f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,35 +1,33 @@ -FROM node:16-alpine +FROM node:18.17-alpine3.18 AS builder -# Setting working directory. All the path will be relative to WORKDIR -WORKDIR /usr/app +ENV NODE_ENV production -# Install PM2 globally -RUN npm install --global pm2 +WORKDIR /app +COPY . . +RUN yarn install --frozen-lockfile -# Installing dependencies -COPY ./yarn.lock ./ -COPY ./package*.json ./ +RUN yarn build -# Install dependencies -RUN yarn install +FROM node:18.17-alpine3.18 AS runner +ENV NODE_ENV production +ENV PORT 3000 -# Copying source files -COPY ./ ./ +RUN adduser --disabled-password nftmanager && \ + mkdir -p /app && \ + chown -R nftmanager:nftmanager /app -# Build app -RUN yarn build +WORKDIR /app -RUN chown -R node .next +USER nftmanager -# Expose the listening port -EXPOSE 3000 +COPY --from=builder /app/.env .env -# The node user is provided in the Node.js Alpine base image +COPY --from=builder /app/public ./public +COPY --from=builder --chown=nftmanager:nftmanager /app/.next/standalone ./ +COPY --from=builder --chown=nftmanager:nftmanager /app/.next/static ./.next/static +COPY --from=builder /app/next.config.js ./next.config.js -USER node - -# Run npm start script with PM2 when container starts -#CMD [ "pm2-runtime", "start", "yarn" ] +EXPOSE 3000 -CMD [ "pm2-runtime", "start", "npm", "--", "start" ] +ENTRYPOINT ["node", "server.js"] \ No newline at end of file diff --git a/README.md b/README.md index 68058f9..57b6d72 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ An NFT Collection Manager for the EOS/AtomicAssets ecosystem built by [FACINGS]( This project is meant to both work as a stand-alone NFT publishing platform, as well as a launchpad for NFT developers on EOS. - The core feature set is very simple: 1. Login and view resource usage @@ -18,7 +17,6 @@ Important principles: 2. Allow publishers, developers, and businesses to build faster 3. Grow open-source community around core EOS/AtomicAssets needs - ## Documentation 1. **Getting Started** (this README document) - Project overview and "Getting Started" guide for devs. @@ -29,14 +27,12 @@ Important principles: 6. **[Data Import Plugin](docs/plugin-import.md)** - For users, guide to using the CSV import plugin. 7. **[Data Types](docs/data-types.md)** - An overview of AtomicAssets data types. - ## Dependencies 1. Public AtomicAsset API ([AGPLv3](https://github.com/pinknetworkx/eosio-contract-api); use any [public endpoint](https://support.pink.gg/hc/en-us/articles/4405478859922-Developer-Resources)) 2. Public Node API endpoint ([MIT](https://github.com/EOSIO/eos); use any public [EOS](https://mainnet.eosio.online/endpoints) or [WAX](https://wax.eosio.online/endpoints) endpoint) 3. Public IPFS endpoint ([MIT](https://github.com/ipfs/ipfs); e.g. https://ipfs.ledgerwise.io/ipfs) - ## Getting Started - Development Ensure all project dependencies are installed: @@ -55,7 +51,6 @@ yarn dev Now you may open [http://localhost:3000](http://localhost:3000) to access the app. - ## Running the application with docker Install Docker and execute: @@ -66,7 +61,6 @@ docker-compose up --build --force-recreate After build, open [http://localhost:3000](http://localhost:3000) to access the app. - ## Environment Variables Next.js allows you to set defaults in `.env` (all environments), diff --git a/docker-compose.yml b/docker-compose.yml index 6cccc03..48295bc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,9 +15,9 @@ x-common: &commons services: app: - image: collection-manager + image: nft-manager build: . ports: - 3000:3000 healthcheck: - test: ["CMD", "curl", "http://localhost:3000/eos"] \ No newline at end of file + test: ["CMD", "curl", "http://localhost:3000/xpr"] \ No newline at end of file diff --git a/docs/data-types.md b/docs/data-types.md index ec96610..0ea5a0c 100644 --- a/docs/data-types.md +++ b/docs/data-types.md @@ -1,32 +1,37 @@ ## Introduction -To allow efficient use of blockchain resources, AtomicAssets gives publishers the ability to pick precisely the data types they need for whatever metadata attributes need to be stored. Storage space requirements are generally measured and priced in terms of *bytes*. + +To allow efficient use of blockchain resources, AtomicAssets gives publishers the ability to pick precisely the data types they need for whatever metadata attributes need to be stored. Storage space requirements are generally measured and priced in terms of _bytes_. Especially for launching large collections, it becomes important to be aware of how you are storing data to ensure it's not wasteful. The main principle to remember is to pick the smallest data types that work for your needs. ## Numerical Types ### Integer Types (whole numbers, including negatives) -*Integers* are whole numbers and can include negative values. Also referred to as *Signed Integers*, meaning they can include numbers with a "negative sign". + +_Integers_ are whole numbers and can include negative values. Also referred to as _Signed Integers_, meaning they can include numbers with a "negative sign". - `int8` (1 byte): whole numbers `-128` to `127` - `int16` (2 bytes): whole numbers `-32,768` to `32,767` - `int32` (4 bytes): whole numbers `-2,147,483,648` to `2,147,483,647` - `int64` (8 bytes): whole numbers `-9,223,372,036,854,775,808` to `9,223,372,036,854,775,807` -*Technical note: Integers are stored as [zig-zag encoded](https://gist.github.com/mfuerstenau/ba870a29e16536fdbaba#file-zigzag-encoding-readme) varints.* +_Technical note: Integers are stored as [zig-zag encoded](https://gist.github.com/mfuerstenau/ba870a29e16536fdbaba#file-zigzag-encoding-readme) varints._ ### Unsigned Integer Types (whole numbers, no negative values) -*Unsigned Integers* are whole numbers greater or equal to zero (no negative numbers). + +_Unsigned Integers_ are whole numbers greater or equal to zero (no negative numbers). - `uint8` (1 byte): whole numbers `0` to `255` - `uint16` (2 bytes): whole numbers `0` to `65,535` - `uint32` (4 bytes): whole numbers `0` to `4,294,967,295` - `uint64` (8 bytes): whole numbers `0` to `18,446,744,073,709,551,615` -*Technical note: Unsigned Integers are stored as varints.* +_Technical note: Unsigned Integers are stored as varints._ ### Fixed Types -For advanced users only. The `fixed` type is an alias for `uint`, but not stored as `varints` and instead as a *fixed size in little endian order* ([source](https://github.com/pinknetworkx/atomicassets-contract/wiki/Serialization)). + +For advanced users only. The `fixed` type is an alias for `uint`, but not stored as `varints` and instead as a _fixed size in little endian order_ ([source](https://github.com/pinknetworkx/atomicassets-contract/wiki/Serialization)). + - `fixed8` (1 byte): `0` to `255` - `fixed16` (2 bytes): `0` to `65,535` - `fixed32` (4 bytes): `0` to `4,294,967,295` @@ -34,18 +39,21 @@ For advanced users only. The `fixed` type is an alias for `uint`, but not stored - `byte` (1 byte): an alias for `fixed8`: `0` to `255` ### Float/Double -*Floats* and *Doubles* are generally used whenever you need numbers with a decimal component or in cases where the values are very large. While they are imprecise (for instance, setting a float value of `0.3` might internally be represented as `0.299999999`), they allow you to store very large numbers such as `1e28` or very small numbers such as `1e-30`. + +_Floats_ and _Doubles_ are generally used whenever you need numbers with a decimal component or in cases where the values are very large. While they are imprecise (for instance, setting a float value of `0.3` might internally be represented as `0.299999999`), they allow you to store very large numbers such as `1e28` or very small numbers such as `1e-30`. - `float` (4 bytes): numbers as high as `3.4e38` or as small as `1.7e-38`, with about 7 digits of precision - `double` (8 bytes): numbers as high as `1.7e308` or as small as `1.7e-308`, with about 15 digits of precision ## Other Data Types + - `string` (~1 byte per character): Stores any length of text. - `ipfs` (~32 bytes): stores a Base58 IPFS address. -- `bool` (1 byte): *boolean* has two possible values: `1` (`true`) and `0` (`false`). (e.g. `is_burnable`) +- `bool` (1 byte): _boolean_ has two possible values: `1` (`true`) and `0` (`false`). (e.g. `is_burnable`) ## Vectors -While the `collection-manager` app does not currently allow it, the AtomicAssets contract allows any type to be turned into a *vector* by appending `[]` to the type name (e.g. `int32[]`). Nested vectors (e.g. `int32[][]`) are not allowed. + +While the `collection-manager` app does not currently allow it, the AtomicAssets contract allows any type to be turned into a _vector_ by appending `[]` to the type name (e.g. `int32[]`). Nested vectors (e.g. `int32[][]`) are not allowed. For example, a user-defined schema field like `tags` can contain multiple values if the data type is `string[]`. @@ -56,7 +64,7 @@ For example, a user-defined schema field like `tags` can contain multiple values 3. To store a number that can range from `0..50000`, use a `uint16`. 4. To store an IPFS hash, use `ipfs` type. 5. To store a number which is very large, very small, or has many decimal points, use a `float` or `double`. `float` provides about 7 digits of precision, while `double` about 15. -6. To store a number with many decimal places *precisely*, use one of the `uint` or `int` types and multiply/divide by some factor of 10 when writing or reading the value. The only way to get precise decimal places is to use an *Integer* type (which only allows whole numbers) and shift the decimal place as needed. +6. To store a number with many decimal places _precisely_, use one of the `uint` or `int` types and multiply/divide by some factor of 10 when writing or reading the value. The only way to get precise decimal places is to use an _Integer_ type (which only allows whole numbers) and shift the decimal place as needed. ## References diff --git a/docs/plugin-airdrop.md b/docs/plugin-airdrop.md index 8e7b7f7..d957f70 100644 --- a/docs/plugin-airdrop.md +++ b/docs/plugin-airdrop.md @@ -15,6 +15,7 @@ holders. ### Querying Accounts There are three options for querying holders: + 1. Search by template - enter 1 or more template ids to retrieve a list of holders. 2. Search by collection - enter 1 or more collection names to retrieve a list of holders. 3. Search by not holding template - enter a collection and template id to @@ -26,6 +27,7 @@ There are three options for querying holders: When "Unique accounts only" is selected, the query will not return duplicate accounts. If this toggle is not selected: + 1. When searching by a template, accounts holding multiple ("X") copies will be added "X" times. 2. When searching by multiple collections, accounts holding multiple collections will be added multiple times. @@ -39,7 +41,6 @@ accounts here, separated by commas. The dice button on the right side of this field will shuffle the listed accounts using a seed obtained from random.org. Press it as many times as you like. - ## NFT Selection ### Mint NFTs from template diff --git a/docs/plugin-import.md b/docs/plugin-import.md index 988da23..ce5335d 100644 --- a/docs/plugin-import.md +++ b/docs/plugin-import.md @@ -18,7 +18,6 @@ The benefits of this approach: catch mistakes such as empty or non-unique entries before the schema and templates are created. - ## Step 1: Preparing the Spreadsheet To start, we assume you have a spreadsheet where the first row contains @@ -33,39 +32,34 @@ This spreadsheet consists of 4 columns and 5 rows, from which 1 schema and 4 templates will be created. | name | img | points | description | -|--------|-------------------------------------------------------------|--------|---------------------| +| ------ | ----------------------------------------------------------- | ------ | ------------------- | | Apple | QmY2yFqDmSPWiFbzsMeREHXyCkY5LdY62WWyYUhe5ogpmT | 5 | Crunchy round fruit | | Banana | bafkreidullbimqjiob2apauxv3tj23kupb5em3c4i5soks2svsbqrvasce | 2 | Mushy yellow fruit | | Kiwi | bafkreichwf6uollkwe55bmrvnt3744rnmn5g3boekoh62krgu2umv4qpgu | 3 | Hairy green fruit | | Cherry | QmeciM9AtHdCycNAwtWh6bAsLCaKnWjgFAg95pFuP63AGW | 8 | Red stone fruit | - - ## Step 2: Add system columns There are 4 columns that **must be present** when importing a CSV file: 1. `max_supply`: (whole number) the maximum number of NFTs which can be minted - from the template. (set to `0` for *unlimited*) + from the template. (set to `0` for _unlimited_) 2. `burnable`: (`TRUE` or `FALSE`) recommended set to `TRUE` to allow users the option to burn their NFTs. 3. `transferable`: (`TRUE` or `FALSE`) recommended set to `TRUE` to allow users to trade their NFTs. 4. `sysflag`: leave this column blank for now. - ##### Example: Note: ❌ indicates cells which are to be left blank. | name | img | points | description | **max_supply** | **burnable** | **transferable** | **sysflag** | -|--------|-------------------------------------------------------------|--------|---------------------|:--------------:|:------------:|:----------------:|:-----------:| -| Apple | QmY2yFqDmSPWiFbzsMeREHXyCkY5LdY62WWyYUhe5ogpmT | 5 | Crunchy round fruit | **100** | **TRUE** | **TRUE** | ❌ | -| Banana | bafkreidullbimqjiob2apauxv3tj23kupb5em3c4i5soks2svsbqrvasce | 2 | Mushy yellow fruit | **100** | **TRUE** | **TRUE** | ❌ | -| Kiwi | bafkreichwf6uollkwe55bmrvnt3744rnmn5g3boekoh62krgu2umv4qpgu | 3 | Hairy green fruit | **100** | **TRUE** | **TRUE** | ❌ | -| Cherry | QmeciM9AtHdCycNAwtWh6bAsLCaKnWjgFAg95pFuP63AGW | 8 | Red stone fruit | **100** | **TRUE** | **TRUE** | ❌ | - - +| ------ | ----------------------------------------------------------- | ------ | ------------------- | :------------: | :----------: | :--------------: | :---------: | +| Apple | QmY2yFqDmSPWiFbzsMeREHXyCkY5LdY62WWyYUhe5ogpmT | 5 | Crunchy round fruit | **100** | **TRUE** | **TRUE** | ❌ | +| Banana | bafkreidullbimqjiob2apauxv3tj23kupb5em3c4i5soks2svsbqrvasce | 2 | Mushy yellow fruit | **100** | **TRUE** | **TRUE** | ❌ | +| Kiwi | bafkreichwf6uollkwe55bmrvnt3744rnmn5g3boekoh62krgu2umv4qpgu | 3 | Hairy green fruit | **100** | **TRUE** | **TRUE** | ❌ | +| Cherry | QmeciM9AtHdCycNAwtWh6bAsLCaKnWjgFAg95pFuP63AGW | 8 | Red stone fruit | **100** | **TRUE** | **TRUE** | ❌ | ## Step 3: Specify data types @@ -74,6 +68,7 @@ Note: ❌ indicates cells which are to be left blank. 3. For each of your original columns, enter the desired datatype in this row (ignore `max_supply`, `burnable`, and `transferable`). Example data types: + 1. `string`: any text content 2. `uint8`: whole numbers from `0` to `255` 3. `int16`: whole numbers from `-32,768` to `32,767` @@ -84,19 +79,17 @@ Example data types: For a full list of allowed types, see [Data Types](data-types.md). - ##### Example Note: ❌ indicates cells which are to be left blank. -| name | img | points | description | max_supply | burnable | transferable | sysflag | -|------------|-------------------------------------------------------------|-----------|---------------------|:----------:|:--------:|:------------:|:------------:| -| **string** | **image** | **uint8** | **string** | ❌ | ❌ | ❌ | **datatype** | -| Apple | QmY2yFqDmSPWiFbzsMeREHXyCkY5LdY62WWyYUhe5ogpmT | 5 | Crunchy round fruit | 100 | TRUE | TRUE | ❌ | -| Banana | bafkreidullbimqjiob2apauxv3tj23kupb5em3c4i5soks2svsbqrvasce | 2 | Mushy yellow fruit | 100 | TRUE | TRUE | ❌ | -| Kiwi | bafkreichwf6uollkwe55bmrvnt3744rnmn5g3boekoh62krgu2umv4qpgu | 3 | Hairy green fruit | 100 | TRUE | TRUE | ❌ | -| Cherry | QmeciM9AtHdCycNAwtWh6bAsLCaKnWjgFAg95pFuP63AGW | 8 | Red stone fruit | 100 | TRUE | TRUE | ❌ | - +| name | img | points | description | max_supply | burnable | transferable | sysflag | +| ---------- | ----------------------------------------------------------- | --------- | ------------------- | :--------: | :------: | :----------: | :----------: | +| **string** | **image** | **uint8** | **string** | ❌ | ❌ | ❌ | **datatype** | +| Apple | QmY2yFqDmSPWiFbzsMeREHXyCkY5LdY62WWyYUhe5ogpmT | 5 | Crunchy round fruit | 100 | TRUE | TRUE | ❌ | +| Banana | bafkreidullbimqjiob2apauxv3tj23kupb5em3c4i5soks2svsbqrvasce | 2 | Mushy yellow fruit | 100 | TRUE | TRUE | ❌ | +| Kiwi | bafkreichwf6uollkwe55bmrvnt3744rnmn5g3boekoh62krgu2umv4qpgu | 3 | Hairy green fruit | 100 | TRUE | TRUE | ❌ | +| Cherry | QmeciM9AtHdCycNAwtWh6bAsLCaKnWjgFAg95pFuP63AGW | 8 | Red stone fruit | 100 | TRUE | TRUE | ❌ | ## Step 4: (Optional) Additional properties and validators @@ -111,7 +104,7 @@ Note: ❌ indicates cells which are to be left blank. Validators are optional but recommended as they will help you capture any potential issues or mistakes in your data (e.g. missing or repeated values). -Any failed validations will be reported by the Importer *before* anything is +Any failed validations will be reported by the Importer _before_ anything is written to the blockchain. Futute validators may include features like "spellcheck". @@ -120,10 +113,11 @@ Futute validators may include features like "spellcheck". - `unique`: `TRUE` or `FALSE` - if set to `TRUE`, the data import will verify that all templates to be created have no duplicate values for this field. -### How to add a *Property* or *Validator* +### How to add a _Property_ or _Validator_ + +The process of adding _properties_ or _validators_ is similar to adding the +required `datatype` _sysflag_: -The process of adding *properties* or *validators* is similar to adding the -required `datatype` *sysflag*: 1. Insert a new header row (e.g. after the `datatype` row but before the templates start. in the example below, two validators were added). 2. Enter the desired values, ignoring `max_supply`, `burnable`, and `transferable`. @@ -134,16 +128,15 @@ At this point, the spreadsheet will look something like this: Note: ❌ indicates cells which are to be left blank. -| name | img | points | description | max_supply | burnable | transferable | sysflag | -|----------|-------------------------------------------------------------|-----------|---------------------|:----------:|:--------:|:------------:|:------------:| -| string | image | uint8 | string | ❌ | ❌ | ❌ | datatype | -| **TRUE** | **TRUE** | **TRUE** | **TRUE** | ❌ | ❌ | ❌ | **required** | -| **TRUE** | **TRUE** | **FALSE** | **TRUE** | ❌ | ❌ | ❌ | **unique** | -| Apple | QmY2yFqDmSPWiFbzsMeREHXyCkY5LdY62WWyYUhe5ogpmT | 5 | Crunchy round fruit | 100 | TRUE | TRUE | ❌ | -| Banana | bafkreidullbimqjiob2apauxv3tj23kupb5em3c4i5soks2svsbqrvasce | 2 | Mushy yellow fruit | 100 | TRUE | TRUE | ❌ | -| Kiwi | bafkreichwf6uollkwe55bmrvnt3744rnmn5g3boekoh62krgu2umv4qpgu | 3 | Hairy green fruit | 100 | TRUE | TRUE | ❌ | -| Cherry | QmeciM9AtHdCycNAwtWh6bAsLCaKnWjgFAg95pFuP63AGW | 8 | Red stone fruit | 100 | TRUE | TRUE | ❌ | - +| name | img | points | description | max_supply | burnable | transferable | sysflag | +| -------- | ----------------------------------------------------------- | --------- | ------------------- | :--------: | :------: | :----------: | :----------: | +| string | image | uint8 | string | ❌ | ❌ | ❌ | datatype | +| **TRUE** | **TRUE** | **TRUE** | **TRUE** | ❌ | ❌ | ❌ | **required** | +| **TRUE** | **TRUE** | **FALSE** | **TRUE** | ❌ | ❌ | ❌ | **unique** | +| Apple | QmY2yFqDmSPWiFbzsMeREHXyCkY5LdY62WWyYUhe5ogpmT | 5 | Crunchy round fruit | 100 | TRUE | TRUE | ❌ | +| Banana | bafkreidullbimqjiob2apauxv3tj23kupb5em3c4i5soks2svsbqrvasce | 2 | Mushy yellow fruit | 100 | TRUE | TRUE | ❌ | +| Kiwi | bafkreichwf6uollkwe55bmrvnt3744rnmn5g3boekoh62krgu2umv4qpgu | 3 | Hairy green fruit | 100 | TRUE | TRUE | ❌ | +| Cherry | QmeciM9AtHdCycNAwtWh6bAsLCaKnWjgFAg95pFuP63AGW | 8 | Red stone fruit | 100 | TRUE | TRUE | ❌ | ## Step 5: Export to CSV diff --git a/docs/plugins.md b/docs/plugins.md index 25812a1..c281299 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -6,7 +6,6 @@ functionality to your deployment. Currently, all plugins are collection-level and, when enabled, are exposed on the "Plugins" tab of the Collection page. - ## Configuring Plugins The following directories are scanned for plugins: @@ -16,7 +15,6 @@ The following directories are scanned for plugins: All plugins found in either folder will be enabled on the UI. - ## Default Plugins ### `import`: Data import @@ -25,7 +23,6 @@ This plugin enables users to upload a CSV file from which to create a schema and any number of templates. See [`plugin-import.md`](plugin-import.md) for additional details. - ## External Plugins To add external plugins, simply add them to the `src/plugins/external` folder. @@ -35,7 +32,6 @@ They will be detected automatically upon restarting the app. It is recommended to use remote git repos, but the only requirement is that the plugins follow the rules outlined in the "Creating a Plugin" section below. - ### Installing the "Hello World" plugin `hello` is an example of a minimal plugin which can be cloned and adapted for @@ -50,9 +46,6 @@ git clone https://github.com/FACINGS/hello-plugin.git After restarting the app, you will see "Hello" in the Collection Plugins tab. - - - ## Creating a Plugin All plugins are required to have an `index.tsx` file located at @@ -86,7 +79,6 @@ export default function Hello() { } ``` - ## Contributing Plugins We welcome all merge requests for plugins which extend the functionality of the diff --git a/docs/testing-guide.md b/docs/testing-guide.md index a65ac0d..66b26ef 100644 --- a/docs/testing-guide.md +++ b/docs/testing-guide.md @@ -88,7 +88,6 @@ Note that many published collections may not have any published shemas or templa 2. Click on "Edit NFT", then "Burn NFT" tab. 3. Click on the "Burn NFT" button to sign and broadcast the transaction. - ## 4. Testing Stage 2, Milestone 1 deliverables ### Deliverable 1: TypeScript Implementation @@ -129,8 +128,6 @@ Documentation of the plugin system and instructions on how to install a sample p https://github.com/FACINGS/collection-manager/blob/main/docs/plugins.md - - ## 5. Testing Stage 2, Milestone 2 deliverables ### Deliverable 1: Import Function @@ -158,7 +155,6 @@ You may view the documentation of the standard here: [Data Import Plugin](plugin > Ability to submit transactions in batches - 1. Download sample file: [batch.test.csv](plugin-import-sample/batch.test.csv) 2. Start on the "Import" page (Collection > Plugins > Import) 3. Select the `batch.test.csv` file you downloaded in step 1 @@ -166,13 +162,12 @@ You may view the documentation of the standard here: [Data Import Plugin](plugin and you will be able to adjust the batch size from the default of 25, if desired. 5. Submitting the form will result in the user being prompted to sign a series of transactions. - ### Deliverable 2: Advanced Validation > Data validation heuristics upon import: -> (a) Uniqueness; -> (b) Completeness; -> (c) Datatype optimization +> (a) Uniqueness; +> (b) Completeness; +> (c) Datatype optimization 1. Download sample file: [validationtest.csv](plugin-import-sample/validationtest.csv) 2. Start on the "Import" page (Collection > Plugins > Import) @@ -183,10 +178,8 @@ You may view the documentation of the standard here: [Data Import Plugin](plugin 3. Required field error: "Kiwi" is missing a value for the `points` field, which was marked as 'required' 4. IPFS field validation error: "Orange" has an invalid entry for the `img` field, which expects an IPFS address - ## 6. Testing Stage 2, Milestone 3 deliverables - ### Deliverable 1: Airdrop Plugin Core > - Specify single & multiple recipients @@ -205,15 +198,16 @@ You may view the documentation of the standard here: [Data Import Plugin](plugin 2. Transfer from NFT IDs - specify (or query) a list of NFT (asset) IDs; submission transfers to the specified accounts. 4. Batch Size - at the bottom of the form, the user has control over batch size. This can be verified by inspecting the generated transactions. - ### Deliverable 2: Airdrop API Queries > Look-up Queries: +> > - everyone who has specific template > - everyone who doesn’t have specific templates within a collection > - everyone who has any item from a collection > > Unique Queries: +> > - option to send single or multiple assets to matched accounts 1. From the Airdrop page, these account queries are visible at the very top diff --git a/docs/user-guide.md b/docs/user-guide.md index 58e1cf5..dca3fa4 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -1,5 +1,4 @@ - -The FACINGS NFT Creator allows you to publish, manage, and distribute AtomicAssets NFTs. This guide assumes you have general knowledge of the EOS ecosystem, an Antelope account (such as EOS, WAX, or Proton) with sufficient resources to publish transactions, and a supported wallet such as *Anchor* or *Cloud Wallet*. +The FACINGS NFT Creator allows you to publish, manage, and distribute AtomicAssets NFTs. This guide assumes you have general knowledge of the EOS ecosystem, an Antelope account (such as EOS, WAX, or Proton) with sufficient resources to publish transactions, and a supported wallet such as _Anchor_ or _Cloud Wallet_. If you need more help getting started with account setup and familiarity with Antelope blockchains, we recommend starting here: https://academy.anyo.io/ If it's your first time publishing an NFT collection or you are simply testing the app, you should create a free testnet account before following this guide. Currently this app supports both [EOS Jungle4 Testnet](https://eosinabox.com/) and [WAX Testnet](https://waxsweden.org/create-testnet-account/). (Click links to create a free testing account.) @@ -9,39 +8,38 @@ If it's your first time publishing an NFT collection or you are simply testing t Important concepts in the AtomicAssets standard (using alphakittens on EOS as an example): 1. **"Collection"** - 1. the top-level record for your project: it can represent a Dapp or art collection. - 2. has a special field *Collection Name* which must be unique; and once set, it is not editable. This field adheres to the Antelope naming standard for accounts. You can make a short name (less than 12 characters) only if the author account creating the collection has the corresponding short name. - 3. has editable fields such as *Display Name*, *Description*, *Website*, and *Market Fee*. - 4. is the container for *Schemas*, *Templates*, and *NFTs*. - 5. editing permissions are managed throught the `authorized_accounts` field. - 6. example: the `alphakittens` collection has a *Display Name* of "Alpha Kittens" and a *Market Fee* of 6%. + 1. the top-level record for your project: it can represent a Dapp or art collection. + 2. has a special field _Collection Name_ which must be unique; and once set, it is not editable. This field adheres to the Antelope naming standard for accounts. You can make a short name (less than 12 characters) only if the author account creating the collection has the corresponding short name. + 3. has editable fields such as _Display Name_, _Description_, _Website_, and _Market Fee_. + 4. is the container for _Schemas_, _Templates_, and _NFTs_. + 5. editing permissions are managed throught the `authorized_accounts` field. + 6. example: the `alphakittens` collection has a _Display Name_ of "Alpha Kittens" and a _Market Fee_ of 6%. 2. **"Schema"** - 1. a collection of attributes ("fields") and their data type, e.g. `name (text)`, `age (number)`, `author (text)`. - 2. belongs to a collection. there can be any number of *Schemas* per *Collection*. - 3. must have a unique name within the collection (e.g. `kittens` or `artwork`). - 4. cannot be renamed or edited after creation, but can have attributes added to it. - 5. example: the `alphakittens` collection has one schema named `kittens` with two attributes: `name (text)` and `age (number)`. + 1. a collection of attributes ("fields") and their data type, e.g. `name (text)`, `age (number)`, `author (text)`. + 2. belongs to a collection. there can be any number of _Schemas_ per _Collection_. + 3. must have a unique name within the collection (e.g. `kittens` or `artwork`). + 4. cannot be renamed or edited after creation, but can have attributes added to it. + 5. example: the `alphakittens` collection has one schema named `kittens` with two attributes: `name (text)` and `age (number)`. 3. **"Template"** - 1. a specific configuration from which NFTs are minted. - 2. must be created from a specific schema (e.g. `kittens`). - 3. determines the total supply of NFTs that can be created from this - specific Template and its values. - 4. provides values for the attributes in that schema. - 5. designed to make easy work of minting multiple NFTs that are nearly identical. - 6. templates are not tradable, but templates are used to mint NFTs. - 7. cannot be modified after creation, with the exception of limiting supply of unminted NFTs. - 8. determines if attributes of the NFT are *mutable* (can be modified later) - or *immutable* (permanent). If an attribute/value are in a template, they - are *always* immutable. Mutable fields are fields which are defined on - the *schema* but *not* the *template*, and are set upon minting the NFT. - 9. example: I'm making a new template from the `kittens` schema, the `name` will be "Tom" and the `age` will be "4". + 1. a specific configuration from which NFTs are minted. + 2. must be created from a specific schema (e.g. `kittens`). + 3. determines the total supply of NFTs that can be created from this + specific Template and its values. + 4. provides values for the attributes in that schema. + 5. designed to make easy work of minting multiple NFTs that are nearly identical. + 6. templates are not tradable, but templates are used to mint NFTs. + 7. cannot be modified after creation, with the exception of limiting supply of unminted NFTs. + 8. determines if attributes of the NFT are _mutable_ (can be modified later) + or _immutable_ (permanent). If an attribute/value are in a template, they + are _always_ immutable. Mutable fields are fields which are defined on + the _schema_ but _not_ the _template_, and are set upon minting the NFT. + 9. example: I'm making a new template from the `kittens` schema, the `name` will be "Tom" and the `age` will be "4". 4. **"NFTs"** (also known as "Assets") - 1. *minted* (created) from a specific *Template*. - 2. can be minted individually or all at once. - 3. can be minted directly to your account or to any combination of accounts. - 4. may include *mutable* data that the collection creator can modify. - 5. tradable and burnable (assuming the creator left these "on" when creating the *Template*). - + 1. _minted_ (created) from a specific _Template_. + 2. can be minted individually or all at once. + 3. can be minted directly to your account or to any combination of accounts. + 4. may include _mutable_ data that the collection creator can modify. + 5. tradable and burnable (assuming the creator left these "on" when creating the _Template_). ### Additional Resources @@ -49,8 +47,6 @@ Important concepts in the AtomicAssets standard (using alphakittens on EOS as an - The [WAX Developer Portal](https://developer.wax.io/en/tutorials/howto_atomicassets/collection_struct.html) offers additional technical background and resources. ![](https://developer.wax.io/assets/img/tutorials/howto_atomicassets/atomicassets_scheme.jpg) - - # User Guide ## 1. Connect your Wallet @@ -64,25 +60,24 @@ Important concepts in the AtomicAssets standard (using alphakittens on EOS as an Click the "Create Collection" box. The "New Collection" page will open. Upload an image into the "Add Collection Image" box to the left. Fill out the other required text fields: -1. **Collection Name:** a *permanent* and *unique* on-chain name. (e.g. `alphakittens`) - 1. It must be exactly 12 characters (following the same rules as on-chain account names), unless you are specifically creating a collection from a premium account or a sub-account. - 2. Collection names are unique, so you cannot use any name which already belongs to a collection; and once you register your collection, nobody else will be able to use your collection name. - 3. This is generally the name which will be used in URLs for your collection (e.g. `https://creator.facings.io/jungle4/collection/`**`alphakittens`**) +1. **Collection Name:** a _permanent_ and _unique_ on-chain name. (e.g. `alphakittens`) + 1. It must be exactly 12 characters (following the same rules as on-chain account names), unless you are specifically creating a collection from a premium account or a sub-account. + 2. Collection names are unique, so you cannot use any name which already belongs to a collection; and once you register your collection, nobody else will be able to use your collection name. + 3. This is generally the name which will be used in URLs for your collection (e.g. `https://creator.facings.io/jungle4/collection/`**`alphakittens`**) 2. **Display Name:** e.g. `Alpha Kittens`. This can be edited in the future. 3. **Website:** e.g. `https://alphakittens.example.com`. This can be edited in the future. 4. **Market fee:** a number between `0` and `15`. This can be edited in the future. - 1. This is the percent which will be charged as a fee (and paid to you) when your NFTs are bought and sold. - 2. Keep in mind that there are additional fees paid to chain resources and - marketplaces than cannot be changed. Market data suggests a 6% fee is the - most commonly accepted collection fee. + 1. This is the percent which will be charged as a fee (and paid to you) when your NFTs are bought and sold. + 2. Keep in mind that there are additional fees paid to chain resources and + marketplaces than cannot be changed. Market data suggests a 6% fee is the + most commonly accepted collection fee. 5. **Description:** a short blurb describing the project, to be shown publicly on collection explorers. This can be edited in the future. 6. **Social Media (optional):** insert none, some or all of the social media you want associated with the collection. This can be edited in the future. 7. **Company Details (optional):** insert none, some or all of the social media you want associated with the collection. This can be edited in the future. - Once you submit the form, you will be asked to sign the transactions. If you receive an error the most common issues are lack of chain resources and duplicative name choice. -Congratulations, your *Collection* is registered on-chain! +Congratulations, your _Collection_ is registered on-chain! ## 3. Create Schema @@ -92,20 +87,21 @@ Now that you have registered a Collection, the next step is to define the schema ### Naming the Schema -1. The *Name* must consist of letters `a-z`, digits `1-5`, and/or period (`.`). +1. The _Name_ must consist of letters `a-z`, digits `1-5`, and/or period (`.`). It must be 12 characters or less. 2. Consider using a descriptive name such as `kittens` or `cards`. ### Defining Attributes 1. The default attributes are: - 1. `name` (`Text`) - 2. `img` (`Image`) - 3. `video` (`Text`) + 1. `name` (`Text`) + 2. `img` (`Image`) + 3. `video` (`Text`) 2. `name` is required but `img` or `video` can be removed by clicking on the trash can on the far right of the line. 3. Click the "Add Attribute" button to add any more desired attributes as needed. #### Schema: Basic Data Types + 1. Text - any text, including alphanumeric values and emojis 2. Integer Number - any whole number 3. Floating Point Number - any whole or decimal number @@ -127,15 +123,15 @@ Now that you have created a schema, you can use it to create a template. **"NFTs can be transferred"**: leave this On if you wish to allow users to trade their NFTs (recommended). If turned off the NFT will forever live in the account it is created into when you mint it. **"NFTs can be burned"**: leave this On if you wish to allow users to burn their NFTs (recommended). Turning this off will not allow the NFT to be destroyed at a later date. -**"Max Supply"**: this will determine the maximum number of NFTs which can be minted from this template. Setting a *Max Supply* of 0 means the template is unbounded (unlimited potential mints). The template can be locked later to prevent additional minting if needed. +**"Max Supply"**: this will determine the maximum number of NFTs which can be minted from this template. Setting a _Max Supply_ of 0 means the template is unbounded (unlimited potential mints). The template can be locked later to prevent additional minting if needed. #### Immutable Attributes Here you will see all the attributes you defined in the schema. -Templates contain solely *Immutable Attributes*. Any values you set here will be permanently on the NFTs you mint from this template. If you need your NFTs to have any attributes which can change later, leave them blank here. +Templates contain solely _Immutable Attributes_. Any values you set here will be permanently on the NFTs you mint from this template. If you need your NFTs to have any attributes which can change later, leave them blank here. -When you fill out an attribute (such as "*name*"), you will see the toggle switch to "Immutable" - this means the attribute will not be editable on any of the NFTs you mint from this template. Again, if you want to be able to edit an attribute such as "*name*" on individual NFTs, leave this blank and ensure the toggle switch reads "Mutable". +When you fill out an attribute (such as "_name_"), you will see the toggle switch to "Immutable" - this means the attribute will not be editable on any of the NFTs you mint from this template. Again, if you want to be able to edit an attribute such as "_name_" on individual NFTs, leave this blank and ensure the toggle switch reads "Mutable". Once you're done, click "Create Template" to sign the transaction. @@ -145,7 +141,7 @@ Once you're done, click "Create Template" to sign the transaction. 2. Ensure that the correct Schema and Template are selected. 3. **Recipients:** By default, one NFT will be minted to the account you are logged in as. You may add any number of recipients and set any number of copies to mint to each. 4. **Immutable Attributes**: These are the attributes which were set on the template. These cannot be changed, and they will be part of the NFT you mint. -5. **Mutable Attributes**: Any attributes you added to the schema but *not* the template are considered mutable. You can set those values here or leave them blank to be adjusted later. +5. **Mutable Attributes**: Any attributes you added to the schema but _not_ the template are considered mutable. You can set those values here or leave them blank to be adjusted later. 6. Click "Create NFT" to sign the transactions. 7. Your selected recipients will now have your minted NFTs! diff --git a/next.config.js b/next.config.js index b69c6f4..575f769 100644 --- a/next.config.js +++ b/next.config.js @@ -7,13 +7,13 @@ const nextConfig = { distDir: '.next', images: { domains: [ - 'wax.bloks.io', - 'bloks.io', - 'facings.mypinata.cloud', 'robohash.org', - 'ipfs.ledgerwise.io', + 'ipfs-gateway.soon.market', + 'media.soon.market', + 'soon.market', ], }, + output: 'standalone', }; module.exports = nextConfig; diff --git a/package.json b/package.json index 3fc5901..a53d80b 100644 --- a/package.json +++ b/package.json @@ -10,41 +10,40 @@ "prettier": "prettier --write ./" }, "dependencies": { - "@eosdacio/ual-wax": "^1.9.0", - "@headlessui/react": "^1.7.4", - "@headlessui/tailwindcss": "^0.1.1", - "@hookform/resolvers": "^2.9.10", - "@types/react-beautiful-dnd": "^13.1.3", - "@waxio/waxjs": "^1.1.0", - "axios": "^1.1.3", - "eosjs": "^22.1.0", - "framer-motion": "^9.0.3", - "is-ipfs": "^7.0.3", - "next": "13.0.3", - "papaparse": "^5.4.1", - "phosphor-react": "^1.4.1", + "@headlessui/react": "1.7.4", + "@headlessui/tailwindcss": "0.1.1", + "@hookform/resolvers": "2.9.10", + "@phosphor-icons/react": "2.0.10", + "@proton/ual-webauth": "0.1.19", + "@types/react-beautiful-dnd": "13.1.4", + "axios": "1.1.3", + "eosjs": "22.1.0", + "framer-motion": "9.0.3", + "is-ipfs": "7.0.3", + "next": "13.4.19", + "papaparse": "5.4.1", "react": "18.2.0", - "react-beautiful-dnd": "^13.1.1", + "react-beautiful-dnd": "13.1.1", "react-dom": "18.2.0", - "react-hook-form": "^7.39.4", - "react-swipeable": "^7.0.0", - "seed-random": "^2.2.0", - "sharp": "^0.31.3", - "ual-anchor": "^1.3.0", - "ual-reactjs-renderer": "^0.3.1", - "yup": "^0.32.11" + "react-hook-form": "7.39.4", + "react-swipeable": "7.0.0", + "seed-random": "2.2.0", + "sharp": "0.32.5", + "ual-anchor": "1.3.0", + "ual-reactjs-renderer": "0.3.1", + "yup": "0.32.11" }, "devDependencies": { "@types/node": "18.11.18", "@types/react": "18.0.26", - "autoprefixer": "^10.4.13", + "autoprefixer": "10.4.13", "eslint": "8.27.0", "eslint-config-next": "13.0.3", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-prettier": "^4.2.1", - "postcss": "^8.4.19", - "prettier": "^2.7.1", - "tailwindcss": "^3.2.4", + "eslint-config-prettier": "8.5.0", + "eslint-plugin-prettier": "4.2.1", + "postcss": "8.4.19", + "prettier": "2.7.1", + "tailwindcss": "3.2.4", "typescript": "4.9.4" } } diff --git a/public/xprnetwork.png b/public/xprnetwork.png new file mode 100644 index 0000000..e2b82ec Binary files /dev/null and b/public/xprnetwork.png differ diff --git a/src/assets/styles/globals.css b/src/assets/styles/globals.css index 2270cb0..d98fae1 100644 --- a/src/assets/styles/globals.css +++ b/src/assets/styles/globals.css @@ -4,7 +4,7 @@ @layer base { body { - @apply bg-neutral-900 text-white antialiased; + @apply bg-zinc-900 text-white antialiased; } body, @@ -18,13 +18,13 @@ @layer components { .headline-1 { - @apply text-[2rem] leading-[2.5rem] md:text-5xl md:leading-[3.5rem] lg:text-7xl lg:leading-[5rem] font-bold; + @apply text-[2rem] leading-[2.5rem] md:text-5xl md:leading-[3.5rem] lg:text-[3.5rem] lg:leading-[5rem] font-bold; } .headline-2 { - @apply text-[1.625rem] leading-[2.125rem] md:text-[2rem] md:leading-[2.5rem] lg:text-[2.5rem] lg:leading-[3rem] font-bold; + @apply text-[1.625rem] leading-[2.125rem] md:text-[2rem] md:leading-[2.5rem] lg:text-[1.75rem] lg:leading-[3rem] font-bold; } .headline-3 { - @apply text-xl md:text-2xl xl:text-[2rem] xl:leading-[2.5rem] font-bold; + @apply text-xl md:text-2xl xl:text-[1.5rem] xl:leading-[2.5rem] font-bold; } .title-1 { @@ -42,7 +42,7 @@ } .btn { - @apply inline-block text-base leading-[1.5rem] font-bold px-[calc(2rem-1px)] py-[calc(1rem-1px)] border border-white rounded hover:bg-neutral-700 disabled:opacity-75 disabled:cursor-not-allowed; + @apply inline-block text-base leading-[1.5rem] font-bold px-[calc(2rem-1px)] py-[calc(1rem-1px)] border border-white rounded hover:bg-zinc-700 disabled:opacity-75 disabled:cursor-not-allowed; } .btn-small { @apply text-sm leading-[1.375rem] py-[calc(0.5rem-1px)] px-4; @@ -51,35 +51,35 @@ @apply border-transparent; } .btn-small.btn-square { - @apply px-[calc(0.5rem-1px)] + @apply px-[calc(0.5rem-1px)]; } .btn-square { - @apply px-[calc(1rem-1px)] + @apply px-[calc(1rem-1px)]; } .badge-small { - @apply text-sm leading-[1.375rem] px-2 py-[0.125rem] bg-neutral-800 text-neutral-400 rounded-3xl text-center min-w-[2rem]; + @apply text-sm leading-[1.375rem] px-2 py-[0.125rem] bg-zinc-800 text-zinc-400 rounded-3xl text-center min-w-[2rem]; } .badge-medium { - @apply text-base px-2 py-1 bg-neutral-800 text-neutral-400 rounded-3xl text-center min-w-[2rem]; + @apply text-base px-2 py-1 bg-zinc-800 text-zinc-400 rounded-3xl text-center min-w-[2rem]; } .badge-large { - @apply text-lg leading-[1.625rem] px-4 py-2 bg-neutral-800 text-neutral-400 rounded-3xl text-center min-w-[2rem]; + @apply text-lg leading-[1.625rem] px-4 py-2 bg-zinc-800 text-zinc-400 rounded-3xl text-center min-w-[2rem]; } .tab-list { - @apply flex md:justify-center gap-4 border-b border-neutral-700 overflow-auto; + @apply flex md:justify-center gap-4 border-b border-zinc-700 overflow-auto; } .tab { - @apply body-1 font-bold px-4 py-[calc(1rem-2px)] border border-transparent flex gap-2 ui-not-selected:text-neutral-400 ui-selected:border-b-white ui-selected:text-white whitespace-nowrap focus:outline-none; + @apply body-1 font-bold px-4 py-[calc(1rem-2px)] border border-transparent flex gap-2 ui-not-selected:text-zinc-400 ui-selected:border-b-white ui-selected:text-white whitespace-nowrap focus:outline-none; } .tooltip { @apply relative; } .tooltip .tooltip-text { - @apply hidden absolute p-4 -top-16 right-0 bg-neutral-700 whitespace-nowrap rounded - } + @apply hidden absolute p-4 -top-16 right-0 bg-zinc-700 whitespace-nowrap rounded; + } .tooltip:hover .tooltip-text { @apply block; } diff --git a/src/components/Attributes.tsx b/src/components/Attributes.tsx index 2564223..acb9553 100644 --- a/src/components/Attributes.tsx +++ b/src/components/Attributes.tsx @@ -20,7 +20,7 @@ function AttributesItem({ name, value, type }: AttributesItemProps) { if (!value) return; return ( -
+
{name} {type === 'bool' ? ( {`${Boolean(value)}`} diff --git a/src/components/BaseField.tsx b/src/components/BaseField.tsx index 87817d2..01e77ba 100644 --- a/src/components/BaseField.tsx +++ b/src/components/BaseField.tsx @@ -1,5 +1,5 @@ import { ReactNode } from 'react'; -import { WarningCircle } from 'phosphor-react'; +import { WarningCircle } from '@phosphor-icons/react'; interface BaseFieldProps { icon?: ReactNode; @@ -25,12 +25,12 @@ export function BaseField({ )}
{icon && ( -
+
{icon}
)} @@ -45,9 +45,7 @@ export function BaseField({ {error ? ( {error} ) : ( - hint && ( - {hint} - ) + hint && {hint} )} ); diff --git a/src/components/Card/components/CardContent.tsx b/src/components/Card/components/CardContent.tsx index 832df0b..f3a5e00 100644 --- a/src/components/Card/components/CardContent.tsx +++ b/src/components/Card/components/CardContent.tsx @@ -1,5 +1,5 @@ import Image from 'next/image'; -import { ImageSquare } from 'phosphor-react'; +import { ArrowUpRight, ImageSquare } from '@phosphor-icons/react'; import Link from 'next/link'; interface CardContentProps { @@ -8,6 +8,7 @@ interface CardContentProps { video: string; title: string; subtitle: string; + saleInfo?: any; viewLink?: string; withThumbnail: boolean; } @@ -18,19 +19,25 @@ export function CardContent({ video, title, subtitle, + saleInfo, viewLink, withThumbnail, }: CardContentProps) { return ( <> - {id && ( + {saleInfo && saleInfo.assetCount > 1 && (
-

#{id}

+ Bundle ({saleInfo.assetCount} NFTs)
)} + {saleInfo && saleInfo.assetCount == 1 && ( +
Single Sale
+ )} + + {!saleInfo && id &&
#{id}
} {withThumbnail && ( -
+
{video && (
diff --git a/src/components/Card/index.tsx b/src/components/Card/index.tsx index de0982f..37f5fb4 100644 --- a/src/components/Card/index.tsx +++ b/src/components/Card/index.tsx @@ -4,22 +4,26 @@ import { HTMLAttributes } from 'react'; interface CardProps extends HTMLAttributes { href?: string; + target?: string; id?: string; image?: string; video?: string; title?: string; subtitle?: string; + saleInfo?: any; viewLink?: string; withThumbnail?: boolean; } export function Card({ href, + target, id, image, video, title, subtitle, + saleInfo, viewLink, withThumbnail = true, ...props @@ -29,9 +33,10 @@ export function Card({ +
diff --git a/src/components/Carousel.tsx b/src/components/Carousel.tsx index e118071..c7e58db 100644 --- a/src/components/Carousel.tsx +++ b/src/components/Carousel.tsx @@ -1,7 +1,7 @@ import { useEffect, useState, useRef } from 'react'; import Image from 'next/image'; import { AnimatePresence, motion, MotionConfig } from 'framer-motion'; -import { ImageSquare } from 'phosphor-react'; +import { ImageSquare } from '@phosphor-icons/react'; import { ipfsEndpoint } from '@configs/globalsConfig'; import { CarouselPreview } from './CarouselPreview'; @@ -75,7 +75,7 @@ export function Carousel({ images, unique }: CarouselProps) { /> ) : ( -
+
)} @@ -134,7 +134,7 @@ export function Carousel({ images, unique }: CarouselProps) { /> ) : ( -
+
)} diff --git a/src/components/CarouselPreview.tsx b/src/components/CarouselPreview.tsx index b41825c..2ad6295 100644 --- a/src/components/CarouselPreview.tsx +++ b/src/components/CarouselPreview.tsx @@ -6,7 +6,7 @@ import { Ref, } from 'react'; import Image from 'next/image'; -import { X, CaretLeft, CaretRight } from 'phosphor-react'; +import { X, CaretLeft, CaretRight } from '@phosphor-icons/react'; import { useSwipeable } from 'react-swipeable'; import { Dialog, Transition } from '@headlessui/react'; import { AnimatePresence, motion, MotionConfig } from 'framer-motion'; @@ -77,7 +77,7 @@ function CarouselPreviewComponent(
-
+
-
+
You need to connect your wallet to continue. diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 2ea9d73..1c24b6c 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -3,77 +3,59 @@ import { DiscordLogo, GlobeSimple, GithubLogo, -} from 'phosphor-react'; +} from '@phosphor-icons/react'; export function Footer() { return ( -