Fun script to use with Google Sheet to query funny and interesting things on Alephium crypto project. This repository contains basic Google AppScripts that can be used in your GoogleSheet. All these scripts are related to Alephium project. Below you can find basic explaination about how to use these scripts
To use these functions, some variables are set.
- BASE_URL : fixed to "https://mainnet-backend.alephium.org/addresses/"
- ALPH_UNIT : fixed to 10^18
- UNIT_BASE : fixed to 10 (base 10)
- TOKEN_HARDCAP : fixed to 1000000000 (one billion)
- TOKEN_SOFTCAP : fixed to 140000000 (140 million or 14% of hardcap)
- wallet_address : add your Alephium's wallet address here
If you don't want details, jump to How to use this ?
This core function make HTTP Get request to mainet backend of Alephium against a specific address to retrieve all information about this wallet address
This function first call ALPH_makeHttpRequest() and return the total number of ALPH tokens for the specified wallet.
This function first call ALPH_makeHttpRequest() and return the total number of transaction for the specified wallet.
This function will get current token price on CMC (CoinMarketCap.com). You have to specify you CMC API key first in the code.
Note : value of 0.168 is hardcoded and returned while Alephium token price is not available on CMC. Once the price will be available on CMC, this script automatically returns the CMC's price.
Return the number of ALPH already circulating.
Return the current softcap. Even if this value is hardcoded into TOKEN_SOFTCAP, it could change in the futur.
Return the percentage of circulating ALPH based on the current SOFT CAP.
Return the percentage of circulating ALPH based on the current HARD CAP.
Go to https://script.google.com/ and create a new project named Alephium. This will automatically create a file named code.gs. Open it and past the content of this file. Once done, you can simply save your project and run the code to be sure that all data are retrieved correctly If all is working as expected, you can call these functions into GoogleSheet :-)
Don't forget to update the variable wallet_address and then run the desired function.
Look examples above.