Skip to content

Commit 97f8e52

Browse files
authored
Merge pull request #771 from hyperweb-io/anmol/move-docs-from-repo
docs: move docs for telescope repo from docs repo into the telescope
2 parents 7812595 + 5f2c07b commit 97f8e52

26 files changed

+1400
-64
lines changed

.github/workflows/docs.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "docs/**"
9+
- ".github/workflows/docs.yaml"
10+
11+
env:
12+
# Repository specific variables
13+
REPO_NAME: telescope
14+
DOCS_DEST_PATH: pages/telescope
15+
16+
jobs:
17+
docs-deploy:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '20'
28+
enable-global-cache: true
29+
30+
- name: Clone docs repository
31+
run: git clone https://x-access-token:${{ secrets.GH_HYPERWEB_PAT }}@github.com/hyperweb-io/docs.hyperweb.io.git external-docs
32+
33+
- name: Sync the docs and build
34+
run: |
35+
rsync -av --delete ./docs/ ./external-docs/${{ env.DOCS_DEST_PATH }}/
36+
cd external-docs
37+
yarn install
38+
yarn export
39+
40+
- name: Git push
41+
run: |
42+
cd external-docs
43+
git config user.name 'GitHub Action'
44+
git config user.email '[email protected]'
45+
git add .
46+
if git diff --cached --quiet; then
47+
echo "No changes to commit."
48+
else
49+
git commit -m "Automated: Update ${{ env.REPO_NAME }} documentation"
50+
git push
51+
fi
52+

docs/README.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/_meta.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"index": "Introduction",
3+
"get-started": "Get Started",
4+
"programatic-usage": "Programatic Usage",
5+
"options": "Options",
6+
"types": "Types",
7+
"interfaces": "Interfaces",
8+
"composing-messages": "Composing Messages",
9+
"calculating-fees": "Calculating Fees",
10+
"clients": "Clients",
11+
"manually-registering-types": "Manually registering types",
12+
"cosmwasm": "CosmWasm",
13+
"dependencies": "Dependencies",
14+
"developing": "Developing"
15+
}

docs/calculating-fees.mdx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Calculating Fees
2+
3+
Make sure to create a `fee` object in addition to your message.
4+
5+
```js
6+
import { coins } from '@cosmjs/amino';
7+
8+
const fee = {
9+
amount: coins(0, 'uosmo'),
10+
gas: '250000'
11+
}
12+
```
13+
14+
if you are broadcasting multiple messages in a batch, you should `simulate` your tx and estimate the fee
15+
16+
```js
17+
import { Dec, IntPretty } from '@keplr-wallet/unit';
18+
19+
const gasEstimated = await stargateClient.simulate(address, msgs, memo);
20+
const fee = {
21+
amount: coins(0, 'uosmo'),
22+
gas: new IntPretty(new Dec(gasEstimated).mul(new Dec(1.3)))
23+
.maxDecimals(0)
24+
.locale(false)
25+
.toString()
26+
};
27+
```

0 commit comments

Comments
 (0)