Skip to content

Simple WP plugin for fetching basic token information from bscscan API

Notifications You must be signed in to change notification settings

sjmc11/bscscan-wp-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Bscscan API Wordpress Plugin

Simple WP plugin to fetch token data from the bscscan API

Set-up

Activate the plugin and visit the BSC token stats admin page.

  • Enter your bscscan API key
  • Provide the token contract address
  • Provide the token burn address
    • Default: "0x000000000000000000000000000000000000dead"

Prerequisites

This plugin requires ACF PRO in order to work.

ACF is used to bootstrap the admin page and meta field data.

How it works

The plugin will automatically update the following stats every hour.

  • 💰 Total supply
  • 🔥 Total burned
  • 🪙 Circulating supply

Return values in your template using ACF get_field() syntax.

  • get_field('total_supply', 'options')
  • get_field('total_burned', 'options')
  • get_field('circ_supply', 'options')

To manually fetch token stats, disable & enable the plugin providing API key, contract & burn address have been provided.

Customise the schedule

in bsc-api-fetch.php on line 44 you can modify the scheduled event. See wordpress docs on wp_schedule_event.

// Setup schedule
if (! wp_next_scheduled ( 'bsc_fetch_event' )) {
wp_schedule_event(time(), 'hourly', 'bsc_fetch_event');
}

Contact

Jack Callow - @jvckcallow - Linkedin - sjmc11@gmail.com

Project Link: https://github.com/sjmc11/firebase-auth-go-kit

(back to top)

About

Simple WP plugin for fetching basic token information from bscscan API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages