0.1.17 • Published 2 years ago

@nftvillage/presale-sdk v0.1.17

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

@nftvillage/presale-sdk

Presale Hooks and functions to interect with Presale contract.

Dependencies

"@react-dapp/utils": "^0.0.20",
"bignumber.js": "^9.0.1",
"ethereum-multicall": "^2.9.0",
"ethers": "^5.5.1",
"react": "^17.0.2",

Presale Hooks

useBuyPack

  • buy

this hook takes packId as numbeer

  • Return values

    this hook returns createState enum

    Enum STATE {
       IDLE = 0,
       BUSY = 1,
       FAILED = 2,
       SUCCEED = 3
    }

    useGetPackInfo

  • getPackInfo

this hook takes packId as numbeer

  • Return values

    this hook returns Packs interface and getState enum

    Packs {
       nft:string
       tokenIds:number[]
       nftType: TokenStandard
       paymentToken:string
       price:string,
       displayPrice:string
       enabled:boolean
    }

TokenStandard { ERC721, ERC1155 }

## _useGetAllPacks_

- getAllPacks

- Return values

this hook returns array of Packs interface and getState enum

[ Packs { nft:string tokenIds:number[] nftType: TokenStandard paymentToken:string price:string, displayPrice:string enabled:boolean } ]

0.1.15

2 years ago

0.1.16

2 years ago

0.1.17

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.14

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago