Skip to content

Commit

Permalink
feat: update sdk to subdomain
Browse files Browse the repository at this point in the history
  • Loading branch information
itsacoyote committed Aug 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 31a4ea2 commit 60ad879
Showing 164 changed files with 1,457 additions and 1,360 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "deploy 🚀"
on:
push:
branches: [main]

env:
HUSKY: 0
CI: true

concurrency:
group: production
cancel-in-progress: true

jobs:
build_and_deploy:
env:
NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }}
if: ${{ github.event.repository.full_name == github.repository }}
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4 # v4
with:
persist-credentials: false # <--- checking this in commit context

- uses: oven-sh/setup-bun@v1

- name: "Install dependencies"
run: bun install --production --frozen-lockfile
- name: "Deploy target: staging"
run: bun run build

- uses: matter-labs/action-hosting-deploy@main
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_SDK_DOCS_7B113 }}"
projectId: sdk-docs-7b113
channelId: live
14 changes: 7 additions & 7 deletions app.vue
Original file line number Diff line number Diff line change
@@ -11,17 +11,17 @@ useHead({
},
});
const seoDescription =
'ZKsync SDK Docs is a collection of guides, references and resources on building with ZKsync SDKs.';
useSeoMeta({
titleTemplate: `%s - ${seo?.siteName}`,
ogSiteName: seo?.siteName,
ogUrl: 'https://docs.zksync.io/',
ogImageAlt: 'Hyperscaling Ethereum with ZK tech.',
ogDescription:
'ZKsync Docs bring you all information you need about our protocol, APIs, SDKs, ZK Stack, and ZK Chains. Start with our guides and tutorials, or go deep into our architecture and protocol specification.',
description:
'ZKsync Docs bring you all information you need about our protocol, APIs, SDKs, ZK Stack, and ZK Chains. Start with our guides and tutorials, or go deep into our architecture and protocol specification.',
twitterDescription:
'ZKsync Docs bring you all information you need about our protocol, APIs, SDKs, ZK Stack, and ZK Chains. Start with our guides and tutorials, or go deep into our architecture and protocol specification.',
ogDescription: seoDescription,
description: seoDescription,
twitterDescription: seoDescription,
twitterTitle: `%s`,
twitterCard: 'summary_large_image',
twitterSite: '@zksync',
@@ -32,7 +32,7 @@ useSeoMeta({
defineOgImage({
component: 'OgImageZK',
title: seo?.siteName,
description: 'Access detailed guides, references and resources that will help you build with ZKsync Era.',
description: 'Access detailed guides, references and resources that will help you build with ZKsync SDKs.',
});
</script>

Binary file modified bun.lockb
Binary file not shown.
16 changes: 8 additions & 8 deletions content/sdk/00.index.md → content/00.index.md
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ tags: ["zksync", "sdks", "zksync Era SDK", "ethereum", "era network", "javascrip
makes transactions faster and cheaper while keeping the security and trust of the Ethereum blockchain.

::div{class="text-center"}
![ZKsync Era SDKs](/images/sdk/zksync_era-sdk.png){ width="50%"}
![ZKsync Era SDKs](/images/zksync_era-sdk.png){ width="50%"}
::

### Key points
@@ -44,7 +44,7 @@ These SDKs, available in various programming languages, streamline the process o
and on-chain governance.

::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
We strongly recommend reading [**the introduction**](/sdk#what-is-zksync-era-sdks) before moving on to the rest of the
We strongly recommend reading [**the introduction**](#what-is-zksync-era-sdks) before moving on to the rest of the
documentation.
::

@@ -58,47 +58,47 @@ can use ZKsync Era's scalable, secure, and low-cost transactions.
---
title: JavaScript
icon: i-heroicons-code-bracket
to: /sdk/js/ethers
to: /js/ethers
---
Integrate JS with ZKsync Era for secure transactions.
::
::card
---
title: GO
icon: i-heroicons-cog
to: /sdk/go/introduction/overview
to: /go/introduction/overview
---
Integrate ZKsync GO SDK for ZKsync Era features.
::
::card
---
title: Python
icon: i-heroicons-circle-stack
to: /sdk/python/introduction/overview
to: /python/introduction/overview
---
Explore Nuxt built-in components for pages, layouts, head, and more.
::
::card
---
title: Java
icon: i-heroicons-rectangle-group
to: /sdk/java/introduction/overview
to: /java/introduction/overview
---
Integrate ZKsync Era with Java for cost-effective transactions.
::
::card
---
title: Swift
icon: i-heroicons-rocket-launch
to: /sdk/swift/introduction/overview
to: /swift/introduction/overview
---
Integrate ZKsync Era with Swift for efficiency.
::
::card
---
title: Rust
icon: i-heroicons-wrench
to: /sdk/rust/getting-started
to: /rust/getting-started
---
Integrate ZKsync Era with Rust for scalable transactions.
::
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ There are two main versions of the zksync-ethers SDK: V5 and V6. Each version ca
distinct features and improvements.

::callout{icon="i-heroicons-light-bulb"}
Check the [installation guide](/sdk/js/ethers/installation-js) for instructions.
Check the [installation guide](/js/ethers/installation-js) for instructions.
::

## Choosing the right version
@@ -29,5 +29,5 @@ Choosing the right version of the zksync-ethers SDK depends on your project requ
| Community Support| Extensive community resources | Growing community support |

::callout{icon="i-heroicons-light-bulb"}
To use the `zksync-ethers` v5 or v6, visit the [Getting Started](/sdk/js/ethers/guides/getting-started) page.
To use the `zksync-ethers` v5 or v6, visit the [Getting Started](/js/ethers/guides/getting-started) page.
::
Original file line number Diff line number Diff line change
@@ -37,6 +37,6 @@ technologies. The SDK is regularly updated to incorporate the latest development
powerful and flexible tool for building next-generation blockchain applications.

::callout{icon="i-heroicons-light-bulb"}
Explore the [zksync-ethers documentation](/sdk/js/ethers) to get started and take advantage of all the
Explore the [zksync-ethers documentation](/js/ethers) to get started and take advantage of all the
features and benefits it offers.
::
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ Learn how to install and set up the `zksync-ethers` library to interact with the
features for Ethereum scaling and Layer 2 solutions.

::callout{icon="i-heroicons-light-bulb"}
If you're migrating from `zksync-web3`, please refer to the [migration guide](/sdk/js/ethers/guides/migration) for
If you're migrating from `zksync-web3`, please refer to the [migration guide](/js/ethers/guides/migration) for
detailed instructions.
::

Original file line number Diff line number Diff line change
@@ -27,5 +27,5 @@ environments (Node.js, React Native, Electron).
Both versions offer robust platform compatibility, ensuring seamless integration with ZKsync across different environments.

::callout{icon="i-heroicons-light-bulb"}
For more detailed information and specific configurations, refer to the [official zksync-ethers documentation](https://zksync.io/sdk/js/ethers).
For more detailed information and specific configurations, refer to the [official zksync-ethers documentation](https://sdk.zksync.io/js/ethers).
::
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ If you need background information on how L1<->L2 interactions work on ZKsync, c

`Wallet` and `L1Signer` objects allow you to deposit funds from L1 to L2.

- **More Information**: See the method specification [`Deposit`](/sdk/js/ethers/api/v5/accounts/wallet#deposit).
- **More Information**: See the method specification [`Deposit`](/js/ethers/api/v5/accounts/wallet#deposit).
- **Example**: Deposit ETH and ERC20 token

::collapsible
@@ -54,31 +54,31 @@ main()
`Wallet` and `L1Signer` objects let you request the execution of an L2 transaction from L1.
- **More Information**: See the method specification [`requestExecute`](/sdk/js/ethers/api/v5/accounts/wallet#requestexecute).
- **More Information**: See the method specification [`requestExecute`](/js/ethers/api/v5/accounts/wallet#requestexecute).
## Base cost
`Wallet` and `L1Signer` objects can calculate the base cost for an L2 transaction.
- **More Information**: See the method specification [`getBaseCost`](/sdk/js/ethers/api/v5/accounts/wallet#getbasecost).
- **More Information**: See the method specification [`getBaseCost`](/js/ethers/api/v5/accounts/wallet#getbasecost).
## Claim failed deposit
`Wallet` and `L1Signer` objects provide a way to claim a failed deposit.
- **More Information**: See the method specification [`claimFailedDeposit`](/sdk/js/ethers/api/v5/accounts/wallet#claimfaileddeposit).
- **More Information**: See the method specification [`claimFailedDeposit`](/js/ethers/api/v5/accounts/wallet#claimfaileddeposit).
## Finalize withdraw
`Wallet` and `L1Signer` objects allow you to finalize a withdrawal from L2 to L1.
- **More Information**: See the method specification [`finalizeWithdrawal`](/sdk/js/ethers/api/v5/accounts/wallet#finalizewithdrawal).
- **More Information**: See the method specification [`finalizeWithdrawal`](/js/ethers/api/v5/accounts/wallet#finalizewithdrawal).
## Withdrawal
`Wallet` and `Signer` objects enable you to withdraw funds from L2 to L1.
- **More Information**: See the method specification [`Withdraw`](/sdk/js/ethers/api/v5/accounts/wallet#withdraw).
- **More Information**: See the method specification [`Withdraw`](/js/ethers/api/v5/accounts/wallet#withdraw).
- **Example**: Withdraw ETH and ERC20 token
::collapsible
Original file line number Diff line number Diff line change
@@ -14,4 +14,4 @@ infrastructure will work seamlessly.
## Using ZKsync Era features

To deploy smart contracts or use advanced zksync features like account abstraction, you'll need the `zksync-ethers`
library. Learn the basics of `zksync-ethers` in the [ZKsync Era Features](/sdk/js/ethers/guides/features).
library. Learn the basics of `zksync-ethers` in the [ZKsync Era Features](/js/ethers/guides/features).
Original file line number Diff line number Diff line change
@@ -12,14 +12,14 @@ the [`ethers.js`](https://docs.ethers.io/v5/api/providers) library and adds extr

Two providers are available:

- [`Provider`](/sdk/js/ethers/api/v5/providers/web3provider): Functions
- [`Provider`](/js/ethers/api/v5/providers/web3provider): Functions
like [`ethers.providers.JsonRpcProvider`](https://docs.ethers.org/v5/api/providers/jsonrpc-provider/#JsonRpcProvider)
with added ZKsync-specific methods.
- [`Web3Provider`](/sdk/js/ethers/api/v5/providers/web3provider): Extends the ZKsync
Era [`Provider`](/sdk/js/ethers/api/v5/providers/provider) class for better compatibility with Web3 wallets.
- [`Web3Provider`](/js/ethers/api/v5/providers/web3provider): Extends the ZKsync
Era [`Provider`](/js/ethers/api/v5/providers/provider) class for better compatibility with Web3 wallets.

::callout{icon="i-heroicons-light-bulb"}
Use the [`Web3Provider`](/sdk/js/ethers/api/v5/providers/web3provider) for browser integrations.
Use the [`Web3Provider`](/js/ethers/api/v5/providers/web3provider) for browser integrations.
::

### `Provider`
Loading

0 comments on commit 60ad879

Please sign in to comment.