Skip to content

Commit 10ed793

Browse files
authored
Merge pull request #13 from scroll-tech/scroll-sdk
Scroll sdk
2 parents 2f7b5bb + cd366ed commit 10ed793

File tree

419 files changed

+34238
-27191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

419 files changed

+34238
-27191
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.15.0
1+
v20.13.1

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nodejs 16.16.0
1+
nodejs 18.14.1

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,24 @@ npm install && npm run dev
1616
- All articles are markdown and stored in `/src/content/docs/`.
1717
- Navigation is JSON in `/src/config/sidebar.ts`
1818

19+
## Tooling on Scroll
20+
21+
If you'd like to add an entry to our [tooling list](http://docs.scroll.xyz/en/developers/scroll-contracts), create a PR to add a new `mdx` file in the [tooling content folder](src/content/tools), using the following template. You can also refer to other existing entries for reference.
22+
23+
```
24+
---
25+
name: "Safe"
26+
category: ["Identity", "Wallet"]
27+
excerpt: "Safe allows you to create smart wallet on chain."
28+
logo: { src: "https://app.safe.global/images/safe-logo-green.png", alt: "Safe Logo" }
29+
website: "https://app.safe.global"
30+
network: ["Mainnet", "Testnet]
31+
noAdditionalInfo: false
32+
---
33+
34+
Add additional info here about how to access this tool on Scroll (ex. contract addresses, tutorials, API URLs)
35+
```
36+
1937
## Credits
2038

2139
- Special thanks to the Chainlink team whose documentation we forked. Their repo is available [here](https://github.com/smartcontractkit/documentation) and viewable at [https://docs.chain.link/](https://docs.chain.link/).

astro-i18next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
export default {
33
defaultLocale: "en",
44
showDefaultLocale: true,
5-
locales: ["en", "zh", "es"],
5+
locales: ["en", "es", "zh", "tr"],
66
load: ["server", "client"],
77
}

astro.config.ts

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
import { defineConfig } from "astro/config"
22
import preact from "@astrojs/preact"
33
import react from "@astrojs/react"
4+
import svgr from "vite-plugin-svgr"
45
import astroI18next from "astro-i18next"
56
import { astroCallouts, asideAutoImport } from "./integrations/astro-callouts"
67
import { solidityRemixCode, codeSampleAutoImport } from "./integrations/solidity-remix"
7-
import { youtubeEmbed } from "./integrations/youtube-embed"
88
import mdx from "@astrojs/mdx"
99
import rehypeSlug from "rehype-slug"
1010
import rehypeAutolinkHeadings from "rehype-autolink-headings"
1111
import rehypeKatex from "rehype-katex"
1212
import rehypeMermaid from "rehype-mermaidjs"
1313
import remarkGfm from "remark-gfm"
1414
import remarkMath from "remark-math"
15-
import image from "@astrojs/image"
1615
import AutoImport from "astro-auto-import"
1716

1817
import sitemap from "@astrojs/sitemap"
1918

2019
import tailwind from "@astrojs/tailwind"
2120

21+
import expressiveCode from "astro-expressive-code"
22+
2223
// https://astro.build/config
2324
export default defineConfig({
2425
site: "https://docs.scroll.io",
26+
scopedStyleStrategy: "where",
2527
legacy: {
2628
astroFlavoredMarkdown: true,
2729
},
@@ -32,21 +34,38 @@ export default defineConfig({
3234
preact({
3335
compat: true,
3436
}),
37+
3538
sitemap({
3639
changefreq: "daily",
3740
}),
3841
astroCallouts(),
3942
solidityRemixCode(),
40-
youtubeEmbed(),
43+
expressiveCode({
44+
themes: ["dark-plus"],
45+
defaultProps: {
46+
frame: "code",
47+
},
48+
styleOverrides: {
49+
borderRadius: "27px",
50+
borderColor: "transparent",
51+
frames: {
52+
shadowColor: "transparent",
53+
editorTabBorderRadius: "0.5rem",
54+
editorBackground: "#2b2b2b",
55+
},
56+
},
57+
}),
4158
mdx(),
42-
image(),
4359
tailwind({
44-
// Example: Disable injecting a basic `base.css` import on every page.
45-
// Useful if you need to define and/or import your own custom `base.css`.
46-
config: { applyBaseStyles: false },
60+
applyBaseStyles: false,
61+
nesting: true,
4762
}),
63+
4864
astroI18next(),
4965
],
66+
vite: {
67+
plugins: [svgr()],
68+
},
5069
markdown: {
5170
drafts: true,
5271
remarkPlugins: [remarkMath, remarkGfm],
@@ -56,7 +75,14 @@ export default defineConfig({
5675
[
5776
rehypeAutolinkHeadings,
5877
{
59-
behavior: "append",
78+
behavior: "wrap",
79+
properties: {},
80+
content: {
81+
type: "element",
82+
tagName: "span",
83+
properties: { className: ["icon", "icon-link"] },
84+
children: [],
85+
},
6086
},
6187
],
6288
[

integrations/utils/makeComponentNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function makeComponentNode(
2121
type: "mdxJsxFlowElement",
2222
name,
2323
attributes: Object.entries(attributes)
24-
// Filter out non-truthy attributes to avoid empty attrs being parsed as `true`.
24+
// Filter out non-truthy attributes to avoid empty attributes being parsed as `true`.
2525
.filter(([_k, v]) => v !== false && Boolean(v))
2626
.map(([name, value]) => ({
2727
type: "mdxJsxAttribute",

integrations/youtube-embed.ts

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

0 commit comments

Comments
 (0)