Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Commit

Permalink
chore: indices example (#600)
Browse files Browse the repository at this point in the history
  • Loading branch information
harrysolovay authored Feb 20, 2023
1 parent 42963a7 commit c8a40ed
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/indices.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { alice, ValueRune } from "capi"
import { Indices } from "polkadot_dev/mod.ts"

const index = 254

const claim = Indices
.claim({ index })
.signed({ sender: alice })
.sent()
.logStatus()
.finalized()

await claim
.into(ValueRune)
.chain(() => Indices.Accounts.entry([index]).access(0))
.log(`Index ${index} mapped to`)
.run()

0 comments on commit c8a40ed

Please sign in to comment.