Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 20 additions & 33 deletions .env
Original file line number Diff line number Diff line change
@@ -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
44 changes: 21 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
test: ["CMD", "curl", "http://localhost:3000/xpr"]
28 changes: 18 additions & 10 deletions docs/data-types.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,59 @@
## 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`
- `fixed64` (8 bytes): `0` to `18,446,744,073,709,551,615`
- `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[]`.

Expand All @@ -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

Expand Down
3 changes: 2 additions & 1 deletion docs/plugin-airdrop.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

Expand All @@ -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
Expand Down
Loading