Using lightsteem to interact with the HF20 Testnet

in #lightsteem6 years ago (edited)

Steemit team announced the HF20 testnet. If you're a lightsteem user and want to interact with the HF20 testnet:

  • Upgrade to the latest version:
$ (sudo) pip install lightsteem --upgrade

  • Start the Client with a custom chain parameter:
from lightsteem.client import Client

c = Client(
    nodes=["https://testnet.steemitdev.com"],
    chain=dict(
        chain_id="46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32",
        prefix="TST",
    ),
)

You're all set.

Note: chain_id is subject to change with next iterations. You may consider injecting it dynamically via get_config (rpc call) and set it to the Client instance to keep it fresh always. (as suggested on the announcement post.)

Sort:  

I have an easier way to interact with the testnet:

from lightsteem.client import Client
c = Client(nodes=["https://testnet.steemitdev.com"])
print(c.get_config()["STEEM_CHAIN_ID"])

Why do you set chain?

Transaction signing wont work if you dont set chain id.

Hi @emrebeyler! We are @steem-ua, a new Steem dApp, computing UserAuthority for all accounts on Steem. Starting from the witnesses, UA propagates from user to user based on its followers until equilibrium is reached. We are currently in test mode upvoting quality contributions with a high UA value (UA_author + UA_post)!

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 62102.06
ETH 2415.08
USDT 1.00
SBD 2.49