How to Embed TokensFarm

This is a library that can be embedded on any URL to allow users to participate in a farm

How to Add

Include the following in your website's HTML code:

<script src="https://tf-embedded.pages.dev/dist/embedded/TFEmbedded.js" type="text/javascript"></script>
// Some code

once script will be loaded window.TF object will be exposed. before use you need init with a valid params

  TF.init({
    id: 'embedded', // id of html element where you want to inject 
    farmType: 'lp', // farm type (you can find in tokensfarm.com)
    nonce: 15, // farm nonce (you can find in tokensfarm.com)
    token: 'XCAD', // farm tokenSymbol (you can find in tokensfarm.com)
    darkMode: true // theme light/dark
  });

after farm object will be loaded you can open/close modal

  TF.show();
  TF.hide();
  TF.show()

Last updated