Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-pubdata-costs
Browse files Browse the repository at this point in the history
  • Loading branch information
kaymomin authored Nov 25, 2024
2 parents 5fe6940 + 04ea9eb commit 9e8c57e
Show file tree
Hide file tree
Showing 208 changed files with 37,198 additions and 2,028 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Production license for @nuxt/ui-pro, get one at https://ui.nuxt.com/pro/purchase
# Only required for building the project, running dev will work without it
NUXT_UI_PRO_LICENSE=
2 changes: 1 addition & 1 deletion .github/workflows/check-pr-title.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
statuses: write
contents: read
steps:
- uses: amannn/[email protected].2
- uses: amannn/[email protected].3
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ github.token }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
build_and_preview:
env:
NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }}
ALGOLIA_SEARCH_API_KEY: ${{ secrets.ALGOLIA_SEARCH_API_KEY }}
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
if: ${{ github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
outputs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
env:
HUSKY: 0
CI: true
NUXT_SITE_ENV: production # used for NuxtSEO to disable things like indexing on staging

concurrency:
group: production
Expand All @@ -15,6 +16,8 @@ jobs:
build_and_deploy:
env:
NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }}
ALGOLIA_SEARCH_API_KEY: ${{ secrets.ALGOLIA_SEARCH_API_KEY }}
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
if: ${{ github.event.repository.full_name == github.repository }}
runs-on: ubuntu-latest
environment: production
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
build_and_deploy:
env:
NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }}
ALGOLIA_SEARCH_API_KEY: ${{ secrets.ALGOLIA_SEARCH_API_KEY }}
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
if: ${{ github.event.repository.full_name == github.repository }}
environment: staging
runs-on: ubuntu-latest
Expand Down
26 changes: 21 additions & 5 deletions .github/workflows/playwright.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ on:

jobs:
test-tutorials:
timeout-minutes: 20
timeout-minutes: 12
runs-on: ubuntu-latest
strategy:
matrix:
tutorial:
- "tests/erc20-paymaster.spec.ts"
- "tests/how-to-test-contracts.spec.ts"
- "erc20-paymaster"
- "how-to-test-contracts"
- "daily-spend-limit"
- "signing-txns-with-webauthn"
- "native-aa-multisig"
- "frontend-paymaster"

steps:
- uses: actions/checkout@v4
Expand All @@ -21,10 +25,22 @@ jobs:
- uses: actions/setup-node@v4
- name: Install Playwright Browsers
run: bun playwright install chromium --with-deps
- name: Run Era Test Node
uses: dutterbutter/era-test-node-action@v1
- name: Create Metamask Cache
run: xvfb-run bun setup:mm
- name: Run test for ${{ matrix.tutorial }}
run: |
export TERM=xterm-256color
export COLUMNS=80
export LINES=24
script -q -c "bun test:github ${{ matrix.tutorial }}"
xvfb-run bun test:headful tests/${{ matrix.tutorial }}.spec.ts
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report-${{ matrix.tutorial }}
path: |
${{ github.workspace }}/playwright-report/
retention-days: 10


4 changes: 2 additions & 2 deletions .github/workflows/secrets_scanner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: TruffleHog OSS
uses: trufflesecurity/trufflehog@f2a0ea0b70288cf25ba46d906034417555a207a8 # v3.69.0
uses: trufflesecurity/trufflehog@06bbd6fd493fcac4a6db0e4850a92bcf932fafed # v3.81.10
with:
path: ./
base: ${{ github.event.repository.default_branch }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ logs
tests-output
test-results
playwright-report
.cache-synpress

# Local env files
.env
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
.idea
public
**/*.md
tests-output
16 changes: 1 addition & 15 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script setup lang="ts">
import type { ParsedContent } from '@nuxt/content/types';
provideHeadlessUseId(() => useId());
const { seo } = useAppConfig();
Expand Down Expand Up @@ -33,18 +31,13 @@ useSeoMeta({
});
defineOgImageComponent('OgImageZK');
const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {
default: () => [],
server: false,
});
</script>

<template>
<div>
<NuxtLoadingIndicator />

<HeaderComponent :search="true" />
<HeaderComponent />

<UMain>
<NuxtLayout>
Expand All @@ -54,13 +47,6 @@ const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {

<FooterComponent />

<ClientOnly>
<LazyUContentSearch
:files="files"
:navigation="navigation || []"
/>
</ClientOnly>

<UNotifications />
</div>
</template>
Binary file modified bun.lockb
Binary file not shown.
2 changes: 2 additions & 0 deletions code/frontend-paymaster/contracts/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
WALLET_PRIVATE_KEY=
ALLOWED_TOKEN=
114 changes: 114 additions & 0 deletions code/frontend-paymaster/contracts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.vscode

# hardhat artifacts
artifacts
cache

# zksync artifacts
artifacts-zk
cache-zk
deployments-zk

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port
1 change: 1 addition & 0 deletions code/frontend-paymaster/contracts/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
18 changes: 18 additions & 0 deletions code/frontend-paymaster/contracts/contracts/Greeter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

contract Greeter {
string private greeting;

constructor(string memory _greeting) {
greeting = _greeting;
}

function greet() public view returns (string memory) {
return greeting;
}

function setGreeting(string memory _greeting) public {
greeting = _greeting;
}
}
27 changes: 27 additions & 0 deletions code/frontend-paymaster/contracts/contracts/erc20/MyERC20Token.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";

/**
* @title MyERC20Token
* @dev This is a basic ERC20 token using the OpenZeppelin's ERC20PresetFixedSupply preset.
* You can edit the default values as needed.
*/
contract MyERC20Token is ERC20Burnable {

/**
* @dev Constructor to initialize the token with default values.
* You can edit these values as needed.
*/
constructor() ERC20("DefaultTokenName", "DTN") {
// Default initial supply of 1 million tokens (with 18 decimals)
uint256 initialSupply = 1_000_000 * (10 ** 18);

// The initial supply is minted to the deployer's address
_mint(msg.sender, initialSupply);
}

// Additional functions or overrides can be added here if needed.
}
Loading

0 comments on commit 9e8c57e

Please sign in to comment.