Skip to content

Commit

Permalink
Release @argent-x/[email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
gergold committed Feb 19, 2024
1 parent 38eba26 commit 9e4907d
Show file tree
Hide file tree
Showing 723 changed files with 15,968 additions and 9,962 deletions.
69 changes: 50 additions & 19 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
env: [prod, hydrogen]
env: [prod, staging, hydrogen]
extension_type: [chrome, firefox]

environment: ${{ matrix.env }}
Expand All @@ -29,8 +29,9 @@ jobs:
# API URLs
ARGENT_API_BASE_URL: ${{ vars.ARGENT_API_BASE_URL }}
ARGENT_X_STATUS_URL: ${{ vars.ARGENT_X_STATUS_URL }}
ARGENT_X_NEWS_URL: ${{ vars.ARGENT_X_NEWS_URL }}
ARGENT_TESTNET_RPC_URL: ${{ vars.ARGENT_TESTNET_RPC_URL }}

ARGENT_HEALTHCHECK_BASE_URL: ${{ vars.ARGENT_HEALTHCHECK_BASE_URL }}
# API ENVIRONMENT
ARGENT_X_ENVIRONMENT: ${{ matrix.env }}

Expand All @@ -44,6 +45,7 @@ jobs:
RAMP_API_KEY: ${{ secrets.RAMP_API_KEY }}
SAFE_ENV_VARS: false
MULTICALL_MAX_BATCH_SIZE: 20
NEW_CAIRO_0_ENABLED: false

# Refresh intervals
FAST: 20 # 20s
Expand Down Expand Up @@ -111,7 +113,7 @@ jobs:
run: (cd ./packages/extension/dist && zip -r "../../../${{ env.FILENAME_PREFIX }}-${{ matrix.extension_type }}" .)

- name: Upload ${{ matrix.extension_type }} extension
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.FILENAME_PREFIX }}-${{ matrix.extension_type }}
path: "*-${{ matrix.extension_type }}.zip"
Expand All @@ -125,7 +127,9 @@ jobs:
env:
ARGENT_API_BASE_URL: ${{ vars.ARGENT_API_BASE_URL }}
ARGENT_TESTNET_RPC_URL: ${{ vars.ARGENT_TESTNET_RPC_URL }}
ARGENT_HEALTHCHECK_BASE_URL: ${{ vars.ARGENT_HEALTHCHECK_BASE_URL }}
ARGENT_X_STATUS_URL: ${{ vars.ARGENT_X_STATUS_URL }}
ARGENT_X_NEWS_URL: ${{ vars.ARGENT_X_NEWS_URL }}
ARGENT_X_ENVIRONMENT: "hydrogen"

services:
Expand Down Expand Up @@ -174,7 +178,7 @@ jobs:
run: pnpm run test:ci
- name: SonarCloud Scan
# TODO replace with master as soon as sonarcloud fixes the issue with action https://community.sonarsource.com/t/sonarsource-sonarcloud-github-action-failing-with-node-js-12-error/89664/2
uses: SonarSource/sonarcloud-github-action@v1.9
uses: SonarSource/sonarcloud-github-action@v2.1.1
with:
projectBaseDir: ./packages/extension
env:
Expand All @@ -198,12 +202,20 @@ jobs:
E2E_ACCOUNT_1_SEED2: ${{ secrets.E2E_ACCOUNT_1_SEED2 }}
E2E_ACCOUNT_1_SEED3: ${{ secrets.E2E_ACCOUNT_1_SEED3 }}
## BANK ACCOUNT, USED FOR FUND OTHER ACCOUNTS
E2E_SENDER_ADDRESS: ${{ secrets.E2E_SENDER_ADDRESS }}
E2E_SENDER_PRIVATEKEY: ${{ secrets.E2E_SENDER_PRIVATEKEY }}
E2E_SENDER_ADDRESSES: ${{ secrets.E2E_SENDER_ADDRESSES }}
E2E_SENDER_PRIVATEKEYS: ${{ secrets.E2E_SENDER_PRIVATEKEYS }}
E2E_SENDER_SEED: ${{ secrets.E2E_SENDER_SEED }}
STARKNET_TESTNET_URL: ${{ secrets.STARKNET_TESTNET_URL }}
STARKSCAN_TESTNET_URL: ${{ secrets.STARKSCAN_TESTNET_URL }}
ARGENT_TESTNET_RPC_URL: ${{ secrets.ARGENT_TESTNET_RPC_URL }}
ARGENT_HEALTHCHECK_BASE_URL: ${{ secrets.ARGENT_HEALTHCHECK_BASE_URL }}
E2E_SPOK_CAMPAIGN_URL: ${{ secrets.E2E_SPOK_CAMPAIGN_URL }}
E2E_SPOK_CAMPAIGN_NAME: ${{ secrets.E2E_SPOK_CAMPAIGN_NAME }}
# Refresh intervals
REFRESH_INTERVAL_FAST: 1 # 1s
REFRESH_INTERVAL_MEDIUM: 5 # 5s
REFRESH_INTERVAL_SLOW: 20 # 20s
REFRESH_INTERVAL_VERY_SLOW: 60 * 10 # 10m

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -241,19 +253,20 @@ jobs:
run: xvfb-run --auto-servernum pnpm test:e2e:extension --project=${{ matrix.project }} --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: test-artifacts
name: test-artifacts-${{ matrix.shardIndex }}
path: |
packages/e2e/artifacts/playwright/
!packages/e2e/artifacts/playwright/*.webm
retention-days: 5

- name: Upload blob report to GitHub Actions Artifacts
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: all-blob-reports
name: all-blob-reports-${{ matrix.shardIndex }}
path: packages/e2e/blob-report/
retention-days: 5

Expand Down Expand Up @@ -286,19 +299,20 @@ jobs:
${{ runner.os }}-pnpm-store-
- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: all-blob-reports
path: all-blob-reports
pattern: all-blob-reports-*
merge-multiple: true

- name: Merge into HTML Report
run: npx playwright merge-reports --reporter html ./all-blob-reports
run: npx playwright merge-reports -c ./packages/e2e/merge-reports.config.js ./all-blob-reports

- name: Upload HTML report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: html-report--attempt-${{ github.run_attempt }}
path: playwright-report
path: packages/e2e/playwright-report
retention-days: 14

add_pr_comments:
Expand Down Expand Up @@ -408,6 +422,23 @@ jobs:
NEXT_PUBLIC_ARGENT_API_BASE_URL: ${{ vars.ARGENT_API_BASE_URL }}
NEXT_PUBLIC_ARGENT_TESTNET_RPC_URL: ${{ vars.ARGENT_TESTNET_RPC_URL }}

ARGENT_API_BASE_URL: ${{ secrets.ARGENT_API_BASE_URL }}
E2E_TESTNET_SEED1: ${{ secrets.E2E_TESTNET_SEED1 }}
E2E_TESTNET_SEED2: ${{ secrets.E2E_TESTNET_SEED2 }}
E2E_TESTNET_SEED3: ${{ secrets.E2E_TESTNET_SEED3 }}
E2E_ACCOUNT_1_SEED2: ${{ secrets.E2E_ACCOUNT_1_SEED2 }}
E2E_ACCOUNT_1_SEED3: ${{ secrets.E2E_ACCOUNT_1_SEED3 }}
## BANK ACCOUNT, USED FOR FUND OTHER ACCOUNTS
E2E_SENDER_ADDRESSES: ${{ secrets.E2E_SENDER_ADDRESSES }}
E2E_SENDER_PRIVATEKEYS: ${{ secrets.E2E_SENDER_PRIVATEKEYS }}
E2E_SENDER_SEED: ${{ secrets.E2E_SENDER_SEED }}
STARKNET_TESTNET_URL: ${{ secrets.STARKNET_TESTNET_URL }}
STARKSCAN_TESTNET_URL: ${{ secrets.STARKSCAN_TESTNET_URL }}
ARGENT_TESTNET_RPC_URL: ${{ secrets.ARGENT_TESTNET_RPC_URL }}
ARGENT_HEALTHCHECK_BASE_URL: ${{ secrets.ARGENT_HEALTHCHECK_BASE_URL }}
E2E_SPOK_CAMPAIGN_URL: ${{ secrets.E2E_SPOK_CAMPAIGN_URL }}
E2E_SPOK_CAMPAIGN_NAME: ${{ secrets.E2E_SPOK_CAMPAIGN_NAME }}

steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -443,19 +474,19 @@ jobs:
pnpm run test:e2e:webwallet
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: test-artifacts
name: test-artifacts-${{ matrix.shardIndex }}
path: |
packages/e2e/artifacts/playwright/
retention-days: 5

- name: Upload blob report to GitHub Actions Artifacts
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: all-blob-reports-webwallet
name: all-blob-reports-webwallet-${{ matrix.shardIndex }}
path: packages/e2e/blob-report/
retention-days: 5

Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@ jobs:
SAFE_ENV_VARS: true
ARGENT_API_BASE_URL: ${{ vars.ARGENT_API_BASE_URL }}
ARGENT_TESTNET_RPC_URL: ${{ vars.ARGENT_TESTNET_RPC_URL }}
ARGENT_HEALTHCHECK_BASE_URL: ${{ vars.ARGENT_HEALTHCHECK_BASE_URL }}
ARGENT_X_STATUS_URL: ${{ vars.ARGENT_X_STATUS_URL }}
ARGENT_X_NEWS_URL: ${{ vars.ARGENT_X_NEWS_URL }}
ARGENT_X_ENVIRONMENT: "prod"
MULTICALL_MAX_BATCH_SIZE: 20
FAST: 20 # 20s
MEDIUM: 60 # 60s
SLOW: 60 * 5 # 5m
VERY_SLOW: 24 * 60 * 60 # 1d
NEW_CAIRO_0_ENABLED: false

if: ${{ !startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/tags/') && contains(github.ref, 'extension') }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -82,15 +85,15 @@ jobs:
run: pnpm bundlewatch

- name: Upload artifacts for chrome
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: chrome
path: "*-chrome.zip"
retention-days: 14
if-no-files-found: error

- name: Upload artifacts for firefox
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: firefox
path: "*-firefox.zip"
Expand Down Expand Up @@ -132,10 +135,6 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
run: |
npm config set "//registry.npmjs.org/:_authToken" "$NPM_ACCESS_TOKEN"
cp Readme.md ./packages/get-starknet/README.md
pnpm --filter @argent/get-starknet publish --no-git-checks --access public || exit 0
pnpm --filter @argent/web-sdk publish --no-git-checks --access public || exit 0
pnpm --filter @argent/starknet-react-webwallet-connector publish --no-git-checks --access public || exit 0
pnpm --filter @argent/x-sessions publish --no-git-checks --access public || exit 0
- name: Get product version
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.10.0
20.11.0
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

---

<h3 align='center' style='margin: 1em;'>⬇️ Get <b>Argent X</b> for StarkNet today:</h3>
<h3 align='center' style='margin: 1em;'>⬇️ Get <b>Argent X</b> for Starknet today:</h3>

<p align="center">
<a href="https://chrome.google.com/webstore/detail/argent-x-starknet-wallet/dlcobpjiigpikoobohmabehhmhfoodbb/">
Expand Down Expand Up @@ -44,7 +44,7 @@ The example dapp is also contained in this repository.

## 🌐 Usage with your dapp

If you want to use this StarkNet Wallet extension with your dapp, the easiest way is to checkout the [starknetkit](https://github.com/argentlabs/starknetkit) package
If you want to use this Starknet Wallet extension with your dapp, the easiest way is to checkout the [starknetkit](https://github.com/argentlabs/starknetkit) package

```bash
# starknet.js is a peer dependency
Expand Down
10 changes: 5 additions & 5 deletions docs/Upgrade_v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ As a user of Argent X 2.x, after upgrading to version 3.0.0, your extension will

4. Disable Argent X 3.0.0 by switching off the toggle in the lower right corner of the Argent X panel in the Chrome extensions page.

5. Open the extension v2.2.3 and restore from your backup file, the one you downloaded in step 1. Now you can transfer all your tokens to your new address, the one you copied at step 2. For ERC721 assets, you'll have to do it in [Voyager](https://voyager.online/), the StarkNet block explorer, by connecting your wallet and transferring manually.
5. Open the extension v2.2.3 and restore from your backup file, the one you downloaded in step 1. Now you can transfer all your tokens to your new address, the one you copied at step 2. For ERC721 assets, you'll have to do it in [Voyager](https://voyager.online/), the Starknet block explorer, by connecting your wallet and transferring manually.

## What does it mean as a StarkNet dapp developer?
## What does it mean as a Starknet dapp developer?

The `starknet` object (returned by `get-starknet`) will now expose an `account` object instead of a `signer` object. This `account` object implements the [AccountInterface](https://github.com/0xs34n/starknet.js/blob/develop/src/account/interface.ts), specifically it exposes the methods `execute()` and `signMessage()`:

Expand All @@ -51,9 +51,9 @@ where `Call` is defined by:

```typescript
interface Call {
contractAddress: string;
entrypoint: string;
calldata?: BigNumberish[];
contractAddress: string
entrypoint: string
calldata?: BigNumberish[]
}
```

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@
"scripts": {
"format": "prettier --loglevel warn --write \"**/*.{js,jsx,ts,tsx,css,md,yml,json}\"",
"dev": "NODE_ENV=development pnpm run -r --stream --parallel dev",
"dev:ui": "NODE_ENV=development pnpm --parallel run dev:ui ",
"dev:ui": "NODE_ENV=development pnpm --parallel run dev:ui",
"dev:extension": "NODE_ENV=development pnpm run --filter @argent-x/extension -r --stream --parallel dev",
"build-storybook": "pnpm run --filter @argent-x/storybook build-storybook",
"clean": "rm -rf packages/extension/dist packages/get-starket/dist",
"clean": "rm -rf packages/extension/dist",
"build": "pnpm run -r --parallel --stream build",
"build:extension": "pnpm run --filter @argent-x/extension build",
"build:web": "pnpm run --filter @argent/web build",
"build:sourcemaps": "GEN_SOURCE_MAPS=true pnpm run build",
"lint": "pnpm run -r --parallel lint ",
"lint": "pnpm run -r --parallel lint",
"test": "pnpm run -r --parallel --stream test",
"test:watch": "pnpm run -r --paralle; --stream test:watch ",
"test:watch": "pnpm run -r --parallel; --stream test:watch",
"test:e2e:extension": "pnpm run --filter @argent-x/e2e test:extension",
"test:e2e:webwallet": "pnpm run --filter @argent-x/e2e test:webwallet",
"setup": "pnpm install --frozen-lockfile && pnpm allow-scripts && husky install && patch-package && pnpm run -r --stream setup",
"test:ci": "pnpm run --stream --parallel test:ci ",
"test:ci": "pnpm run --stream --parallel test:ci",
"storybook": "cd packages/storybook && pnpm run storybook",
"devnet:upgrade-helper": "NODE_NO_WARNINGS=1 ts-node ./scripts/devnet-upgrade-helper.ts",
"devnet:setup-contracts": "NODE_NO_WARNINGS=1 ts-node ./scripts/devnet-setup-contracts.ts",
Expand Down
10 changes: 5 additions & 5 deletions packages/dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
"@argent/ui": "^6.3.1",
"@argent/x-sessions": "^6.3.1",
"@chakra-ui/react": "^2.6.1",
"@starknet-react/chains": "0.1.0",
"@starknet-react/core": "2.1.1",
"@starknet-react/chains": "0.1.5",
"@starknet-react/core": "2.2.2",
"micro-starknet": "^0.2.3",
"next": "^13.4.6",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"starknet": "5.24.3",
"starknetkit": "^1.0.22"
"starknet": "5.25.0",
"starknetkit": "^1.1.0"
},
"devDependencies": {
"@types/node": "20.10.4",
"@types/node": "20.11.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"eslint": "8",
Expand Down
1 change: 1 addition & 0 deletions packages/dapp/src/components/AddNetwork.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const AddNetwork = () => {
chainId: "SN_DAPP_TEST",
chainName: "Test chain name",
baseUrl: "http://localhost:5050",
rpcUrls: ["http://localhost:5050/rpc"],
})
setAddNetworkError("")
} catch (error) {
Expand Down
4 changes: 2 additions & 2 deletions packages/dapp/src/components/InfoRow.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { H4 } from "@argent/ui"
import { Code, Flex } from "@chakra-ui/react"
import { FC } from "react"
import { FC, ReactNode } from "react"

const InfoRow: FC<{
title: string
content?: string
content?: ReactNode
copyContent?: string
}> = ({ title, content, copyContent }) => {
return (
Expand Down
Loading

0 comments on commit 9e4907d

Please sign in to comment.