New to Busy?

Steem Engine Tender: A Sidechain Explorer - 0.0.1

17 comments

inertia
71
last monthSteemit3 min read

Here it is: https://steem-engine.rocks

On the surface, it's just another blockchain explorer (actually sidechain explorer). But one of the design goals was to avoid the use of api.steem-engine.com for most things other than perhaps current block height lookup.

It's actually been very educational. As result of this design goal, I've had to do a bit of reverse-engineering. For example, did you know the genesis block for the sidechain is block zero? And did you know that block zero has changed since launch? Which means, I guess, all of the hash fields of every block must have changed since launch. I never knew that.

Anyway, stuff like that requires a bit of custom code to handle, which makes my interpretation of the sidechain wrong, occasionally. That's ok, though. That's the design goal. To codify the logic and explore these exceptions.

Like I said, to most people, Steem Engine Tender will just be a chain explorer web site. But to some application developers, it might come in handy because it allows you to do lookups that the standard APIs don't allow. Like getting account history.

I also have it running in Docker, so you get the best of both worlds. You get this app on port 3000 and a regular steem-engine node running on port 5000.

Repository
https://github.com/inertia186/tender

From the README.md:


Tender

Steem Engine sidechain interpreter.

What It Is

For the most part, Tender is simply a Steem Engine block explorer. But it's a little more than just that. It's also a rest endpoint for querying account history. For example, if you're running an exchange, you can use your own tender node to programmatically query deposits to your exchange.

Running your own node means you won't have to rely on api.steem-engine.com to query current sidechain activity.

To set it up:

docker run -it --name tender -p 5000:5000 -p 3000:3000 inertia/tender:latest

The above docker command will initialize an internal Steem Engine node on port 5000, replay the latest block log, and start the explorer on port 3000.

Once set up, you can browse the sidechain here:

http://localhost:3000/

For exchanges, perhaps the most useful URL is, for example the last 100 transfers to the account named alice:

http://localhost:3000/transfers/alice.json

Or, get the last 1000 to alice:

http://localhost:3000/transfers/alice/1000.json

This is how you query the second 1000 transfers of ENG tokens to alice:

http://localhost:3000/transfers/alice/ENG/1000/2.json

More Details

If you already have your own steemd node running block_api, you can point to that node for new blocks.

docker run --env STEEMD_NODE_URL=http://your-steemd-node-here:8090 \
  -it --name tender \
  -p 5000:5000 \
  -p 3000:3000 \
  inertia/tender:latest

Also see: https://hub.docker.com/r/inertia/tender/




See some of my previous Ruby How To posts in: #radiator #ruby

Get in touch!

If you're using Tender, I'd love to hear from you. Drop me a line and tell me what you think! I'm @inertia on STEEM.

License

I don't believe in intellectual "property". If you do, consider Radiator as licensed under a Creative Commons CC0 License.


Github
https://github.com/inertia186

Comments

Sort byBest