Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(1367): tidy up for tutorials #1401

Merged
merged 63 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
b5d6bbe
docs(1367): tidy up for tutorials
m4sterbunny Jul 10, 2024
2fad3a8
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 22, 2024
bb5c241
Update snaps/learn/tutorials/transaction-insights.md
m4sterbunny Jul 22, 2024
246192e
Update snaps/learn/tutorials/transaction-insights.md
m4sterbunny Jul 22, 2024
f41907b
Merge branch 'main' into 1367-tabs-for-options
m4sterbunny Jul 22, 2024
9c1bdd6
completes the separation of paths for yarn etc
m4sterbunny Jul 22, 2024
3293fc1
reverts tabs in favor of dropping support for npm/npx
m4sterbunny Jul 23, 2024
a190ff0
makes step 2 optional and extends it to point that all clicks make sense
m4sterbunny Jul 24, 2024
14c2aa0
improves numbering, rmvs 6 (not a step), aligns 5 with new flow
m4sterbunny Jul 24, 2024
5212057
attempts to allow both tutorials to function as hello world && to dir…
m4sterbunny Jul 25, 2024
258b8a2
final proofs
m4sterbunny Jul 25, 2024
6ac31ca
final proofs
m4sterbunny Jul 25, 2024
d0adc06
final proofs?
m4sterbunny Jul 25, 2024
40c535a
final proofs?
m4sterbunny Jul 25, 2024
3d90ca5
Merge branch 'main' into 1367-tabs-for-options
alexandratran Jul 26, 2024
2157f89
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 26, 2024
65aadfa
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 26, 2024
8b9a9cb
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 26, 2024
8f0ad03
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 26, 2024
ac27064
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 26, 2024
a0e21ec
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 26, 2024
b81e00d
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 26, 2024
0b010b5
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 26, 2024
b04aa0b
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 26, 2024
ffa431d
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 26, 2024
384ab2a
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 26, 2024
23b1a75
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 26, 2024
a1d3513
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 26, 2024
a735092
aligns both per proofs
m4sterbunny Jul 26, 2024
5272ab9
proofs and toc4
m4sterbunny Jul 26, 2024
a303055
proofs
m4sterbunny Jul 26, 2024
8bf9f6a
proofs
m4sterbunny Jul 26, 2024
c81ae2e
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 31, 2024
66f7113
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 31, 2024
3215d4c
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 31, 2024
bfe03c0
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 31, 2024
34d44f8
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 31, 2024
10388f6
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 31, 2024
27f8131
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 31, 2024
3c057b6
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 31, 2024
b6b6ba8
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 31, 2024
40a0a90
Update snaps/learn/tutorials/gas-estimation.md
m4sterbunny Jul 31, 2024
1e7e335
Update snaps/learn/tutorials/transaction-insights.md
m4sterbunny Jul 31, 2024
cf642ca
Update snaps/learn/tutorials/transaction-insights.md
m4sterbunny Jul 31, 2024
dc15ffa
Update snaps/learn/tutorials/transaction-insights.md
m4sterbunny Jul 31, 2024
2e12017
Update snaps/learn/tutorials/transaction-insights.md
m4sterbunny Jul 31, 2024
94e9fdf
Update snaps/learn/tutorials/transaction-insights.md
m4sterbunny Jul 31, 2024
5af492f
Update snaps/learn/tutorials/transaction-insights.md
m4sterbunny Jul 31, 2024
f5fb2ed
Update snaps/learn/tutorials/transaction-insights.md
m4sterbunny Jul 31, 2024
cdcf0f0
Update snaps/learn/tutorials/transaction-insights.md
m4sterbunny Jul 31, 2024
090e3fc
Update snaps/learn/tutorials/transaction-insights.md
m4sterbunny Jul 31, 2024
f70ebb5
Update snaps/learn/tutorials/transaction-insights.md
m4sterbunny Jul 31, 2024
eea2e77
Update snaps/learn/tutorials/transaction-insights.md
m4sterbunny Jul 31, 2024
5e901a3
proposes solution for fragements
m4sterbunny Jul 31, 2024
c0937ef
docs: Reverts tabbed full code and applies proofs
m4sterbunny Aug 1, 2024
81ed3e0
fixes code sample and alt method to disable button
m4sterbunny Aug 1, 2024
171981b
Merge branch 'main' into 1367-tabs-for-options
m4sterbunny Aug 1, 2024
de3fbd5
Add closing tag
joaniekube Aug 1, 2024
13ac6f4
Merge branch 'main' into 1367-tabs-for-options
alexandratran Aug 2, 2024
5a025c4
edits
alexandratran Aug 2, 2024
132d735
minor fix
alexandratran Aug 2, 2024
5946246
Update snaps/learn/tutorials/transaction-insights.md
m4sterbunny Aug 2, 2024
2a57a21
Apply suggestions from code review
alexandratran Aug 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions snaps/learn/tutorials/gas-estimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ description: Create a Snap that estimates gas fees.
sidebar_position: 1
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Create a Snap to estimate gas fees

This tutorial walks you through creating a Snap that estimates gas fees.
Expand All @@ -24,21 +27,28 @@ Create a new Snap project using the
[`@metamask/create-snap`](https://github.com/MetaMask/snaps/tree/main/packages/create-snap)
starter kit by running:

<Tabs>
<TabItem value="yarn" label="yarn" default>

```bash
yarn create @metamask/snap gas-estimation-snap
```

or
</TabItem>
<TabItem value="npx" label="npx" >

```bash
npx @metamask/create-snap gas-estimation-snap
```

or
</TabItem>
<TabItem value="npm" label="npm" >

```bash
npm create @metamask/snap gas-estimation-snap
```
</TabItem>
</Tabs>


Next, `cd` into the `gas-estimation-snap` project directory and run:

Expand All @@ -47,18 +57,25 @@ yarn install
```

This initializes your development environment with the required dependencies.
You may get a warning similar to the following:

<details>
<summary>Did you get a warning?</summary>
<div>
You may get a warning such as:

```bash
@lavamoat/allow-scripts has detected dependencies without configuration. explicit configuration required.
run "allow-scripts auto" to automatically populate the configuration.
```

You can resolve this error by running the following command:
You can resolve this error by running:

```bash
yarn run allow-scripts auto
```
</div>
</details>


### 2. Add a custom icon

Expand Down
30 changes: 23 additions & 7 deletions snaps/learn/tutorials/transaction-insights.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ description: Create a Snap that provides transaction insights.
sidebar_position: 2
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Create a Snap to calculate gas fee percentages

This tutorial walks you through creating a Snap that calculates the percentage of gas fees that
Expand All @@ -28,41 +31,54 @@ Create a new Snap project using the
[`@metamask/create-snap`](https://github.com/MetaMask/snaps/tree/main/packages/create-snap)
starter kit by running:

<Tabs>
<TabItem value="yarn" label="yarn" default>

```bash
yarn create @metamask/snap transaction-insights-snap
```

or
</TabItem>
<TabItem value="npx" label="npx" >

```bash
npx @metamask/create-snap transaction-insights-snap
```

or
</TabItem>
<TabItem value="npm" label="npm" >

```bash
npm create @metamask/snap transaction-insights-snap
```
</TabItem>
</Tabs>

Next, `cd` into the `transaction-insights-snap` project directory and run:

```bash
yarn install
```

This initializes your development environment with the required dependencies.
You may get a warning similar to the following:

<details>
<summary>Did you get a warning?</summary>
<div>
You may get a warning such as:

```bash
@lavamoat/allow-scripts has detected dependencies without configuration. explicit configuration required.
run "allow-scripts auto" to automatically populate the configuration.
```

You can resolve the issue by running the following command:
You can resolve the issue by running:

```bash
yarn run allow-scripts auto
```
```
</div>
</details>



### 2. Enable transaction insights and the Ethereum provider

Expand Down