The Cardstack Ethereum Plugin: Technical Overview

Exposing your smart contract as a RESTful service

Hassan Abdel-Rahman
Aug 23, 2018 · 14 min read

How Does a Cardstack Plugin Work?

The Ethereum Plugin

Schema

Reference 1: Ethereum data-source configuration test-setup. GitHub.
Reference 2: Smart contract schema assertions. GitHub.
Reference 3: Ledger entry schema assertions. GitHub.
Reference 4: Ledger entry schema assertions for functions with multiple return values. GitHub

Indexing

Reference 5: “sample-token” data-source configuration from unit tests. GitHub
Reference 6: Ethereum event triggers indexing. GitHub
Reference 7: Ethereum event triggers underlying contract indexing. GitHub

Smart Contract API

JSON:API

Reference 8: CARD token API response of https://hub.cardstack.com/api/card-tokens/0xB07ec2c28834B889b1CE527Ca0F19364cD38935c
Reference 9: CARD token holder API response of https://hub.cardstack.com/api/card-token-balance-ofs/0x274f3c32c90517975e29dfc209a23f315c1e5fc7
Reference 10: Querying the Cardstack Hub API https://hub.cardstack.com/api/card-token-vesting-schedules?filter[vesting-schedule-duration-sec]=31622400

Putting It All Together


Read More

Get Involved

Important Reminders

Cardstack

The experience layer of the decentralized Internet. https://cardstack.com

Thanks to Deleted Account.

Hassan Abdel-Rahman

Written by

Developer at Cardstack

Cardstack

Cardstack

The experience layer of the decentralized Internet. https://cardstack.com