Revenue Sharing

Revenue sharing is performed within Stash core class by calling performPayout function.
The parameters you need to pass to this function are:

  • tokenId: Token ID of the NFT
  • standard: NFT standard
  • amount: Total earning amount
  • paymentToken: Address of the ERC20 token which the payment will be made with. This is usually your game token's address

By using these parameters, performPayout function can be called as described down below:

stash.performPayout(
      tokenId,
      standard,
      amount,
      paymentToken
    )

This function calls the respective functions in the NFT contracts to retrieve the shares of each party and then to initiate the payout transactions.


Next up