Third party helpers
Last updated
Last updated
It is easier, but not mandatory, to use third-party libraries to simplify calling smart contracts.
In our examples, we will use to handle user wallets and Bignumber arithmetics.
You can install ethers with yarn:
yarn add ethers@5
or npm:
npm install ethers@5
To help interact with the 0x smart contract, we advise using the . It will facilitate calling the proper smart contract functions with the proper arguments.
You can install the SDK with yarn:
yarn add @traderxyz/nft-swap-sdk
or npm:
npm install @traderxyz/nft-swap-sdk
In the following example, we will use a quick and dirty way to initialize the ethers wallet.
You will need to use your preferred authentication method to initialize an ethers signer. Our account abstraction SDK is available if you want to provide efficient biometric authentication.