This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52b2fd8
commit 42e260c
Showing
16 changed files
with
110 additions
and
237 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,3 +83,5 @@ for (const [file, deps] of entries.slice(1)) { | |
done.add(d) | ||
} | ||
} | ||
|
||
console.log("Checked successfully") |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import { consensus } from "capi/patterns" | ||
import { client } from "polkadot/mod.ts" | ||
|
||
const result = await consensus.babeBlockAuthor(client).run() | ||
const result = await consensus | ||
.babeBlockAuthor(client, client.latestBlock.hash) | ||
.run() | ||
|
||
console.log(result) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import { client } from "polkadot/mod.ts" | ||
|
||
const result = await client | ||
.block() | ||
.events() | ||
.run() | ||
const result = await client.latestBlock.events().run() | ||
|
||
console.log(result) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import { client } from "polkadot/mod.ts" | ||
|
||
const result = await client | ||
.block() | ||
.extrinsics() | ||
.run() | ||
const result = await client.latestBlock.extrinsics().run() | ||
|
||
console.log(result) |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,21 @@ | ||
import { Rune, ValueRune } from "capi" | ||
import { Rune } from "capi" | ||
import { client, Timestamp } from "polkadot/mod.ts" | ||
|
||
const { blockHash } = client | ||
|
||
const block = client.block(blockHash) | ||
const block = client.latestBlock | ||
const extrinsics = block.extrinsics() | ||
const events = block.events() | ||
const now = Timestamp.Now.entry([], blockHash) | ||
const now = Timestamp.Now.entry([], block.hash) | ||
|
||
const root = Rune.rec({ | ||
hash: block.hash, | ||
block, | ||
extrinsics, | ||
events, | ||
now, | ||
}) | ||
|
||
await Rune | ||
.rec({ | ||
blockHash, | ||
block, | ||
extrinsics, | ||
events, | ||
now, | ||
}) | ||
.into(ValueRune) | ||
.reduce(0, (i, values) => { | ||
console.log(i, values) | ||
return i + 1 | ||
}) | ||
.filter((i) => i === 3) | ||
.run() | ||
let i = 0 | ||
for await (const values of root.watch()) { | ||
console.log(values) | ||
if (++i === 3) break | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.