Skip to content

Commit

Permalink
Work on some mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbayly committed Feb 19, 2024
1 parent 3238094 commit 97daa22
Show file tree
Hide file tree
Showing 138 changed files with 4,473 additions and 2,403 deletions.
2 changes: 1 addition & 1 deletion archived/bg/build/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Манифестът може да бъде във формат YAML или JSON. В този документ ще използваме YAML във всички примери. По-долу е даден стандартен пример за основен `project.yaml`.

::: code-tabs @tab v0.2.0 ` yml specVersion: 0.2.0 name: example-project # version: 1.0.0 # Версия на проекта description: '' # Посочете името на проекта repository: 'https://github.com/subquery/subql-starter' # Git адрес на хранилището на вашия проект schema: file: ./schema.graphql # Местоположението на вашия файл със схема на GraphQL network: genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3' # Генезис хеш на мрежата endpoint: 'wss://polkadot.api.onfinality.io/public-ws' # По избор предоставете HTTP крайната точка на речник с пълна верига, за да ускорите обработката dictionary: 'https://api.subquery.network/sq/subquery/dictionary-polkadot' dataSources: - kind: substrate/Runtime startBlock: 1 # Това променя вашия начален блок за индексиране, задайте го по-високо, за да пропуснете първоначалните блокове с по-малко данни mapping: file: "./dist/index.js" handlers: - handler: handleBlock kind: substrate/BlockHandler - handler: handleEvent kind: substrate/EventHandler filter: #Filter is optional module: balances method: Deposit - handler: handleCall kind: substrate/CallHandler ```` @tab v0.0.1 ` yml specVersion: "0.0.1" description: '' # Описание на вашия проект repository: 'https://github.com/subquery/subql-starter' # Git адрес на хранилището на вашия проект schema: ./schema.graphql # Местоположението на вашия файл със схема на GraphQL network: endpoint: 'wss://polkadot.api.onfinality.io/public-ws' # По избор предоставете HTTP крайната точка на речник с пълна верига, за да ускорите обработката dictionary: 'https://api.subquery.network/sq/subquery/dictionary-polkadot' dataSources: - name: main kind: substrate/Runtime startBlock: 1 # Това променя вашия начален блок за индексиране, задайте го по-високо, за да пропуснете първоначалните блокове с по-малко данни mapping: handlers: - handler: handleBlock kind: substrate/BlockHandler - handler: handleEvent kind: substrate/EventHandler filter: #Филтърът е по избор, но се препоръчва за ускоряване на обработката на събития module: balances method: Deposit - handler: handleCall kind: substrate/CallHandler ```` :::
::: code-tabs @tab v0.2.0 `yml specVersion: 0.2.0 name: example-project # version: 1.0.0 # Версия на проекта description: '' # Посочете името на проекта repository: 'https://github.com/subquery/subql-starter' # Git адрес на хранилището на вашия проект schema: file: ./schema.graphql # Местоположението на вашия файл със схема на GraphQL network: genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3' # Генезис хеш на мрежата endpoint: 'wss://polkadot.api.onfinality.io/public-ws' # По избор предоставете HTTP крайната точка на речник с пълна верига, за да ускорите обработката dictionary: 'https://api.subquery.network/sq/subquery/dictionary-polkadot' dataSources: - kind: substrate/Runtime startBlock: 1 # Това променя вашия начален блок за индексиране, задайте го по-високо, за да пропуснете първоначалните блокове с по-малко данни mapping: file: "./dist/index.js" handlers: - handler: handleBlock kind: substrate/BlockHandler - handler: handleEvent kind: substrate/EventHandler filter: #Filter is optional module: balances method: Deposit - handler: handleCall kind: substrate/CallHandler ```` @tab v0.0.1` yml specVersion: "0.0.1" description: '' # Описание на вашия проект repository: 'https://github.com/subquery/subql-starter' # Git адрес на хранилището на вашия проект schema: ./schema.graphql # Местоположението на вашия файл със схема на GraphQL network: endpoint: 'wss://polkadot.api.onfinality.io/public-ws' # По избор предоставете HTTP крайната точка на речник с пълна верига, за да ускорите обработката dictionary: 'https://api.subquery.network/sq/subquery/dictionary-polkadot' dataSources: - name: main kind: substrate/Runtime startBlock: 1 # Това променя вашия начален блок за индексиране, задайте го по-високо, за да пропуснете първоначалните блокове с по-малко данни mapping: handlers: - handler: handleBlock kind: substrate/BlockHandler - handler: handleEvent kind: substrate/EventHandler filter: #Филтърът е по избор, но се препоръчва за ускоряване на обработката на събития module: balances method: Deposit - handler: handleCall kind: substrate/CallHandler ```` :::

## Мигриране от v0.0.1 към v0.2.0 <Badge text="upgrade" type="warning"/>

Expand Down
4 changes: 2 additions & 2 deletions archived/bg/build/mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export async function handleEvent(event: SubstrateEvent): Promise<void> {
```ts
export async function handleCall(extrinsic: SubstrateExtrinsic): Promise<void> {
const record = new starterEntity(
extrinsic.block.block.header.hash.toString()
extrinsic.block.block.header.hash.toString(),
);
record.field4 = extrinsic.block.timestamp;
await record.save();
Expand Down Expand Up @@ -285,7 +285,7 @@ export async function kittyApiHandler(): Promise<void> {
//Custom rpc, set undefined to blockhash
const kittyPrice = await api.rpc.kitties.getKittyPrice(
undefined,
nextKittyId
nextKittyId,
);
}
```
Expand Down
2 changes: 1 addition & 1 deletion archived/bg/quickstart/quickstart-cosmos.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ import { Vote } from "../types";
import { CosmosMessage } from "@subql/types-cosmos";

export async function handleTerraDeveloperFund(
message: CosmosMessage
message: CosmosMessage,
): Promise<void> {
// logger.info(JSON.stringify(message));
// Example vote https://www.mintscan.io/juno/txs/EAA2CC113B3EC79AE5C280C04BE851B82414B108273F0D6464A379D7917600A4
Expand Down
2 changes: 1 addition & 1 deletion archived/bg/quickstart/quickstart-polkadot.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export async function handleEvent(event: SubstrateEvent): Promise<void> {

// Create the new transfer entity
const transfer = new Transfer(
`${event.block.block.header.number.toNumber()}-${event.idx}`
`${event.block.block.header.number.toNumber()}-${event.idx}`,
);
transfer.blockNumber = event.block.block.header.number.toBigInt();
transfer.from = from.toString();
Expand Down
4 changes: 2 additions & 2 deletions archived/bg/quickstart/quickstart-terra.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@ import { Transfer } from "../types";
import { MsgExecuteContract } from "@terra-money/terra.js";

export async function handleEvent(
event: TerraEvent<MsgExecuteContract>
event: TerraEvent<MsgExecuteContract>,
): Promise<void> {
// Print debugging data from the event
// logger.info(JSON.stringify(event));

// Create the new transfer entity with a unique ID
const transfer = new Transfer(
`${event.tx.tx.txhash}-${event.msg.idx}-${event.idx}`
`${event.tx.tx.txhash}-${event.msg.idx}-${event.idx}`,
);
transfer.blockHeight = BigInt(event.block.block.block.header.height);
transfer.txHash = event.tx.tx.txhash;
Expand Down
2 changes: 1 addition & 1 deletion archived/de/build/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Die Manifestdatei `project.yaml` kann als Einstiegspunkt Ihres Projekts angesehe

Das Manifest kann entweder im YAML- oder im JSON-Format vorliegen. In diesem Dokument verwenden wir YAML in allen Beispielen. Unten sehen Sie ein Standardbeispiel einer einfachen `project.yaml`.

::: code-tabs @tab v0.2.0 ` yml specVersion: 0.2.0 name: example-project # Geben Sie den Projektnamen an Version: 1.0.0 # Projektversion description: '' # Beschreibung Ihres Projekts repository: 'https://github.com/subquery/subql-starter' # Git-Repository-Adresse Ihres Projekts Schema: file: ./schema.graphql # Der Speicherort Ihrer GraphQL-Schemadatei Netzwerk: genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3' # Genesis-Hash des Netzwerks endpoint: 'wss://polkadot.api.onfinality.io/public-ws' # Geben Sie optional den HTTP-Endpunkt eines vollständigen Kettenwörterbuchs an, um die Verarbeitung zu beschleunigen dictionary: 'https://api.subquery.network/sq/subquery/dictionary-polkadot' dataSources: - kind: substrate/Runtime startBlock: 1 # Dies ändert Ihren Startblock für die Indizierung, stellen Sie diesen höher ein, um Anfangsblöcke mit weniger Daten zu überspringen mapping: file: "./dist/index.js" handlers: - handler: handleBlock kind: substrate/BlockHandler - handler: handleEvent kind: substrate/EventHandler filter: #Filter is optional module: balances method: Deposit - handler: handleCall kind: substrate/CallHandler ```` @tab v0.0.1 ` yml specVersion: "0.0.1" description: '' # Beschreibung Ihres Projekts repository: 'https://github.com/subquery/subql-starter' # Git-Repository-Adresse Ihres Projekts schema: ./schema.graphql # Der Speicherort Ihrer GraphQL-Schemadatei Netzwerk: endpoint: 'wss://polkadot.api.onfinality.io/public-ws' # Geben Sie optional den HTTP-Endpunkt eines vollständigen Kettenwörterbuchs an, um die Verarbeitung zu beschleunigen dictionary: 'https://api.subquery.network/sq/subquery/dictionary-polkadot' dataSources: - name: main kind: substrate/Runtime startBlock: 1 # Dies ändert Ihren Startblock für die Indizierung, stellen Sie diesen höher ein, um Anfangsblöcke mit weniger Daten zu überspringen mapping: handlers: - handler: handleBlock kind: substrate/BlockHandler - handler: handleEvent kind: substrate/EventHandler filter: #Filter ist optional, wird aber empfohlen, um die Ereignisverarbeitung zu beschleunigen module: balances method: Deposit - handler: handleCall kind: substrate/CallHandler ```` :::
::: code-tabs @tab v0.2.0 `yml specVersion: 0.2.0 name: example-project # Geben Sie den Projektnamen an Version: 1.0.0 # Projektversion description: '' # Beschreibung Ihres Projekts repository: 'https://github.com/subquery/subql-starter' # Git-Repository-Adresse Ihres Projekts Schema: file: ./schema.graphql # Der Speicherort Ihrer GraphQL-Schemadatei Netzwerk: genesisHash: '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3' # Genesis-Hash des Netzwerks endpoint: 'wss://polkadot.api.onfinality.io/public-ws' # Geben Sie optional den HTTP-Endpunkt eines vollständigen Kettenwörterbuchs an, um die Verarbeitung zu beschleunigen dictionary: 'https://api.subquery.network/sq/subquery/dictionary-polkadot' dataSources: - kind: substrate/Runtime startBlock: 1 # Dies ändert Ihren Startblock für die Indizierung, stellen Sie diesen höher ein, um Anfangsblöcke mit weniger Daten zu überspringen mapping: file: "./dist/index.js" handlers: - handler: handleBlock kind: substrate/BlockHandler - handler: handleEvent kind: substrate/EventHandler filter: #Filter is optional module: balances method: Deposit - handler: handleCall kind: substrate/CallHandler ```` @tab v0.0.1` yml specVersion: "0.0.1" description: '' # Beschreibung Ihres Projekts repository: 'https://github.com/subquery/subql-starter' # Git-Repository-Adresse Ihres Projekts schema: ./schema.graphql # Der Speicherort Ihrer GraphQL-Schemadatei Netzwerk: endpoint: 'wss://polkadot.api.onfinality.io/public-ws' # Geben Sie optional den HTTP-Endpunkt eines vollständigen Kettenwörterbuchs an, um die Verarbeitung zu beschleunigen dictionary: 'https://api.subquery.network/sq/subquery/dictionary-polkadot' dataSources: - name: main kind: substrate/Runtime startBlock: 1 # Dies ändert Ihren Startblock für die Indizierung, stellen Sie diesen höher ein, um Anfangsblöcke mit weniger Daten zu überspringen mapping: handlers: - handler: handleBlock kind: substrate/BlockHandler - handler: handleEvent kind: substrate/EventHandler filter: #Filter ist optional, wird aber empfohlen, um die Ereignisverarbeitung zu beschleunigen module: balances method: Deposit - handler: handleCall kind: substrate/CallHandler ```` :::

## Migration von v0.0.1 auf v0.2.0 <Badge text="upgrade" type="warning"/>

Expand Down
2 changes: 1 addition & 1 deletion archived/de/build/mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Call-Handler werden verwendet, wenn Sie Informationen zu bestimmten externen Sub
```ts
export async function handleCall(extrinsic: SubstrateExtrinsic): Promise<void> {
const record = new starterEntity(
extrinsic.block.block.header.hash.toString()
extrinsic.block.block.header.hash.toString(),
);
record.field4 = extrinsic.block.timestamp;
await record.save();
Expand Down
2 changes: 1 addition & 1 deletion archived/de/quickstart/quickstart-cosmos.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ import { Vote } from "../types";
import { CosmosMessage } from "@subql/types-cosmos";

export async function handleTerraDeveloperFund(
message: CosmosMessage
message: CosmosMessage,
): Promise<void> {
// logger.info(JSON.stringify(message));
// Example vote https://www.mintscan.io/juno/txs/EAA2CC113B3EC79AE5C280C04BE851B82414B108273F0D6464A379D7917600A4
Expand Down
2 changes: 1 addition & 1 deletion archived/de/quickstart/quickstart-polkadot.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export async function handleEvent(event: SubstrateEvent): Promise<void> {

// Create the new transfer entity
const transfer = new Transfer(
`${event.block.block.header.number.toNumber()}-${event.idx}`
`${event.block.block.header.number.toNumber()}-${event.idx}`,
);
transfer.blockNumber = event.block.block.header.number.toBigInt();
transfer.from = from.toString();
Expand Down
4 changes: 2 additions & 2 deletions archived/de/quickstart/quickstart-terra.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@ import { Transfer } from "../types";
import { MsgExecuteContract } from "@terra-money/terra.js";

export async function handleEvent(
event: TerraEvent<MsgExecuteContract>
event: TerraEvent<MsgExecuteContract>,
): Promise<void> {
// Debugging-Daten aus dem Ereignis drucken
// logger.info(JSON.stringify(event));

// Erstellen Sie die neue Übertragungsentität mit einer eindeutigen ID
const transfer = new Transfer(
`${event.tx.tx.txhash}-${event.msg.idx}-${event.idx}`
`${event.tx.tx.txhash}-${event.msg.idx}-${event.idx}`,
);
transfer.blockHeight = BigInt(event.block.block.block.header.height);
transfer.txHash = event.tx.tx.txhash;
Expand Down
4 changes: 2 additions & 2 deletions archived/es/build/mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Los manejadores de llamadas se utilizan cuando se desea capturar información so
```ts
export async function handleCall(extrinsic: SubstrateExtrinsic): Promise<void> {
const record = new starterEntity(
extrinsic.block.block.header.hash.toString()
extrinsic.block.block.header.hash.toString(),
);
record.field4 = extrinsic.block.timestamp;
await record.save();
Expand Down Expand Up @@ -281,7 +281,7 @@ export async function kittyApiHandler(): Promise<void> {
//Custom rpc, establecer indefinido a blockhash
const kittyPrice = await api.rpc.kitties.getKittyPrice(
undefined,
nextKittyId
nextKittyId,
);
}
```
Expand Down
2 changes: 1 addition & 1 deletion archived/es/quickstart/quickstart-cosmos.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ import { Vote } from "../types";
import { CosmosMessage } from "@subql/types-cosmos";

export async function handleTerraDeveloperFund(
message: CosmosMessage
message: CosmosMessage,
): Promise<void> {
// logger.info(JSON.stringify(message));
// Example vote https://www.mintscan.io/juno/txs/EAA2CC113B3EC79AE5C280C04BE851B82414B108273F0D6464A379D7917600A4
Expand Down
Loading

0 comments on commit 97daa22

Please sign in to comment.