Before a user can send a transaction to pre-sign an order, they need to have tokens and appropriate approvals. This is explained in more detail in Preparing for transactions.
Before starting this tutorial, make sure you've installed Third party helpers.
Preparing fees
To create an ERC721 order that will be integrated into our system, it's important that the order matches the fees that were defined by the collection's owner. To get the collection fees settings please check Get collection data.
First, we will define two helper functions to help us with arithmetics. Since Bignumbers are integers, we need to make sure we don't lose precision when computing percentages.