You can fetch the Meridian code directly from Ethereum using web3
and a provider of your choice (here I am using Infura, but you might rather use Alchemy or your own local node).
- First, copy and paste these files into a new directory.
- Run
npm install web3 dotenv
with a recent version of Node/npm - Create a new
.env
file withINFURA_API_KEY="YOUR_API_KEY"
in it - Run
node fetch.js
to grab the code, this will savemeridian.js
- Now you can open
index.html
and change thetokenData
as desired to another hash
A more advanced version of this script would also use the tokenIdToHash
method to query the hash of an input mint #801
and then serve a index.html
with the correct tokenData
.