Interacting with substrate chains using JS and. python.pptx

dot55audits 32 views 10 slides Jun 11, 2024
Slide 1
Slide 1 of 10
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10

About This Presentation

Interacting with substrate chains using JS and. python.pptx


Slide Content

3 Polkadot

(yp 2 or
Interacting with =
“Substrate chains. :
using JS and Python =

a

bl Y
J CA EOE
Oe ig j à web3
Bangkok Th ailand ¿March 13/2024 3 foundation
EN 4 al

A
4

subO

Speaker

Michalis Fragkiadakis

Support & Anti-Scam Lead

Web3 Foundation

Github: @https://github.com/michalisFr
Twitter: @michalis_fr

Matrix: @michalis:web3.foundation

web3
foundation

5 Polkadot

Libraries

There are libraries to interact with Substrate
chains in several languages

e Python

e JavaScript
e Go

e Java

e iOS/Swift

e Kotlin

e Dart/Flutter

foundation

=
a."
an |
ja.
3
— a

}

= »

©
X

=

~

VALLEE AIRE E
pe! ; “à
ds
#
Q
5
Qe
da
0 >
cell
O's 23
sin |
ces
E
= 2
Sa S
Y eS
2 4% ao

O
/ AN du

demas

subo

Polkadot

substrate-interface

PY-

Docs

CT

ek
=

ay. 17

€? Polkadot

asset_sender

Ascript to mass send assets on
Kusama or Polkadot Asset Hub

developed by Bill Laboon

eee

7 e
er > al
7 A A:
FBI an
LZ E
Pr - 1
À gm u "je Y Cs
oes
„er Files no
ti
je =
oe =
= AE

2

N

Polkadot Lo
ho

=

as á

= á

= == JavaScript

polkadot-is

developed and maintained by Parity

|

me

i
I.
ti

a

Qi)

À TA a / vena =
EL SEN 3 mim

subo

Polkadot

e
Qe

Polkadot-JS API

Docs

foundation

© Polkadot

bag-sorting

Ascript to sort the accounts in the last bag
for participation in the staking election

developed by Michalis Fragkiadakis

5 Polkadot

Some context

22,500 accounts can participate in NPoS election
Accounts are put in bags based on their stake
Bags are sorted based on stake but accounts in them are not
Accounts are iterated from top bag to lowest until 22,500th
The lowest stake within these 22,500 determines
*minimum_active_stake”
e Accounts below the 22,500th may have a higher stake than
*minimum_active_stake' but won't get in the active set
e Accounts with higher stake can position themselves in front of :
ones with lower with *put_in_front_of” ys
e More info in the wiki and the support page F

T
However, this was not obvious to everyday users and cau:
frustration
Tags