This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.2' | |
services: | |
explorer-api: | |
build: explorer-api/. | |
image: polkascan/pre-explorer-api:latest | |
hostname: explorer-api | |
volumes: | |
- './explorer-api:/usr/src/app' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Membership | |
Revision ID: 4974d874ba73 | |
Revises: eab2bca0e472 | |
Create Date: 2019-08-19 18:25:37.506739 | |
""" | |
from alembic import op | |
import sqlalchemy as sa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BUILD AND RUN POLKASCAN | |
>> git clone https://github.com/polkascan/polkascan-pre.git | |
>> cd polkascan-pre | |
>> git submodule update --init —-recursive | |
>> download docker-compose.workshop.yml @ | |
https://gist.github.com/arjanz | |
>> docker-compose -p dev -f docker-compose.workshop.yml up -d mysql | |
>> docker-compose -p dev -f docker-compose.workshop.yml up --build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install package with: pip install git+https://github.com/polkascan/py-substrate-interface.git@master#egg=substrateinterface | |
from scalecodec.base import RuntimeConfiguration | |
from scalecodec.type_registry import load_type_registry_preset | |
from substrateinterface import SubstrateInterface | |
from substrateinterface.utils.ss58 import ss58_encode | |
RuntimeConfiguration().update_type_registry(load_type_registry_preset("default")) | |
RuntimeConfiguration().update_type_registry(load_type_registry_preset("kusama")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"types": { | |
"CallOf": "Call", | |
"DispatchTime": { | |
"type": "enum", | |
"type_mapping": [ | |
[ | |
"At", | |
"BlockNumber" | |
], |