fidrop-arcana
TypeScript icon, indicating that this package has built-in type declarations

1.8.0 • Public • Published

Arcana Typescript Bindings

Please also see the contract documentation.

Installation

yarn add fidrop-arcana

Instantiation

The contracts can be initialized using the initializeInstruction function (see example usage in cli.ts).

Configuration

This step currently mainly involves setting up the sales groups correctly. In cli.ts the approach taken is saving everything to a local configuration file and then finally committing everything to the chain - see "commit-groups" in cli.ts.

However, this can be done differently. The ArcanaClient (see Arcana.client.ts) class has methods available to add, delete and update groups.

Where are the NFTs stored?

This is how it works:

  1. When you instantiate the contract, you define how large the collection is e.g. 100, or 1000 or something else
  2. You also define the collection base URI e.g. "https://example.com"
  3. During minting, a user randomly gets assigned a number between 1 and the n (where n is the total number of tokens). For example, for a collection of 2500 NFTs, during minting a user can randomly buy a "token id" ranging from 1 to 2500
  4. During minting, and after the user gets a token ID, the sales contract calls the collection contract to mint a new NFT. The new NFT's token URI will be based on the base token URI set earlier. For example if the user got token id 27, then their token URI will be "https://example.com/27"
  5. The NFT collection owners must ensure that the URI points to a valid NFT based on cw721 standard - this is identical to ERC-721.
  6. Royalties are supported in accordance with ERC-2981

Minting

Uses will mint by calling the mint function from ArcanaClient. See 'mint' example in cli.ts. ArcanaClient contains other mint related functions (mintTo and mintFor) but these are admin only.

The collection contract

CollectionClient from Collection.client.ts can be used to interact directly with the NFT collection contract. Do note that you cannot mint directly with this contract and have to go through the arcana sales contract. However, you can use CollectionClient to query for data regarding NFTs.

Sei v2 Mainnet (pacific-1)

All contracts have been deployed to the Sei v2 Mainnet.

Codes:

  • arcana: 4830
  • collection: 4828
  • open edition minter: 4833

Instantiated contract addresses:

  • arcana: sei14dl6m7v9uxm346670xxpvjp3yktr4lx48f83m4w9xey46ldede3sj0f9vt

  • associated collection: sei1v0q93z2pa56uq9jl0t9099tdxrnssxqc64j2hkp55f79ymh2dn9q6c6rk6

  • open edition minter: sei10fjxujr6mumtr53483u7cmec8pvxc782qx2cn8uay68ms22f4puqyg6pfd

  • associated collection: sei14kuah2lddc27c5uu9vc6vkf4xd2p3l2wa72ahplhevfghsp8zz0sskn6aj

Sei v2 Devnet (arctic-1)

RPC URL: https://rpc.arctic-1.seinetwork.io

All contracts have been deployed to the Sei v2 Devnet.

Codes:

  • arcana: 73
  • collection: 74
  • open edition minter: 102

Instantiated contract addresses:

  • arcana: sei1p73558u0g52e96tzna8uhaea0v3mtda7whxqaxq6due44kgvu2aq7r3hh5

  • associated collection: sei1e4r7ezdgsa5vnx5fdrx47kvzr6k6fsk4qtc0frxwnclvj0kzhywsy3nr4f

  • open edition minter: sei1ashuctzszwj5ju343v9j9scllck27l7fe92vn63t7zjs3uvla03sl0vlu0

  • associated collection: sei1devk2dv0hkmaj0q0yhc002knazgejswjcve4mr5p7vk4awvzxzksrpnucr

Testnet (atlantic-2)

RPC URL: https://rpc.atlantic-2.seinetwork.io

All contracts have been deployed to the atlantic2 Sei testnet.

Codes:

  • arcana: 7750
  • collection: 7751
  • open edition minter: 8258

Instantiated contract addresses:

  • arcana: sei1t0h4j08fheknlrhk9m5r8m74wnktrn5evcrsknxrtzlqhuvzfmwqyl2pev

  • associated collection: sei14atgn4fjvwljuxfz50r0qxcawpjrrmmwjqe4lk8ylzk7vr675k7sya68tp

  • open edition minter: n/a

  • associated collection: n/a

Readme

Keywords

none

Package Sidebar

Install

npm i fidrop-arcana

Weekly Downloads

1

Version

1.8.0

License

MIT

Unpacked Size

636 kB

Total Files

90

Last publish

Collaborators

  • moshthepitt