Skip to content

Commit

Permalink
feat: update doc horoscope evm (#118)
Browse files Browse the repository at this point in the history
* feat: remove doc horoscope-v1

* feat: update docusaurus openapi, update doc horoscope evm

* feat: add sample query graphql evm

* feat: add wallet integration for evm

* feat: update broken link; use yarn instead of npm; use node:16-alpine
  • Loading branch information
fibonacci998 authored May 28, 2024
1 parent f6db874 commit 287bb55
Show file tree
Hide file tree
Showing 100 changed files with 18,510 additions and 36,369 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM node:16.14 as build-stage
FROM node:16-alpine as build-stage
RUN mkdir -p /data/app
WORKDIR /data/app
COPY . /data/app
RUN npm install && npm cache clean --force
RUN npm run build
RUN yarn && yarn cache clean
RUN yarn build
FROM nginx:1.15
COPY --from=build-stage /data/app/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build-stage /data/app/build /var/www/tmp
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To run the project locallt, please follow installation guide from [here](https:/
If you already setup things correctly, then just simply:

```bash
npm run start
yarn start
```
## Requirement

Expand Down
2 changes: 1 addition & 1 deletion docs/archived/3.rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Public Endpoints
---

Here we will only briefly mention how to use the AURA RPC on mainnet **Xstaxy** and testnets **Euphoria** and **Serenity**.
The full details of the available networks are available in the [Networks Information](networks-info) section.
The full details of the available networks are available in the [Networks Information](../developer/getting-started/networks-info/cosmos-info) section.

## Mainnet

Expand Down
2 changes: 1 addition & 1 deletion docs/developer/1.getting-started/1.env-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ You can specify the RPC Port and directory of block data amongst other configura

For development and test purposes, it's easier to use a public RPC node than to run your own. You can setup `aurad` to use a public node easily.

You can use the official Aura public nodes or any third-party nodes for this. You can view all of the available RPC endpoints as well as LCD or gRPC on the [Networks Information](./networks-info) section.
You can use the official Aura public nodes or any third-party nodes for this. You can view all of the available RPC endpoints as well as LCD or gRPC on the [Networks Information](./networks-info/cosmos-info) section.

Once you select your desired network and node, go into `~/.aura/config/client.toml` and set the node to your selected endpoint, and chain-id for the network.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Genesis files and configurations are located in [Testnets repository](https://gi
:::

:::caution Not for production environments
Public endpoints are only meant to be used for development purposes and should not be used in production environments. Instead, [set up your own endpoint](../../validator/running-a-fullnode).
Public endpoints are only meant to be used for development purposes and should not be used in production environments. Instead, [set up your own endpoint](../../../validator/running-a-fullnode).
:::

<Tabs style={{ width:"100%" }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You can use [chainlist.org](https://chainlist.org/?search=Aura&testnets=true) to
:::

:::caution Not for production environments
Public endpoints are only meant to be used for development purposes and should not be used in production environments. Instead, [set up your own endpoint](../../validator/running-a-fullnode).
Public endpoints are only meant to be used for development purposes and should not be used in production environments. Instead, [set up your own endpoint](../../../validator/running-a-fullnode).
:::

<Tabs style={{ width:"100%" }}>
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/1.getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Begin setting up everything you need before you can start building on Aura netwo
{
title: "Networks Information",
description: "Find the details for all available networks, including public endpoints and configurations.",
link:"networks-info",
link:"networks-info/cosmos-info",
},
]]
} />
2 changes: 1 addition & 1 deletion docs/developer/2.smart-contracts/2.deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The block explorers are available for all Aura networks. You can explore transac
* Euphoria: https://euphoria.aurascan.io
* Serenity: https://serenity.aurascan.io

And if you need the full reference, check out the [networks info](../getting-started/networks-info).
And if you need the full reference, check out the [networks info](../getting-started/networks-info/cosmos-info).

Once that is all done and you have your [wallet](../getting-started/wallet-creation#aura-cli) ready with some [test coins](../getting-started/env-setup#faucets) (*AURA* or *EAURA*), you can continue.

Expand Down
22 changes: 11 additions & 11 deletions docs/developer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,25 +75,25 @@ Otherwise, check out these topics and happy hacking!
1. [Getting Started](getting-started)
- [Preparing Development Wallet](getting-started/wallet-creation)
- [Environment Setup](getting-started/env-setup)
- [Networks Info](getting-started/networks-info)
- [Networks Info](getting-started/networks-info/cosmos-info)

3. [Smart Contracts](smart-contracts)
2. [Smart Contracts](smart-contracts)
- [Smart contract anatomy](smart-contracts/anatomy)
- [Deploy a contract](smart-contracts/deploy)
- [Interact with a contract](smart-contracts/interact)

3. [Tutorials](tutorials)
- [Simple template](tutorials/simple-template)
- [Counter](tutorials/counter)
- [From Solidity to CosmWasm](tutorials/solidity-to-cosmwasm)

4. [Tutorials](tutorials)
- [Simple template](smart-contracts/examples/simple-template)
- [Counter](smart-contracts/examples/counter)
- [From Solidity to CosmWasm](smart-contracts/solidity-to-cosmwasm)

4.1 [Fungible Tokens](tutorials/fungible-tokens)
3.1 [Fungible Tokens](tutorials/fungible-tokens)
- [Introduction to CW20 (Fungible Tokens)](tutorials/fungible-tokens/cw20-intro)
- [Create your own CW20 token on Aura Network](tutorials/fungible-tokens/create-your-own-cw20)
- [Create your own CW20 token on Aura Network](tutorials/fungible-tokens/create-your-cw20)
- [What will we build](tutorials/fungible-tokens/what-will-we-build)
- [What Are All These Files](tutorials/fungible-tokens/what-are-all-these-files)

4.2 [Non-Fungible Tokens](tutorials/non-fungible-tokens)
3.2 [Non-Fungible Tokens](tutorials/non-fungible-tokens)
- [Introduction to CW721 (NFTs)](tutorials/non-fungible-tokens/cw721-intro)
- [Overview the working](tutorials/non-fungible-tokens/what-will-we-build)
- [Create dApp repository](tutorials/non-fungible-tokens/begin)
Expand All @@ -116,7 +116,7 @@ Otherwise, check out these topics and happy hacking!
- [Commission](concepts/commission)
- [Staking](concepts/staking)
- [Slashing](concepts/slashing)
- [Governance](concepts/Governance)
- [Governance](concepts/gov)
- [Vesting](concepts/vesting)


Expand Down
21 changes: 21 additions & 0 deletions docs/horoscope-v2/horoscope-v-2-graphql.info.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
id: horoscope-v-2-graphql
title: "Horoscope v2 graphql"
description: ""
sidebar_label: Introduction
sidebar_position: 0
hide_title: true
custom_edit_url: null
---

import ApiLogo from "@theme/ApiLogo";
import SchemaTabs from "@theme/SchemaTabs";
import TabItem from "@theme/TabItem";
import Export from "@theme/ApiExplorer/Export";

<span className={"theme-doc-version-badge badge badge--secondary"}>Version: 1.0.0</span>

<h1 className={"openapi__heading"}>Horoscope v2 graphql</h1>



63 changes: 21 additions & 42 deletions docs/horoscope-v2/query-account.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,41 @@
id: query-account
title: "Query account"
description: "Query account"
sidebar_label: Query account
sidebar_label: "Query account"
hide_title: true
hide_table_of_contents: true
api: {"tags":["account"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"operationName":{"type":"string","example":"account","description":"query name"},"query":{"type":"string","example":"query account($limit: Int = 10, $address: String = null) { euphoria { account(limit: $limit, where: {address: {_eq: $address}}) { account_number address balances pubkey sequence spendable_balances type updated_at created_at } } }","description":"Graphql query"},"variables":{"type":"object","description":"Variable in query","example":{"limit":10,"address":null}}}},"examples":{"xstaxy":{"summary":"Query on Xstaxy chain","value":{"operationName":"account","query":"query account($limit: Int = 10, $address: String = null) { xstaxy { account(limit: $limit, where: {address: {_eq: $address}}) { account_number address balances pubkey sequence spendable_balances type updated_at created_at } } }","variables":{"limit":10,"address":null}}},"auratestnet":{"summary":"Query on Aura Testnet chain","value":{"operationName":"account","query":"query account($limit: Int = 10, $address: String = null) { auratestnet { account(limit: $limit, where: {address: {_eq: $address}}) { account_number address balances pubkey sequence spendable_balances type updated_at created_at } } }","variables":{"limit":10,"address":null}}},"serenity":{"summary":"Query on Serenity chain","value":{"operationName":"account","query":"query account($limit: Int = 10, $address: String = null) { serenity { account(limit: $limit, where: {address: {_eq: $address}}) { account_number address balances pubkey sequence spendable_balances type updated_at created_at } } }","variables":{"limit":10,"address":null}}},"ephoria":{"summary":"Query on Ephoria chain","value":{"operationName":"account","query":"query account($limit: Int = 10, $address: String = null) { ephoria { account(limit: $limit, where: {address: {_eq: $address}}) { account_number address balances pubkey sequence spendable_balances type updated_at created_at } } }","variables":{"limit":10,"address":null}}},"nois":{"summary":"Query on Nois chain","value":{"operationName":"account","query":"query account($limit: Int = 10, $address: String = null) { nois { account(limit: $limit, where: {address: {_eq: $address}}) { account_number address balances pubkey sequence spendable_balances type updated_at created_at } } }","variables":{"limit":10,"address":null}}},"sei":{"summary":"Query on Sei chain","value":{"operationName":"account","query":"query account($limit: Int = 10, $address: String = null) { sei { account(limit: $limit, where: {address: {_eq: $address}}) { account_number address balances pubkey sequence spendable_balances type updated_at created_at } } }","variables":{"limit":10,"address":null}}}}}}},"responses":{"200":{"description":"Successful operation"}},"description":"Query accountt","method":"post","path":"/api/v2/graphql","servers":[{"url":"https://indexer-v2.dev.aurascan.io","description":"Server for testnet network. Support chains of auratestnet, serenity, ephoria, xstaxy, nois and sei"},{"url":"https://horoscope.aura.network","description":"Server for main network. Only support chain of xstaxy"},{"url":"https://indexer-v2.staging.aurascan.io","description":"Server for testnet network. Support chains of ephoria and xstaxy"}],"jsonRequestBodyExample":{"operationName":"account","query":"query account($limit: Int = 10, $address: String = null) { euphoria { account(limit: $limit, where: {address: {_eq: $address}}) { account_number address balances pubkey sequence spendable_balances type updated_at created_at } } }","variables":{"limit":10,"address":null}},"info":{"title":"Horoscope v2 graphql","version":"1.0.0"},"postman":{"name":"Query accountt","description":{"type":"text/plain"},"url":{"path":["api","v2","graphql"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}}
api: eJztV99v2jAQ/lcsqw+rlALlMdIetqna9tKuo5smdRUyyUHcJrZrO5Qq4n/fnfMDKKXatAmpaCC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: horoscope-v2/horoscope-v-2-graphql
custom_edit_url: null
---

import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem"
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import Markdown from "@theme/Markdown";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";

## Query account
Query:
```graphql
query account(
$limit: Int = 10,
$address: String = null
) {
xstaxy { #This point to target chain to query
account(
limit: $limit,
where: {
address: {
_eq: $address
}
}
) {
account_number
address
balances
pubkey
sequence
spendable_balances
type
updated_at
created_at
}
}
}
```
Variable:
```json
{
"limit": 10,
"address": null
}
```
<MimeTabs><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Request Body</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"operationName"} required={false} schemaDescription={"query name"} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"query"} required={false} schemaDescription={"Graphql query"} schemaName={"string"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"variables"} required={false} schemaDescription={"Variable in query"} schemaName={"object"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem></ul></details></TabItem></MimeTabs><div><ApiTabs><TabItem label={"200"} value={"200"}><div>
<h1 className={"openapi__heading"}>Query account</h1>

<MethodEndpoint method={"post"} path={"/api/v2/graphql"}></MethodEndpoint>



Query account

## Request

<MimeTabs className={"openapi-tabs__mime"}><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-mime"}><h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"operationName"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"account","description":"query name"}}></SchemaItem><SchemaItem collapsible={false} name={"query"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"query account($limit: Int = 10, $address: String = null) { euphoria { account(limit: $limit, where: {address: {_eq: $address}}) { account_number address balances pubkey sequence spendable_balances type updated_at created_at } } }","description":"Graphql query"}}></SchemaItem><SchemaItem collapsible={false} name={"variables"} required={false} schemaName={"object"} qualifierMessage={undefined} schema={{"type":"object","description":"Variable in query","example":{"limit":10,"address":null}}}></SchemaItem></ul></details></TabItem></MimeTabs><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>

Successful operation

</div><div></div></TabItem></ApiTabs></div>
</div><div></div></TabItem></ApiTabs></div></div>

Loading

0 comments on commit 287bb55

Please sign in to comment.